/* ── auth.css ── Arena-Ice theme for Login / Register ── */

/* ─── Page shell ─────────────────────────────────────────── */
.auth-root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f5fafc;
    font-family: 'IBM Plex Mono', monospace;
    color: #0a1e3a;
}

/* ─── Brand panel (top on mobile, left on desktop) ───────── */
.auth-brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 2.5rem 1.5rem;
    overflow: hidden;
    background: linear-gradient(160deg, #004a9a 0%, #003175 60%, #002055 100%);
    flex-shrink: 0;
}

/* diagonal ice-scratch lines */
.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -38deg,
        transparent,
        transparent 55px,
        rgba(255, 255, 255, 0.04) 55px,
        rgba(255, 255, 255, 0.04) 56px
    );
    pointer-events: none;
}

/* glow pool */
.auth-brand::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 340px;
    height: 180px;
    background: radial-gradient(ellipse, rgba(0, 212, 255, 0.18) 0%, transparent 68%);
    pointer-events: none;
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

/* wordmark */
.auth-wordmark {
    display: block;
    font-family: 'Anton', sans-serif;
    font-size: clamp(2.8rem, 9vw, 4.5rem);
    line-height: 0.9;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    user-select: none;
}

.auth-wordmark-ice {
    color: #00d4ff;
    text-shadow: 0 0 22px rgba(0, 212, 255, 0.65), 0 0 60px rgba(0, 212, 255, 0.22);
}

.auth-wordmark-manager {
    color: #dceeff;
}

.auth-tagline {
    margin: 0.65rem 0 0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* ice rink schematic — hidden on mobile */
.auth-rink {
    display: none;
}

/* ─── Form panel ─────────────────────────────────────────── */
.auth-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem 2.5rem;
    gap: 1.25rem;
    background: #f5fafc;
}

/* card */
.auth-form-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: 1px solid rgba(0, 91, 172, 0.14);
    border-radius: 3px;
    padding: 1.875rem 1.5rem;
    box-shadow:
        0 0 0 1px rgba(0, 91, 172, 0.04),
        0 8px 32px rgba(0, 31, 78, 0.10);
}

/* form heading */
.auth-form-title {
    font-family: 'Anton', sans-serif;
    font-size: 1.55rem;
    font-weight: 400;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #001f4e;
    margin: 0 0 1.375rem;
    padding: 0;
    line-height: 1;
}

/* error banner */
.auth-error {
    margin-bottom: 1.125rem;
    padding: 0.625rem 0.875rem;
    background: rgba(200, 16, 46, 0.05);
    border: 1px solid rgba(200, 16, 46, 0.20);
    border-left: 3px solid #C8102E;
    border-radius: 2px;
    color: #9e0b24;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.76rem;
    line-height: 1.55;
}

/* login ↔ register switch */
.auth-switch {
    font-size: 0.76rem;
    color: #5a80a0;
    text-align: center;
    margin: 1.125rem 0 0;
    font-family: 'IBM Plex Mono', monospace;
}

.auth-switch a {
    color: #005BAC;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 91, 172, 0.28);
    padding-bottom: 1px;
    transition: color 0.15s, border-color 0.15s;
}

.auth-switch a:hover {
    color: #003f7a;
    border-color: rgba(0, 91, 172, 0.55);
}

/* footer */
.auth-footer {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.66rem;
    color: #9ab5c8;
    text-align: center;
    margin: 0;
    letter-spacing: 0.06em;
}

/* ─── MudBlazor field overrides ──────────────────────────── */

/* spacing between fields */
.auth-form-card .mud-input-control {
    margin-bottom: 0.875rem;
}

/* floating label */
.auth-form-card .mud-input-label,
.auth-form-card .mud-input-label.mud-input-label-animated {
    color: #5a80a0 !important;
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 0.79rem !important;
}

/* border ring */
.auth-form-card .mud-notched-outline {
    border-color: rgba(0, 91, 172, 0.22) !important;
    border-radius: 2px !important;
    transition: border-color 0.18s !important;
}

.auth-form-card .mud-input:hover:not(.mud-disabled) .mud-notched-outline {
    border-color: rgba(0, 91, 172, 0.45) !important;
}

.auth-form-card .mud-input.mud-input-focused .mud-notched-outline {
    border-color: #005BAC !important;
    box-shadow: 0 0 0 1px rgba(0, 91, 172, 0.15) inset !important;
}

.auth-form-card .mud-input.mud-input-focused .mud-input-label {
    color: #005BAC !important;
}

/* legend notch (font-size must match label to keep gap right) */
.auth-form-card .mud-notched-outline-legend span {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.69rem;
}

/* typed text */
.auth-form-card .mud-input-slot,
.auth-form-card .mud-input-slot.mud-input-root {
    color: #0a1e3a !important;
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 0.875rem !important;
    caret-color: #005BAC;
    background: transparent !important;
}

/* autofill — prevent browser yellow/white flash */
.auth-form-card input:-webkit-autofill,
.auth-form-card input:-webkit-autofill:focus,
.auth-form-card input:-webkit-autofill:hover {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #0a1e3a !important;
    caret-color: #005BAC;
}

/* select input text */
.auth-form-card .mud-select-input .mud-input-root {
    color: #0a1e3a !important;
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 0.875rem !important;
}

/* helper / validation text */
.auth-form-card .mud-input-helper-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.69rem;
    color: #5a80a0;
}

/* error state */
.auth-form-card .mud-input-error .mud-notched-outline {
    border-color: rgba(200, 16, 46, 0.40) !important;
}

.auth-form-card .mud-input-error .mud-input-label {
    color: #C8102E !important;
}

.auth-form-card .mud-input-error .mud-input-helper-text {
    color: #a80e26 !important;
}

/* submit button */
.auth-form-card .mud-button-root.mud-button-filled-primary {
    background: linear-gradient(135deg, #0068c8 0%, #004a9a 100%) !important;
    color: #ffffff !important;
    font-family: 'Anton', sans-serif !important;
    font-size: 0.92rem !important;
    letter-spacing: 0.13em !important;
    border-radius: 2px !important;
    height: 50px !important;
    margin-top: 0.375rem;
    transition: box-shadow 0.2s ease, transform 0.1s ease !important;
    box-shadow: 0 2px 16px rgba(0, 91, 172, 0.20) !important;
}

.auth-form-card .mud-button-root.mud-button-filled-primary:hover:not(:disabled) {
    box-shadow: 0 4px 24px rgba(0, 91, 172, 0.38), 0 2px 12px rgba(0, 31, 78, 0.18) !important;
    transform: translateY(-1px) !important;
}

.auth-form-card .mud-button-root.mud-button-filled-primary:active:not(:disabled) {
    transform: translateY(0) !important;
    box-shadow: 0 2px 10px rgba(0, 91, 172, 0.18) !important;
}

.auth-form-card .mud-button-root.mud-button-filled-primary:disabled {
    background: rgba(0, 91, 172, 0.10) !important;
    color: #9ab5c8 !important;
    box-shadow: none !important;
}

/* ─── MudSelect popover (portalled — scoped via PopoverClass) */
.auth-select-popup {
    background: #ffffff !important;
    border: 1px solid rgba(0, 91, 172, 0.14) !important;
    border-radius: 2px !important;
    box-shadow: 0 8px 30px rgba(0, 31, 78, 0.14) !important;
}

.auth-select-popup .mud-list-item,
.auth-select-popup .mud-list-item-text {
    color: #0a1e3a !important;
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 0.83rem !important;
}

.auth-select-popup .mud-list-item-clickable:hover {
    background: rgba(0, 91, 172, 0.07) !important;
}

.auth-select-popup .mud-list-item.mud-selected-item {
    background: rgba(0, 91, 172, 0.10) !important;
    color: #005BAC !important;
}

/* ─── Desktop ≥ 768 px ────────────────────────────────────── */
@media (min-width: 768px) {
    .auth-root {
        flex-direction: row;
    }

    .auth-brand {
        width: 42%;
        min-height: 100vh;
        align-items: flex-end;
        justify-content: flex-start;
        padding: 3.5rem 3rem 4.5rem;
    }

    .auth-brand::after {
        bottom: auto;
        top: 44%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 440px;
        height: 440px;
    }

    .auth-brand-inner {
        text-align: left;
    }

    .auth-wordmark {
        font-size: clamp(3rem, 4.5vw, 5rem);
    }

    .auth-tagline {
        font-size: 0.72rem;
        margin-top: 0.875rem;
    }

    /* ice rink schematic */
    .auth-rink {
        display: block;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 210px;
        height: 310px;
        opacity: 0.14;
        pointer-events: none;
    }

    .auth-rink-oval {
        position: absolute;
        inset: 0;
        border: 2px solid #ffffff;
        border-radius: 72px;
    }

    .auth-rink-center-line {
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 2px;
        background: #C8102E;
        transform: translateY(-50%);
    }

    .auth-rink-center-dot {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #C8102E;
    }

    .auth-rink-center-circle {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 68px;
        height: 68px;
        border-radius: 50%;
        border: 2px solid #C8102E;
    }

    .auth-rink-zone-line-top {
        position: absolute;
        top: 28%;
        left: 0;
        right: 0;
        height: 2px;
        background: rgba(255, 255, 255, 0.85);
    }

    .auth-rink-zone-line-bottom {
        position: absolute;
        top: 72%;
        left: 0;
        right: 0;
        height: 2px;
        background: rgba(255, 255, 255, 0.85);
    }

    .auth-form-panel {
        flex: 1;
        padding: 2rem 3rem;
    }

    .auth-form-card {
        padding: 2.5rem 2.25rem;
    }

    .auth-form-title {
        font-size: 1.75rem;
    }
}
