h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Custom IZZY Brand Colors */
/* --- IZZY Brand & Theme Variables --- */
:root {
    --izzy-blue: #4f8fdf;
    --izzy-blue-glow: rgba(79, 143, 223, 0.4);
    --izzy-bg-dark: #08131d;
    --izzy-card-bg: rgba(255, 255, 255, 0.05);
    --izzy-border: rgba(255, 255, 255, 0.14);
    --izzy-text-main: #f4f7fb;
    --izzy-text-muted: #c6d3e0;
    --radius-compact: 12px;
}

/* --- Global Layout & Background --- */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    background: radial-gradient(circle at top left, rgba(79, 143, 223, 0.18), transparent 40%), radial-gradient(circle at bottom right, rgba(126, 177, 240, 0.12), transparent 30%), linear-gradient(145deg, #09131d 0%, #0d1c2a 60%, #102338 100%);
    color: var(--izzy-text-main);
    min-height: 100vh;
}

/* --- Compact Form Container --- */
.izzy-form-container.compact-form {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 24px;
    border: 1px solid var(--izzy-border);
    padding: 2.5rem 3.5rem;
    max-width: 850px; /* Overall card width */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    margin-top: 1rem;
}

/* --- Component Width Unification --- */
/* Ensures email input and selection cards calculate width identically */
.izzy-input,
.izzy-option-card-compact {
    box-sizing: border-box;
    width: 100%;
}

/* --- Typography --- */
.fw-black {
    font-weight: 900;
}

.text-secondary {
    color: var(--izzy-text-muted) !important;
}

.extra-small {
    font-size: 0.75rem !important;
}

/* --- Email Input Field --- */
.izzy-input {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid var(--izzy-border) !important;
    border-radius: 8px !important;
    color: white !important;
    padding: 12px 16px !important;
    font-size: 1rem;
    transition: all 0.2s ease;
}

    .izzy-input:focus {
        background: rgba(255, 255, 255, 0.12) !important;
        border-color: var(--izzy-blue) !important;
        box-shadow: 0 0 0 4px rgba(79, 143, 223, 0.2);
        outline: none;
    }

/* --- Selection List & Cards --- */
.izzy-selection-list-compact {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Vertical gap between cards */
    width: 100%;
}

.izzy-option-card-compact {
    display: flex;
    align-items: center;
    background: var(--izzy-card-bg);
    border: 1px solid var(--izzy-border);
    border-radius: var(--radius-compact);
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-align: left;
}

    .izzy-option-card-compact:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.3);
    }

    .izzy-option-card-compact.active {
        border-color: var(--izzy-blue);
        background: rgba(79, 143, 223, 0.12);
        box-shadow: inset 0 0 0 1px rgba(126, 177, 240, 0.2);
    }

/* Card Text Styling */
.option-title-compact {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.option-desc-compact {
    display: block;
    color: var(--izzy-text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* --- Custom Radio/Checkbox Circle --- */
.izzy-radio-hidden {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: var(--izzy-blue);
    cursor: pointer;
}

/* --- Horizontal Spacing (Radio to Text) --- */
.ms-4 {
    margin-left: 1.5rem !important;
}

/* --- Bottom Actions Area --- */
.actions-area-compact {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Action Button --- */
.izzy-btn-pill {
    appearance: none;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #67a3ee, #4f8fdf);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 14px 40px;
    box-shadow: 0 10px 25px var(--izzy-blue-glow);
    transition: all 0.2s ease;
}

    .izzy-btn-pill:hover {
        transform: translateY(-2px);
        box-shadow: 0 15px 30px rgba(79, 143, 223, 0.4);
    }

    .izzy-btn-pill:active {
        transform: translateY(0);
    }

/* --- Responsive Polish --- */
@media (max-width: 768px) {
    .izzy-form-container.compact-form {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
}

.mt-6 {
    margin-top: 4rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.text-danger.extra-small {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ff6b6b !important; /* A softer, high-end red */
    display: block;
    margin-left: 4px;
    /* Subtle entrance animation */
    animation: fadeIn 0.3s ease-in;
}

/* Optional: Highlight the input border red on error */
.invalid {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.15) !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.invalid {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.15) !important;
}

/* --- Success State Animation --- */
.animate-success {
    animation: scaleIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Busy State Polish --- */
.izzy-btn-pill:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important; /* Disable hover lift while saving */
    background: linear-gradient(180deg, #5a8bc7, #3d6fb1);
}

/* Ensure the spinner matches the white text */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

.izzy-input-readonly {
    background: rgba(255, 255, 255, 0.03) !important; /* Darker/More transparent */
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--izzy-text-muted) !important;
    cursor: not-allowed; /* The universal 'locked' signal */
    box-shadow: none !important;
}

/* Optional: Subtle lock icon positioning */
.input-icon-container {
    position: relative;
}

.input-icon-container i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--izzy-text-muted);
    opacity: 0.5;
    font-size: 0.9rem;
}