/*
 * auth.css — Login & Register page styles.
 *
 * @author  Mr.Server hossam.net HOSSAM ALZYOD
 * @version 3.0
 */

/* ================================================================
   PAGE WRAPPER
   ================================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: radial-gradient(ellipse at 60% 0%, rgba(0,201,167,.15) 0%, transparent 60%),
                #0f1923;
}

/* ================================================================
   CARD
   ================================================================ */
.auth-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(0,201,167,.18);
    border-radius: 20px;
    padding: 40px 36px 32px;
    box-shadow: 0 24px 64px rgba(0,0,0,.45);
    animation: authFadeUp .45s ease both;
}

/* Home corner button — mirrors lang-dropdown position on the left */
.auth-home-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(0, 201, 167, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00c9a7;
    font-size: 0.8rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.auth-home-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 201, 167, 0.5);
    background-color: rgba(0, 201, 167, 0.1);
    color: #00c9a7;
}

@keyframes authFadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   LOGO
   ================================================================ */
.auth-logo {
    text-align: center;
    margin-top: 14px;
    margin-bottom: 14px;
}
.auth-logo-img {
    height: 52px;
    width: auto;
}

/* ================================================================
   ALERT
   ================================================================ */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 18px;
}
.auth-alert-error {
    background: rgba(239,68,68,.15);
    border: 1px solid rgba(239,68,68,.35);
    color: #fca5a5;
}

/* ================================================================
   DESCRIPTION
   ================================================================ */
.auth-desc {
    font-size: 0.85rem;
    color: #8faab8;
    text-align: center;
    margin: 0 0 20px;
}
.auth-title {
    margin: 0 0 16px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #d0e8f0;
}

/* ================================================================
   FORM
   ================================================================ */
.auth-form {
    margin-bottom: 0;
}

.auth-field {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    margin-bottom: 14px;
    transition: border-color .22s;
    overflow: hidden;
}
.auth-field:focus-within {
    border-color: #00c9a7;
    background: rgba(0,201,167,.07);
}

.auth-field-icon {
    width: 44px;
    text-align: center;
    flex-shrink: 0;
    color: #8faab8;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.95rem;
    padding: 13px 12px;
    font-family: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.auth-input::placeholder { color: #5a7a8a; }
html[lang="ar"] .auth-input::placeholder,
html[dir="rtl"] .auth-input::placeholder {
    direction: rtl;
    text-align: right;
    unicode-bidi: plaintext;
}

.auth-field-hint {
    margin: -4px 2px 12px;
    min-height: 18px;
    font-size: 0.78rem;
    color: #7e9eac;
}
.auth-field-hint.is-loading {
    color: #8bb6c7;
}
.auth-field-hint.is-success {
    color: #50d7b4;
}
.auth-field-hint.is-error {
    color: #fca5a5;
}

.auth-select {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.95rem;
    padding: 13px 12px 13px 0;
    font-family: inherit;
    cursor: pointer;
}
.auth-select option {
    color: #0f1923;
}

.auth-gender-wrap {
    margin-bottom: 14px;
}
.auth-gender-label {
    margin: 0 0 10px;
    font-size: 0.82rem;
    color: #8faab8;
    text-align: center;
}
.auth-gender-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.auth-gender-grid input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.auth-gender-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    color: #b8d2de;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color .2s, background .2s, color .2s;
}
.auth-gender-grid input[type="radio"]:checked + .auth-gender-card {
    border-color: rgba(0,201,167,.55);
    background: rgba(0,201,167,.12);
    color: #e8f4f8;
}

.auth-phone-field {
    padding: 0 12px;
}
.auth-phone-field .iti {
    width: 100%;
}
.auth-phone-field .iti__selected-country {
    border-radius: 10px 0 0 10px;
    transition: background .2s;
}
.auth-phone-field .iti__selected-country:hover {
    background: rgba(0, 201, 167, 0.12);
}
.auth-phone-field .iti__arrow {
    border-top-color: #7fb7c9;
}
.auth-phone-field .iti__arrow--up {
    border-bottom-color: #7fb7c9;
}
.auth-phone-field .iti__country-list {
    background: linear-gradient(180deg, #132536 0%, #0f1923 100%);
    border: 1px solid rgba(0, 201, 167, 0.28);
    color: #d0e8f0;
    border-radius: 12px;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.32);
}
.auth-phone-field .iti__search-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 201, 167, 0.35);
    border-radius: 10px;
    color: #e5f6fb;
}
.auth-phone-field .iti__search-input::placeholder {
    color: #7fa0ad;
}
.auth-phone-field .iti__country {
    color: #d0e8f0;
}
.auth-phone-field .iti__country:hover,
.auth-phone-field .iti__country.iti__highlight {
    background: rgba(0, 201, 167, 0.16);
}
.auth-phone-field .iti__country.iti__active {
    background: rgba(0, 201, 167, 0.22);
}
.auth-phone-field .iti__dial-code {
    color: #8bb6c7;
}
.auth-phone-field .iti__divider {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}
.auth-phone-field .iti__country-list::-webkit-scrollbar {
    width: 8px;
}
.auth-phone-field .iti__country-list::-webkit-scrollbar-thumb {
    background: rgba(0, 201, 167, 0.35);
    border-radius: 999px;
}
.auth-phone-field .iti__country-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
}
.auth-phone-field .iti input.auth-input {
    padding-inline-start: 52px;
}

/* intl-tel-input fullscreen popup (mobile) */
.iti.iti--container.iti--fullscreen-popup {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.iti.iti--container.iti--fullscreen-popup .iti__country-list {
    background: linear-gradient(180deg, #132536 0%, #0f1923 100%);
    color: #d0e8f0;
    border: 1px solid rgba(0, 201, 167, 0.28);
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    width: min(560px, 100%);
    max-height: min(72vh, 560px);
}
.iti.iti--container.iti--fullscreen-popup .iti__search-input {
    background: rgb(162 67 67 / 4%);
    border: 1px solid rgba(0, 201, 167, 0.35);
    border-radius: 10px;
    color: #000000;
}
.iti.iti--container.iti--fullscreen-popup .iti__search-input::placeholder {
    color: #7fa0ad;
}
.iti.iti--container.iti--fullscreen-popup .iti__country {
    color: #d0e8f0;
}
.iti.iti--container.iti--fullscreen-popup .iti__country:hover,
.iti.iti--container.iti--fullscreen-popup .iti__country.iti__highlight {
    background: rgba(0, 201, 167, 0.16);
}
.iti.iti--container.iti--fullscreen-popup .iti__dial-code {
    color: #8bb6c7;
}
.iti.iti--container.iti--fullscreen-popup .iti__no-results {
    background: rgba(0, 201, 167, 0.08);
    color: #c8e8f2;
    border-radius: 10px;
}
.iti.iti--container.iti--fullscreen-popup .iti__country.iti__active {
    background: rgba(0, 201, 167, 0.22);
}
.iti.iti--container.iti--fullscreen-popup .iti__divider {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}
.iti.iti--container.iti--fullscreen-popup .iti__country-list::-webkit-scrollbar {
    width: 8px;
}
.iti.iti--container.iti--fullscreen-popup .iti__country-list::-webkit-scrollbar-thumb {
    background: rgba(0, 201, 167, 0.35);
    border-radius: 999px;
}
.iti.iti--container.iti--fullscreen-popup .iti__country-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
}

/* Password toggle */
.auth-pw-wrap { padding-inline-end: 4px; }
.auth-pw-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: #8faab8;
    padding: 10px 10px;
    font-size: 0.9rem;
    transition: color .2s;
    flex-shrink: 0;
}
.auth-pw-toggle:hover { color: #00c9a7; }

@media (max-width: 480px) {
    .auth-card {
        padding: 36px 16px 24px;
    }

    .auth-field-icon {
        width: 40px;
    }

    .auth-input {
        font-size: 0.9rem;
    }
}

/* Submit */
.auth-btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #00c9a7 0%, #0097a7 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .3px;
    cursor: pointer;
    margin-top: 6px;
    transition: opacity .2s, transform .15s;
}
.auth-btn:hover  { opacity: .88; }
.auth-btn:active { transform: scale(.98); }

/* ================================================================
   DIVIDER
   ================================================================ */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: #3a5a6a;
    font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,.1);
}

/* ================================================================
   GOOGLE BUTTON
   ================================================================ */
.auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
    color: #c8dde6;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .22s, border-color .22s;
}
.auth-google-btn:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.22);
    color: #fff;
}

/* ================================================================
   FACEBOOK BUTTON
   ================================================================ */
.auth-facebook-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 13px 16px;
    margin-top: 12px;
    border-radius: 12px;
    border: 1px solid rgba(24, 119, 242, .3);
    background: rgba(24, 119, 242, .1);
    color: #1877F2;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .22s, border-color .22s, color .22s;
}
.auth-facebook-btn:hover {
    background: rgba(24, 119, 242, .2);
    border-color: rgba(24, 119, 242, .5);
    color: #5aa5ff;
}

/* ================================================================
   LINKS ROW
   ================================================================ */
.auth-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.auth-links-tight { margin-top: 16px; }
.auth-link {
    font-size: 0.85rem;
    color: #00c9a7;
    text-decoration: none;
    transition: opacity .2s;
}
.auth-link:hover { opacity: .75; }
.auth-link-sep  { color: rgba(255,255,255,.2); }
.auth-link--cta { color: #fff; font-weight: 600; }
.auth-link--cta:hover { opacity: .9; }

/* ================================================================
   LEGAL / COPYRIGHT
   ================================================================ */
.auth-legal {
    margin-top: 20px;
    font-size: 0.78rem;
    color: #4a6a7a;
    text-align: center;
    line-height: 1.6;
}
.auth-legal-links {
    display: block;
    margin-top: 4px;
}
.auth-legal a {
    color: #5a8a9a;
    text-decoration: none;
}
.auth-legal a:hover { color: #00c9a7; }

.auth-copyright {
    margin-top: 10px;
    font-size: 0.76rem;
    color: #c8c8c8;
    text-align: center;
}

/* ================================================================
   HINT TEXT
   ================================================================ */
.auth-hint {
    margin: -4px 2px 12px;
    font-size: 0.78rem;
    color: #7e9eac;
}

/* ================================================================
   SECTION SEPARATOR LABEL (used inside auth-card for multi-section forms)
   ================================================================ */
.auth-section-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #5a8a9a;
    letter-spacing: .6px;
    text-transform: uppercase;
    margin: 20px 0 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.auth-section-label:first-child { margin-top: 0; }
.auth-section-label i { font-size: 0.85rem; }

.auth-section-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,.07);
    margin: 20px 0;
}

/* ================================================================
   STATUS BLOCK (verified / pending)
   ================================================================ */
.auth-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 0;
    text-align: center;
}
.auth-status-icon          { font-size: 52px; line-height: 1; }
.auth-status-icon.verified { color: #00c9a7; }
.auth-status-icon.pending  { color: #ffd54f; }
.auth-status-title         { font-size: 16px; font-weight: 700; color: #fff; }
.auth-status-text          { font-size: 13px; color: #8faab8; line-height: 1.6; }

/* ================================================================
   ALERT VARIANTS (success, warning, info)
   ================================================================ */
.auth-alert-success { background: rgba(0,201,167,.12);  border: 1px solid rgba(0,201,167,.35);  color: #80cbc4; }
.auth-alert-warning { background: rgba(255,193,7,.10);  border: 1px solid rgba(255,193,7,.30);  color: #fff9c4; }
.auth-alert-info    { background: rgba(30,136,229,.12); border: 1px solid rgba(30,136,229,.35); color: #90caf9; }

/* ================================================================
   TEXTAREA
   ================================================================ */
textarea.auth-input {
    resize: vertical;
    min-height: 90px;
    white-space: normal;
    overflow: auto;
    padding: 12px;
    align-self: stretch;
    width: 100%;
}
.auth-field:has(textarea) { align-items: flex-start; }
.auth-field:has(textarea) .auth-field-icon { padding-top: 13px; }

/* ================================================================
   LEGACY — kept for any old selectors still referenced
   ================================================================ */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── DOB drum / slot-machine picker ────────────────────────────────── */
.auth-dob-wrap {
    margin-bottom: 14px;
}
.auth-dob-drums {
    display: flex;
    align-items: flex-start;
    gap: 0;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 14px;
    padding: 6px 10px 10px;
    transition: border-color .22s;
}
.auth-dob-drums:focus-within {
    border-color: rgba(0,201,167,.45);
    background: rgba(0,201,167,.05);
}
.auth-dob-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 0;
}
.auth-dob-col--month { flex: 1.5; }
.auth-dob-col--year  { flex: 1.6; }
.auth-dob-sep {
    align-self: center;
    padding: 0 3px;
    color: rgba(255,255,255,.18);
    font-size: 1rem;
    margin-top: -5px;
    user-select: none;
}
/* The scrollable window */
.auth-dob-drum-wrap {
    position: relative;
    height: calc(32px * 3);
    width: 100%;
    overflow: hidden;
    cursor: ns-resize;
    -webkit-user-select: none;
    user-select: none;
}
/* Center-selection highlight bar */
.auth-dob-drum-wrap::before {
    content: '';
    position: absolute;
    top: calc(50% - 16px);
    left: 2px; right: 2px;
    height: 32px;
    background: rgba(0,201,167,.1);
    border-top:    1px solid rgba(0,201,167,.35);
    border-bottom: 1px solid rgba(0,201,167,.35);
    border-radius: 7px;
    pointer-events: none;
    z-index: 2;
}
/* Fade mask */
.auth-dob-drum {
    position: relative;
    z-index: 1;
    will-change: transform;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 33%, black 67%, transparent 100%);
    mask-image:         linear-gradient(to bottom, transparent 0%, black 33%, black 67%, transparent 100%);
}
.auth-dob-item {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-family: inherit;
    color: rgba(255,255,255,.45);
    transition: color .12s;
    pointer-events: none;
}
.auth-dob-item--sel {
    color: #00c9a7;
    font-weight: 600;
    font-size: 0.92rem;
}
.auth-dob-sub {
    font-size: 0.65rem;
    color: #5a7a8a;
    letter-spacing: .05em;
    text-transform: uppercase;
    line-height: 1;
}

/* ── Google readonly fields ─────────────────────────────────────────── */
.auth-field--readonly {
    opacity: .7;
    cursor: default;
    pointer-events: none;
    border-color: rgba(255,255,255,.07) !important;
    background: rgba(255,255,255,.03) !important;
}
.auth-field--readonly .auth-input {
    color: rgba(255,255,255,.55);
}
.auth-google-lock {
    font-size: 0.75rem;
    color: #8faab8;
    padding: 0 14px;
    flex-shrink: 0;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}
