/**
 * AI Tools Directory — Auth Pages Shared Styles
 * Used by: page-login.php, page-register.php, page-submit.php (login prompt)
 *
 * @package AI_Tools_Directory
 */

/* ===================================
   Layout Overrides (full-width for auth pages)
   =================================== */
.page-template-page-login #page,
.page-template-page-register #page {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.page-template-page-login .site-content,
.page-template-page-login .content-area,
.page-template-page-login .page-wrapper,
.page-template-page-login #primary,
.page-template-page-login #main,
.page-template-page-register .site-content,
.page-template-page-register .content-area,
.page-template-page-register .page-wrapper,
.page-template-page-register #primary,
.page-template-page-register #main {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.page-template-page-login .site-header,
.page-template-page-register .site-header {
    background: #fff;
}

.page-template-page-login .site-footer,
.page-template-page-register .site-footer {
    background: #fff !important;
    border-top: 1px solid #e5e7eb !important;
}

.auth-page {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 200px);
    padding: 40px 20px 80px;
    background: #fafbfc;
}

/* ===================================
   Auth Card
   =================================== */
.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 32px rgba(0,0,0,0.04);
    padding: 40px 36px 32px;
}

/* ===================================
   Auth Header
   =================================== */
.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo {
    margin-bottom: 16px;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
}

.auth-desc {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* ===================================
   Alert
   =================================== */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

.auth-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* ===================================
   Form
   =================================== */
.auth-form {
    margin-bottom: 24px;
}

.auth-field {
    margin-bottom: 18px;
}

.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    flex-shrink: 0;
}

.auth-input {
    width: 100%;
    padding: 11px 14px 11px 42px;
    font-size: 14px;
    color: #111827;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.auth-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
    background: #fff;
}

.auth-input.input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

.auth-input::placeholder {
    color: #9ca3af;
}

/* Password toggle */
.auth-toggle-pw {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #9ca3af;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.auth-toggle-pw:hover {
    color: #374151;
}

/* ===================================
   Buttons
   =================================== */
.auth-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.auth-btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16,185,129,0.35);
}

.auth-btn-primary:active {
    transform: translateY(0);
}

/* ===================================
   Footer
   =================================== */
.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
    font-size: 14px;
    color: #6b7280;
}

.auth-footer-link {
    color: #10b981;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: color 0.15s;
}

.auth-footer-link:hover {
    color: #059669;
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 480px) {
    .auth-page {
        padding: 20px 12px 60px;
    }
    .auth-card {
        padding: 32px 20px 24px;
        border-radius: 16px;
    }
}

/* ===================================
   Submit Page — Login Prompt (for page-submit.php)
   =================================== */

.page-template-page-submit #page {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.page-template-page-submit .site-content,
.page-template-page-submit .content-area,
.page-template-page-submit .page-wrapper,
.page-template-page-submit #primary,
.page-template-page-submit #main {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.submit-page {
    width: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
}

.submit-page-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    padding: 32px 20px;
}

.submit-login-prompt {
    text-align: center;
    padding: 48px;
}

.login-prompt-icon {
    margin-bottom: 20px;
}

.login-prompt-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
}

.login-prompt-desc {
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 28px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.login-prompt-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-login-primary {
    display: inline-flex;
    align-items: center;
    padding: 12px 32px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
    color: #fff;
}

.btn-login-secondary {
    display: inline-flex;
    align-items: center;
    padding: 12px 32px;
    background: #fff;
    color: #374151;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s;
}

.btn-login-secondary:hover {
    border-color: #10b981;
    color: #059669;
}
