/*
 * Register-page-specific styles. Loaded on /register IN ADDITION to
 * auth-login.css (which provides the shared brand/skip-link/show-password/
 * caps-lock/recovery selectors).
 */

/* ---------- Password strength meter ---------- */

.auth-strength {
    margin-top: -8px;
    transition: opacity 150ms ease;
}

.auth-strength__bar {
    position: relative;
    height: 4px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.auth-strength__bar span {
    display: block;
    height: 100%;
    width: 0;
    background: #ef4444;            /* default: too weak */
    border-radius: 999px;
    transition: width 200ms ease, background-color 200ms ease;
}

.auth-strength__bar[data-strength="1"] span { width: 25%;  background: #ef4444; }
.auth-strength__bar[data-strength="2"] span { width: 50%;  background: #f59e0b; }
.auth-strength__bar[data-strength="3"] span { width: 75%;  background: #3b82f6; }
.auth-strength__bar[data-strength="4"] span { width: 100%; background: #10b981; }

.auth-strength__label {
    margin: 6px 0 0;
    font-size: 0.8rem;
    color: #6b7280;
    min-height: 1.2em;
}

.auth-strength[data-strength="1"] .auth-strength__label { color: #b91c1c; }
.auth-strength[data-strength="2"] .auth-strength__label { color: #b45309; }
.auth-strength[data-strength="3"] .auth-strength__label { color: #1d4ed8; }
.auth-strength[data-strength="4"] .auth-strength__label { color: #047857; }

/* ---------- DPDP Terms + Newsletter consent rows ---------- */

.auth-consent {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

.auth-consent__row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    line-height: 1.45;
}

.auth-consent__checkbox {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #1d4ed8;
    cursor: pointer;
}

.auth-consent__label {
    font-size: 0.85rem;
    color: #374151;
}

.auth-consent__label a {
    color: #1d4ed8;
    text-decoration: none;
}

.auth-consent__label a:hover,
.auth-consent__label a:focus-visible {
    text-decoration: underline;
    outline: none;
}

@media (prefers-color-scheme: dark) {
    .auth-strength__bar {
        background: #374151;
    }

    .auth-strength__label {
        color: #9ca3af;
    }

    .auth-consent {
        background: #1f2937;
        border-color: #374151;
    }

    .auth-consent__label {
        color: #e5e7eb;
    }

    .auth-consent__label a {
        color: #93c5fd;
    }
}
