/* Global settings */
html {
    scrollbar-gutter: stable;
}

/* Home page - equal height cards per row */
.home-grid {
    align-items: stretch;
}

.home-grid>.mud-grid-item {
    display: flex;
}

.home-grid>.mud-grid-item>.mud-card {
    width: 100%;
}

/* Authentication pages */
.login-container {
    min-height: 80vh;
}

.login-card {
    width: 100%;
    max-width: 25rem;
}

.fw-bold {
    font-weight: 700;
}

/* Theme loader - prevents flashbang on load */
.theme-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    background-color: #FFFFFF;
    /* White */
}

@media (prefers-color-scheme: dark) {
    .theme-loader {
        background-color: #1E2A30;
        /* Dark Background */
    }
}

/* Cloudflare Stream video embeds */
.cf-stream-video,
.content-body iframe[src*="cloudflarestream.com"],
.tiptap-editor-host iframe[src*="cloudflarestream.com"] {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 8px;
    margin: 1.5rem 0;
    background: #000;
}

/* Quiz options - force vertical layout */
.quiz-options-vertical .mud-radio-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}

.quiz-options-vertical .mud-radio {
    margin-bottom: 0.25rem;
}

.quiz-option-item {
    display: block;
    margin-bottom: 0.75rem;
}

/* Blazor Reconnect Modal Styles - Uses MudBlazor CSS variables for automatic theme support */
#components-reconnect-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2000;
    background-color: var(--mud-palette-background-grey, rgba(0, 0, 0, 0.5));
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

#components-reconnect-modal.components-reconnect-show {
    display: flex;
}

/* The inner dialog box */
#components-reconnect-modal .components-reconnect-dialog {
    background-color: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    padding: 2rem 3rem;
    border-radius: 0.5rem;
    box-shadow: var(--mud-elevation-8);
}

/* Text inside the dialog */
#components-reconnect-modal .components-reconnect-dialog p {
    font-weight: 500;
    margin: 0.5rem 0;
    color: var(--mud-palette-text-primary);
}

/* Retry button */
#components-reconnect-modal .components-reconnect-dialog button {
    color: var(--mud-palette-primary);
    background: none;
    border: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 0.5rem;
}

#components-reconnect-modal .components-reconnect-dialog button:hover {
    color: var(--mud-palette-primary-darken);
}

/* Loading animation dots - theme-aware colors */
#components-reconnect-modal .components-rejoining-animation>div {
    background-color: var(--mud-palette-primary) !important;
}

/* Specific state visibility */
#components-reconnect-modal .show {
    display: block;
}

#components-reconnect-modal .hide {
    display: none;
}

/* Footer styles - using MudBlazor CSS variables to avoid inline styles */
.mud-appbar-background {
    background-color: var(--mud-palette-appbar-background);
}

.mud-border-secondary {
    border-color: var(--mud-palette-secondary) !important;
}