/*
 * auth.css — Authentication page styles
 * Derived from Stitch SDK design generation for EMT Ace login/register screens.
 * Uses CSS variables from quiz-theme.css where possible.
 */

/* Google Fonts loaded via <link> in Razor @section Styles to avoid @import waterfall */

/* ─── Auth Shell (replaces quiz-shell for auth pages) ─── */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #1a1a2e;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #e1e2eb;
}

/* ─── Card ─── */
.auth-card {
    width: 100%;
    max-width: 480px;
    background: #1e2a3a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* ─── Header ─── */
.auth-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-brand .material-symbols-outlined {
    font-size: 20px;
    color: #e1e2eb;
    font-variation-settings: 'FILL' 1;
}

.auth-brand h1 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #e1e2eb;
    margin: 0;
}

.auth-subtitle {
    font-size: 14px;
    color: #8c919e;
    margin: 0;
}

/* ─── Error Banner ─── */
.auth-error-banner {
    background: #2e1414;
    border: 1px solid #e52525;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.auth-error-banner .material-symbols-outlined {
    color: #ff6b6b;
    font-size: 18px;
    flex-shrink: 0;
    font-variation-settings: 'FILL' 1;
}

.auth-error-banner p {
    font-size: 13px;
    color: #ff6b6b;
    margin: 0;
    margin-top: 1px;
}

/* ─── Form ─── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ─── Field Group ─── */
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auth-field label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #c2c6d5;
}

.auth-field label .optional {
    opacity: 0.6;
    text-transform: none;
    font-weight: 400;
}

.auth-field input {
    width: 100%;
    background: #243042;
    border: 1px solid #424752;
    border-radius: 8px;
    padding: 10px 16px;
    color: #e1e2eb;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.auth-field input::placeholder {
    color: #8c919e;
}

.auth-field input:focus {
    border-color: #5a9aff;
    box-shadow: 0 0 0 1px #5a9aff;
}

.auth-field input.field-error {
    border-color: #e52525;
}

.auth-field input.field-error:focus {
    border-color: #e52525;
    box-shadow: 0 0 0 1px #e52525;
}

/* ─── Password wrapper (for eye toggle) ─── */
.auth-password-wrap {
    position: relative;
}

.auth-password-wrap input {
    padding-right: 40px;
}

.auth-password-wrap .toggle-visibility {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #8c919e;
    transition: color 0.15s;
    display: flex;
    align-items: center;
}

.auth-password-wrap .toggle-visibility:hover {
    color: #e1e2eb;
}

.auth-password-wrap .toggle-visibility .material-symbols-outlined {
    font-size: 20px;
}

/* ─── Password Label Row (label + forgot password) ─── */
.auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-forgot-link {
    font-size: 13px;
    color: #5a9aff;
    text-decoration: none;
    transition: color 0.15s;
}

.auth-forgot-link:hover {
    color: #abc7ff;
}

/* ─── Field Hint / Inline Error ─── */
.auth-field-hint {
    font-size: 13px;
    color: #c2c6d5;
    margin-top: 4px;
}

.auth-field-error {
    font-size: 13px;
    color: #ff6b6b;
    margin-top: 4px;
}

/* ─── Primary Button ─── */
.auth-btn-primary {
    width: 100%;
    background: #5a9aff;
    color: #003169;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    transition: background-color 0.15s;
    margin-top: 8px;
    box-shadow: 0 0 12px rgba(90, 154, 255, 0.2);
}

.auth-btn-primary:hover {
    background: #6ba8ff;
}

.auth-btn-primary:focus-visible {
    outline: 2px solid #5a9aff;
    outline-offset: 2px;
}

/* ─── Divider ─── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #424752;
}

.auth-divider span {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #c2c6d5;
    flex-shrink: 0;
}

/* ─── Google Button ─── */
.auth-btn-google {
    width: 100%;
    background: transparent;
    border: 1px solid #424752;
    border-radius: 8px;
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #e1e2eb;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background-color 0.15s;
}

.auth-btn-google:hover {
    background: #32353b;
}

.auth-btn-google:focus-visible {
    outline: 2px solid #5a9aff;
    outline-offset: 2px;
}

.auth-btn-google svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ─── Footer Link ─── */
.auth-footer {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    color: #c2c6d5;
}

.auth-footer a {
    color: #5a9aff;
    font-weight: 500;
    font-size: 18px;
    text-decoration: none;
    transition: color 0.15s;
}

.auth-footer a:hover {
    color: #abc7ff;
    text-decoration: underline;
}

/* ─── Responsive ─── */
@media (max-width: 520px) {
    .auth-card {
        padding: 24px 20px;
        gap: 20px;
    }
}
