/* ==========================================================
   wtz-auth-modal.css
   Styling for the single reusable Sign In / Sign Up / Forgot /
   Reset password modal. Uses ONLY tokens already defined in
   Generic.css (--color-*, --fs-*, --fw-*, --radius-*, --spacing-*,
   --shadow-*) — no new hardcoded values, no duplicate tokens.
   ========================================================== */

.wtz-auth-modal .modal-dialog {
    max-width: 760px;
}

.wtz-auth-content {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    border: none;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    max-height: 88vh;
}

.wtz-auth-close {
    position: absolute;
    top: var(--spacing-3);
    right: var(--spacing-3);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-bg-white);
    color: var(--color-text-primary);
    font-size: var(--fs-sm);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- LEFT visual panel ---- */
.wtz-auth-visual {
    position: relative;
    background: linear-gradient(180deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.75) 100%), url('../../theme/assets/img/login/login.png') center/cover no-repeat;
    color: var(--color-bg-white);
    padding: var(--spacing-6) var(--spacing-5);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.wtz-auth-welcome {
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    color: var(--color-bg-white);
    margin: 0;
}

.wtz-auth-script {
    display: block;
    color: var(--color-brand);
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
    margin-top: 2px;
}

.wtz-auth-rule {
    width: 86px;
    height: 3px;
    background: var(--color-brand);
    border: none;
    margin: var(--spacing-3) 0;
}

.wtz-auth-visual p {
    font-size: var(--fs-xs);
    line-height: var(--lh-relaxed);
    color: rgba(255,255,255,0.82);
    max-width: 220px;
    margin: 0;
}

/* ---- RIGHT form column ---- */
.wtz-auth-right {
    display: flex;
    flex-direction: column;
    max-height: 88vh;
    overflow-y: auto;
}

.wtz-auth-form-col {
    padding: var(--spacing-6) var(--spacing-6) var(--spacing-4);
}

.wtz-auth-title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
    margin: 0 0 2px;
    line-height: var(--lh-tight);
    color: var(--color-text-primary);
}

.wtz-auth-desc {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    margin: var(--spacing-4);
    line-height: var(--lh-base);
}

.wtz-auth-alert {
    font-size: var(--fs-xs);
    color: var(--color-brand);
    background: rgba(255, 49, 49, 0.08);
    border: 1px solid rgba(255, 49, 49, 0.25);
    border-radius: var(--radius-btn);
    padding: var(--spacing-2) var(--spacing-3);
    margin-bottom: var(--spacing-3);
}

.wtz-auth-oauth-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    padding: var(--spacing-2) var(--spacing-4);
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-btn);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    color: var(--color-text-primary);
    text-decoration: none !important;
}

.wtz-auth-divider {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    margin: var(--spacing-3) 0;
    font-size: var(--fs-2xs);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.wtz-auth-divider::before, .wtz-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.wtz-auth-field { margin-bottom: var(--spacing-3); }
.wtz-auth-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-3); }

.wtz-auth-field label {
    display: block;
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    margin: 0 0 var(--spacing-1);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text-secondary);
}

.wtz-auth-input-wrap { position: relative; }

.wtz-auth-input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-btn);
    padding: 6px var(--spacing-3);
    font-size: var(--fs-xs);
    font-weight: var(--fw-normal);
    font-family: var(--ff-primary);
    color: var(--color-text-primary);
    outline: none;
    background: var(--color-bg-white);
}
.wtz-auth-input:focus {
    border-color: var(--color-text-primary);
}
.wtz-auth-input::placeholder { color: var(--color-text-secondary); opacity: .6; }

.wtz-auth-pw-input { padding-right: var(--spacing-8); }

.wtz-auth-pw-toggle {
    position: absolute;
    right: var(--spacing-3);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    cursor: pointer;
    font-size: var(--fs-sm);
}

.wtz-auth-field-error {
    display: block;
    font-size: var(--fs-xs);
    color: var(--color-brand);
    margin: var(--spacing-1);
}

.wtz-auth-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 var(--spacing-3);
    font-size: var(--fs-xs);
}

.wtz-auth-remember {
    display: flex;
    align-items: center;
    gap: var(--spacing-1);
    color: var(--color-text-secondary);
    font-weight: var(--fw-normal);
    font-size: var(--fs-xs);
    margin: 0;
}

.wtz-auth-link, .wtz-auth-link-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--ff-primary);
    font-size: var(--fs-xs);
    color: var(--color-brand);
    font-weight: var(--fw-medium) !important;
    cursor: pointer;
}
.wtz-auth-link-btn { margin-left: 4px; }

.wtz-auth-submit {
    width: 100%;
    padding: var(--spacing-3);
    background: var(--color-brand);
    color: var(--color-bg-white);
    border: none;
    border-radius: var(--radius-btn);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    cursor: pointer;
    margin-bottom: var(--spacing-3);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
}
.wtz-auth-submit:disabled { opacity: .5; cursor: not-allowed; }

.wtz-auth-footer {
    text-align: center;
    font-size: var(--fs-xs);
    color: var(--color-text-secondary);
    margin: 0;
}

.wtz-auth-back {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    margin: 0 auto;
    background: none;
    border: none;
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    font-family: var(--ff-primary);
    cursor: pointer;
}
.wtz-auth-back:hover { color: var(--color-brand); }

.wtz-auth-icon-badge {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 49, 49, 0.1);
    color: var(--color-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-lg);
    margin-bottom: var(--spacing-3);
}
.wtz-auth-icon-success { background: rgba(31, 162, 84, 0.12); color: #1fa254; }
.wtz-auth-centered .wtz-auth-icon-badge { margin-left: auto; margin-right: auto; }

.wtz-auth-email-echo { font-weight: var(--fw-semibold); color: var(--color-text-primary); }

.wtz-auth-strength { display: flex; gap: 5px; margin: var(--spacing-2) 0 4px; }
.wtz-auth-strength span { height: 4px; flex: 1; border-radius: 2px; background: var(--color-border); }
.wtz-auth-strength.weak span:nth-child(1) { background: var(--color-brand); }
.wtz-auth-strength.medium span:nth-child(1), .wtz-auth-strength.medium span:nth-child(2) { background: #e0a52d; }
.wtz-auth-strength.strong span { background: #1fa254; }
.wtz-auth-strength-label { font-size: var(--fs-2xs); color: var(--color-text-secondary); margin: 0 0 var(--spacing-1); }

.wtz-auth-match-note { font-size: var(--fs-2xs); margin: var(--spacing-1) 0 0; color: var(--color-text-secondary); }
.wtz-auth-match-note.ok { color: #1fa254; }
.wtz-auth-match-note.bad { color: var(--color-brand); }

.wtz-auth-terms {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-2);
    font-family: var(--ff-primary);
    font-size: var(--fs-xs);
    font-weight: var(--fw-normal);
    color: var(--color-text-secondary);
    line-height: var(--lh-base);
    margin: var(--spacing-2) 0 var(--spacing-3);
    cursor: pointer;
}

    .wtz-auth-terms input[type="checkbox"] {
        margin-top: 2px;
        flex-shrink: 0;
    }

    .wtz-auth-terms a {
        font-weight: var(--fw-medium);
        color: var(--color-brand);
        text-decoration: none;
    }

        .wtz-auth-terms a:hover {
            text-decoration: underline;
        }

/* pane visibility */
.wtz-auth-pane { display: none; text-align: left; }
.wtz-auth-pane.active { display: block; }
.wtz-auth-pane.wtz-auth-centered.active { display: flex; flex-direction: column; }

@media (max-width: 680px) {
    .wtz-auth-content { grid-template-columns: 1fr; max-height: 92vh; }
    .wtz-auth-visual { display: none; }
    .wtz-auth-two-col { grid-template-columns: 1fr; }
}