/**
 * ZEDIS Design System - Auth & Identity Provider Styles
 */

/* 1. Full-Screen Hero Container */
.hero-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    min-height: calc(100vh - 84px);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url('/images/auth/login-hero.jpg');
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.12) 50%, rgba(0, 0, 0, 0.25) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* 2. Floating Corporate Card */
.corporate-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 443px;
    border-radius: var(--card-radius);
    background: #ffffff;
    padding: 2.25rem 2.25rem 2rem 2.25rem;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(241, 245, 249, 0.8);
    display: flex;
    flex-direction: column;
}

/* Top-Right Language Switcher Pill */
.lang-pill {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    background: rgba(255, 247, 237, 0.95);
    border: 1px solid rgba(254, 215, 170, 0.85);
    color: #7c2d12;
    font-size: 0.75rem;
    font-weight: 700;
    user-select: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.lang-pill:hover {
    background: rgba(255, 237, 213, 1);
}

.flag-svg {
    width: 16px;
    height: 11px;
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.25);
    display: block;
}

/* Card Header Elements */
.card-logo-wrap {
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: center;
}

.card-logo {
    height: 3.75rem;
    width: auto;
    max-width: 290px;
    object-fit: contain;
}

.card-header-text {
    text-align: center;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.card-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
    line-height: 1.5;
    max-width: 310px;
    margin-left: auto;
    margin-right: auto;
}

/* 3. Active Session Profile Card (2-Tier Enterprise Layout) */
.session-info-card {
    border: 1px solid var(--border-divider);
    border-radius: 18px;
    padding: 1.125rem;
    background: #fafbfc;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-header-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.user-avatar-badge {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(169, 105, 71, 0.25);
    flex-shrink: 0;
}

.user-meta-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.user-display-name {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--text-heading);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-tckn-label {
    font-family: var(--font-mono);
    font-size: 0.71875rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.user-roles-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding-top: 0.625rem;
    border-top: 1px dashed var(--border-divider);
}

.badge-role-tag {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid var(--primary-border);
    border-radius: 6px;
    padding: 0.2rem 0.55rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

/* 4. Action Buttons (Balanced & Centered) */
.action-stack {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.btn-primary {
    height: 3.25rem;
    width: 100%;
    border-radius: var(--btn-radius);
    background-color: var(--primary);
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    box-shadow: 0 4px 14px rgba(169, 105, 71, 0.25);
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: scale(1.01);
}

.btn-primary svg {
    flex-shrink: 0;
}

.btn-secondary {
    height: 2.875rem;
    width: 100%;
    border-radius: var(--btn-radius);
    background: #ffffff;
    border: 1px solid var(--border-input);
    color: var(--text-body);
    font-size: 0.84375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-danger-outline {
    height: 2.625rem;
    width: 100%;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn-danger-outline:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.btn-sso {
    height: 3rem;
    width: 100%;
    border-radius: var(--btn-radius);
    background: #ffffff;
    border: 1px solid var(--border-input);
    color: var(--text-heading);
    font-size: 0.84375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn-sso:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* 5. Form Elements */
.form-group {
    margin-bottom: 1.125rem;
}

.form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-body);
    margin-bottom: 0.375rem;
}

.form-label a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}

.form-label a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.form-input {
    width: 100%;
    height: 2.875rem;
    background: #ffffff;
    border: 1px solid var(--border-input);
    border-radius: var(--input-radius);
    padding: 0 0.875rem;
    color: var(--text-heading);
    font-size: 0.84375rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.form-input::placeholder {
    color: var(--text-subtle);
}

/* Input with Inline Action (Password Visibility Toggle) */
.input-with-action {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-with-action .form-input {
    padding-right: 2.75rem;
}

.input-action-btn {
    position: absolute;
    right: 0.5rem;
    height: 2rem;
    width: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.input-action-btn:hover {
    color: var(--text-heading);
    background-color: #f1f5f9;
}

.input-action-btn svg {
    pointer-events: none;
}

.form-check-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.78125rem;
    color: var(--text-muted);
    user-select: none;
}

.form-check-row input[type="checkbox"] {
    accent-color: var(--primary);
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.25rem 0;
    color: var(--text-subtle);
    font-size: 0.71875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-divider);
}

.divider::before { margin-right: 0.75rem; }
.divider::after { margin-left: 0.75rem; }

/* Alert Box */
.alert-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.78125rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.45;
}

/* 6. Card Bottom Ministry Emblem */
.card-bottom-emblem {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-divider);
    display: flex;
    justify-content: center;
}

.card-bottom-emblem img {
    height: auto;
    width: 240px;
    max-width: 100%;
    object-fit: contain;
}

/* 7. Loading Overlay & Double-Submit Protection */
.auth-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: var(--card-radius);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    text-align: center;
    padding: 1.75rem;
    animation: authFadeIn 0.2s ease-out;
    user-select: none;
    pointer-events: auto;
    cursor: wait;
}

.auth-loading-overlay.is-active {
    display: flex;
}

.auth-spinner {
    width: 2.75rem;
    height: 2.75rem;
    border: 3.5px solid rgba(169, 105, 71, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: authSpin 0.75s linear infinite;
    box-shadow: 0 2px 10px rgba(169, 105, 71, 0.15);
}

.auth-loading-title {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.2;
}

.auth-loading-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    max-width: 270px;
}


@keyframes authSpin {
    to { transform: rotate(360deg); }
}

@keyframes authFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 640px) {
    .hero-container {
        padding: 1rem 0.75rem 2.5rem 0.75rem;
        min-height: calc(100vh - 60px);
        align-items: flex-start;
        overflow: visible;
        width: 100%;
    }

    .hero-background {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        background-attachment: fixed;
    }

    .hero-overlay {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
    }

    .hero-content {
        width: 100%;
    }

    .corporate-card {
        width: 100%;
        max-width: 100%;
        padding: 1.375rem 1.125rem 1.25rem 1.125rem;
        border-radius: 20px;
        box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.3);
    }

    /* Dil Seçim Butonu */
    .lang-pill {
        top: 0.875rem;
        right: 0.875rem;
        padding: 0.2rem 0.5rem;
        font-size: 0.6875rem;
        gap: 0.25rem;
    }

    /* Logo & Başlıklar */
    .card-logo-wrap {
        margin-top: 0;
        margin-bottom: 0.625rem;
    }

    .card-logo {
        height: 2.625rem;
        max-width: 200px;
    }

    .card-header-text {
        margin-bottom: 0.875rem;
    }

    .card-title {
        font-size: 0.9375rem;
        line-height: 1.3;
        margin-bottom: 0.25rem;
    }

    .card-desc {
        font-size: 0.71875rem;
        line-height: 1.4;
    }

    /* Form Girişleri ve Butonlar */
    .form-group {
        margin-bottom: 0.75rem;
    }

    .form-label {
        font-size: 0.71875rem;
        margin-bottom: 0.25rem;
    }

    .form-input {
        height: 2.625rem;
        font-size: 0.8125rem;
        padding: 0 0.75rem;
    }

    .input-with-action .form-input {
        padding-right: 2.5rem;
    }

    .input-action-btn {
        right: 0.375rem;
    }

    .form-check-row {
        margin-bottom: 0.875rem;
        font-size: 0.75rem;
    }

    .btn-primary {
        height: 2.75rem;
        font-size: 0.84375rem;
        gap: 0.5rem;
    }

    .divider {
        margin: 0.875rem 0;
        font-size: 0.6875rem;
    }

    .btn-sso {
        height: 2.75rem;
        font-size: 0.8125rem;
        gap: 0.5rem;
    }

    /* Alt Bakanlık Amblemi */
    .card-bottom-emblem {
        margin-top: 1rem;
        padding-top: 0.75rem;
    }

    .card-bottom-emblem img {
        width: 180px;
    }

    /* Aktif Oturum Kartı (Durum 1) */
    .session-info-card {
        padding: 0.875rem;
        margin-bottom: 0.875rem;
    }

    .user-avatar-badge {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.9375rem;
    }

    .user-display-name {
        font-size: 0.8125rem;
    }

    .user-tckn-label {
        font-size: 0.6875rem;
    }

    .btn-secondary {
        height: 2.625rem;
        font-size: 0.8125rem;
    }

    .btn-danger-outline {
        height: 2.375rem;
        font-size: 0.75rem;
    }

    /* Modal Mobile */
    .auth-modal {
        padding: 0.75rem;
    }

    .auth-modal-card {
        padding: 1.25rem 1rem;
        border-radius: 16px;
    }

    .auth-modal-title {
        font-size: 0.9375rem;
    }

    .auth-modal-option {
        padding: 0.625rem;
    }
}

/* 10. Auth Modal Dialog (Şifremi Unuttum & Destek) */
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.auth-modal.is-active {
    opacity: 1;
    visibility: visible;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.auth-modal-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 470px;
    background: #ffffff;
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(226, 232, 240, 0.9);
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal.is-active .auth-modal-card {
    transform: scale(1);
}

.auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.125rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-divider);
}

.auth-modal-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-heading);
}

.auth-modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 8px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.auth-modal-close:hover {
    background-color: #f1f5f9;
    color: var(--text-heading);
}

.auth-modal-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.auth-modal-option {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--border-input);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.auth-modal-option:hover {
    background: #ffffff;
    border-color: var(--primary-border);
}

.auth-modal-option-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-modal-option-content {
    flex: 1;
}

.auth-modal-option-title {
    font-size: 0.84375rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.25rem;
}

.auth-modal-option-desc {
    font-size: 0.78125rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.auth-modal-support-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: rgba(254, 243, 199, 0.45);
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 10px;
    font-size: 0.75rem;
    color: #92400e;
}

.auth-modal-footer {
    margin-top: 1.25rem;
    display: flex;
    justify-content: flex-end;
}

