/* ============================================
   YALLATICKET - PROFESSIONAL AUTH
   Optimized | Organized | Perfect Spacing
   ============================================ */

@import url('common.css');

/* ===== AUTH BODY ===== */
.auth-body {
    min-height: 100vh;
    background: linear-gradient(180deg, #0a0d14 0%, #12151e 50%, #0a0d14 100%);
    position: relative;
    overflow-x: hidden;
}

.auth-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, transparent 0%, rgba(44, 199, 203, 0.03) 50%, transparent 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(44, 199, 203, 0.02) 2px, rgba(44, 199, 203, 0.02) 4px);
    pointer-events: none;
}

.auth-body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(44, 199, 203, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(44, 199, 203, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    opacity: 0.3;
}

/* ===== TOP BUTTONS ===== */
.auth-lang-switcher,
.auth-back-home {
    position: fixed;
    top: 24px;
    z-index: 100;
}

.auth-lang-switcher {
    right: 24px;
}

.auth-back-home {
    left: 24px;
}

.auth-lang-btn,
.auth-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(30, 33, 41, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(44, 199, 203, 0.15);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.auth-lang-btn:hover,
.auth-back-btn:hover {
    background: rgba(44, 199, 203, 0.08);
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== AUTH WRAPPER ===== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    position: relative;
    z-index: 1;
}

.auth-container {
    width: 100%;
    max-width: 520px;
}

/* ===== AUTH CARD ===== */
.auth-card {
    background: rgba(26, 29, 39, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(44, 199, 203, 0.15);
    border-radius: 16px;
    padding: 40px;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 1px 0 rgba(44, 199, 203, 0.1) inset;
    position: relative;
    animation: authFadeIn 0.5s ease;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border-radius: 0 0 2px 2px;
}

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

/* ===== HEADER ===== */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(44, 199, 203, 0.1);
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-logo:hover {
    opacity: 0.9;
}

.auth-logo img {
    max-height: 50px;
    width: auto;
    max-width: 200px;
}

.auth-logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 6px 20px rgba(44, 199, 203, 0.25);
}

.auth-logo-text {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.auth-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0.2px;
}

/* ===== ALERTS ===== */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    border-left-width: 3px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: authAlertFade 0.3s ease;
    background: rgba(30, 33, 41, 0.8);
}

@keyframes authAlertFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-alert i {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.auth-alert__content {
    flex: 1;
    line-height: 1.5;
}

.auth-alert__list {
    margin: 6px 0 0 0;
    padding-left: 18px;
    list-style: none;
}

.auth-alert__list li {
    margin-bottom: 4px;
    position: relative;
    padding-left: 12px;
}

.auth-alert__list li::before {
    content: '•';
    position: absolute;
    left: 0;
    font-weight: 700;
}

.auth-alert__close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0.7;
}

.auth-alert__close:hover {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.auth-alert--success {
    background: rgba(34, 197, 94, 0.08);
    border-left-color: #22c55e;
    color: #4ade80;
}

.auth-alert--danger {
    background: rgba(239, 68, 68, 0.08);
    border-left-color: #ef4444;
    color: #f87171;
}

.auth-alert--info {
    background: rgba(44, 199, 203, 0.08);
    border-left-color: var(--primary);
    color: #5DD5D9;
}

/* ===== CONTENT ===== */
.auth-content {
    margin-bottom: 24px;
}

/* ===== FORM STYLES ===== */
.auth-content .form-group {
    margin-bottom: 18px;
}

.auth-content .form-label {
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.3px;
    display: block;
}

.auth-content .form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    background: rgba(18, 21, 30, 0.8);
    border: 1px solid rgba(44, 199, 203, 0.15);
    border-radius: 8px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.auth-content .form-control:focus {
    outline: none;
    background: rgba(18, 21, 30, 1);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 199, 203, 0.08);
}

.auth-content .form-control::placeholder {
    color: var(--text-muted);
}

/* Password Field */
.auth-content .password-field {
    position: relative;
}

.auth-content .password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.auth-content .password-toggle:hover {
    color: var(--primary);
    background: rgba(44, 199, 203, 0.08);
}

/* Checkbox */
.auth-content .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-content .form-check-input {
    width: 18px;
    height: 18px;
    min-width: 18px;
    background: rgba(18, 21, 30, 0.8);
    border: 1px solid rgba(44, 199, 203, 0.2);
    border-radius: 4px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: all 0.2s ease;
    position: relative;
}

.auth-content .form-check-input:checked {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: var(--primary);
}

.auth-content .form-check-input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 11px;
    font-weight: 700;
}

.auth-content .form-check-label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

/* ===== BUTTONS ===== */
.auth-content .btn,
.auth-content .yt-btn {
    width: 100%;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-content .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(44, 199, 203, 0.25);
    border: none;
}

.auth-content .btn-primary:hover {
    box-shadow: 0 6px 16px rgba(44, 199, 203, 0.35);
    transform: translateY(-1px);
    color: white;
}

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

.auth-content .btn-secondary {
    background: transparent;
    border: 1px solid rgba(44, 199, 203, 0.2);
    color: var(--text-secondary);
}

.auth-content .btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(44, 199, 203, 0.05);
}

/* Social Buttons */
.auth-content .btn-google,
.auth-content .btn-facebook {
    padding: 12px 20px;
    font-size: 13px;
}

.auth-content .btn-google {
    background: #ea4335;
    border: none;
}

.auth-content .btn-google:hover {
    background: #d33426;
    color: white;
}

.auth-content .btn-facebook {
    background: #3b5998;
    border: none;
}

.auth-content .btn-facebook:hover {
    background: #2d4373;
    color: white;
}

/* ===== SOCIAL DIVIDER - FIXED ===== */
.social-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    position: relative;
}

.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(44, 199, 203, 0.15);
}

.social-divider span {
    padding: 0 16px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(26, 29, 39, 0.98);
}

/* ===== SOCIAL BUTTONS CONTAINER ===== */
.social-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

/* ===== FOOTER ===== */
.auth-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(44, 199, 203, 0.1);
    text-align: center;
}

.auth-footer p,
.auth-terms p{
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
    text-align: center;
}

.auth-footer-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.auth-footer-more p {
    margin: 0;
}

/* ===== LINKS ===== */
.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.auth-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Text Utilities */
.text-sm {
    font-size: 14px;
}

.text-danger {
    color: var(--danger);
}

.mt-1 {
    margin-top: 4px;
}

/* ===== VERIFICATION PAGE ===== */
.verification-wrapper {
    text-align: center;
}

.verification-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(44, 199, 203, 0.3);
}

.verification-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
}

.verification-text {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
    font-size: 15px;
}

.verification-help {
    text-align: left;
    background: rgba(18, 21, 30, 0.6);
    border: 1px solid rgba(44, 199, 203, 0.1);
    border-radius: 8px;
    padding: 16px;
    margin-top: 24px;
}

.verification-help h4 {
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 600;
}

.verification-help ol,
.verification-help ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.verification-help li {
    margin-bottom: 8px;
}

/* ===== TWO FACTOR ===== */
.code-input {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 10px;
    padding: 16px;
    background: rgba(18, 21, 30, 0.8);
}

/* ===== PASSWORD STRENGTH ===== */
.password-strength {
    margin-top: 8px;
}

.password-strength .strength-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.password-strength .strength-bar > div {
    height: 100%;
    transition: all 0.3s ease;
}

.password-strength small {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .auth-card {
        padding: 32px 28px;
    }
}

@media (max-width: 480px) {
    .auth-wrapper {
        padding: 20px 16px;
    }

    .auth-card {
        padding: 28px 24px;
        border-radius: 12px;
    }

    .auth-title {
        font-size: 22px;
    }

    .auth-logo-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    .auth-logo-text {
        font-size: 22px;
    }

    .auth-lang-switcher,
    .auth-back-home {
        top: 16px;
    }

    .auth-lang-switcher {
        right: 16px;
    }

    .auth-back-home {
        left: 16px;
    }

    .social-buttons {
        flex-direction: column;
        gap: 10px;
    }
}

@media (min-width: 769px) {
    .auth-container {
        max-width: 560px;
    }

    .auth-card {
        padding: 48px 44px;
    }
}

/* ===== RTL SUPPORT ===== */
[dir="rtl"] .auth-logo {
    flex-direction: row-reverse;
}

[dir="rtl"] .auth-alert__list {
    padding-left: 0;
    padding-right: 18px;
}

[dir="rtl"] .auth-alert__list li {
    padding-left: 0;
    padding-right: 12px;
}

[dir="rtl"] .auth-alert__list li::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .auth-content .password-toggle {
    right: auto;
    left: 12px;
}

[dir="rtl"] .auth-content .form-check {
    flex-direction: row-reverse;
}

[dir="rtl"] .verification-help ol,
[dir="rtl"] .verification-help ul {
    padding-left: 0;
    padding-right: 20px;
}

/* ===== ACCESSIBILITY ===== */
.auth-link:focus-visible,
.auth-lang-btn:focus-visible,
.auth-back-btn:focus-visible,
.auth-content .btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== LOADING STATE ===== */
.auth-content .btn.loading {
    pointer-events: none;
    opacity: 0.6;
}
