html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.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;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ──── App Tabs: unified tab look across the app (pages + dialogs) ──── */
/* Apply Class="app-tabs" on every MudTabs instance. Edit this block to restyle all tabs. */
.app-tabs .mud-tab {
    color: #333 !important;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: background 0.18s ease, color 0.18s ease;
    min-height: 44px;
}

.app-tabs .mud-tab .mud-icon-root {
    color: inherit !important;
    font-size: 1.1rem;
}

.app-tabs .mud-tab:hover:not(.mud-tab-active) {
    color: #000 !important;
    background: rgba(0, 0, 0, 0.035);
}

.app-tabs .mud-tab.mud-tab-active {
    color: #000 !important;
    background: rgba(255, 201, 4, 0.12) !important;
    font-weight: 700;
}

.app-tabs .mud-tab.mud-tab-active .mud-icon-root {
    color: var(--mud-palette-primary) !important;
}

.app-tabs .mud-tab-slider {
    height: 4px !important;
    background: var(--mud-palette-primary) !important;
}

/* Modifier: stabilize content-panel height so switching tabs doesn't jump the page. */
/* Short tabs pad up to the min-height; tall tabs still expand naturally. */
.app-tabs-expand .mud-tabs-panels {
    min-height: 650px;
}

/* ──── Dialog actions wrap ──── */
/* Apply ActionsClass="dialog-actions-wrap" on dialogs that have too many action
   buttons to fit one row on narrow viewports. Buttons wrap to additional rows;
   `mr-auto` still pushes a left-aligned button in the first row. */
.dialog-actions-wrap {
    flex-wrap: wrap !important;
    gap: 6px;
    row-gap: 6px;
}

    .dialog-actions-wrap > .mud-button-root {
        margin: 0 !important;
    }

/* ──── Evaluation profile dialog body ──── */
/* Keeps PlayerEvaluationProfileDialog at a consistent height as the user pages
   through evaluations with prev/next chevrons — short ones pad to min-height,
   long ones scroll within the dialog instead of growing it. On mobile the
   dialog is full-screen, so the height constraint is removed there. */
.eval-profile-body {
    min-height: 360px;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
}

@media (max-width: 599.95px) {
    .eval-profile-body {
        min-height: 0;
        max-height: none;
        overflow-y: visible;
    }
}

/* ──── Evaluation help-text rich content ──── */
/* Used by EvaluationQuestionRenderer (fill page) and inside MudTooltip overlays
   for the profile dialog. Tooltip popovers render outside scoped CSS, so these
   rules are global. */
.eval-help-rich {
    font-size: 0.875rem;
    line-height: 1.4;
    text-align: left;
}

.eval-help-rich p {
    margin: 0 0 0.4rem 0;
}

.eval-help-rich p:last-child {
    margin-bottom: 0;
}

.eval-help-rich ol,
.eval-help-rich ul {
    padding-inline-start: 1.25rem;
    margin: 0.25rem 0 0.5rem 0;
}

.eval-help-rich li {
    margin-bottom: 0.15rem;
}

/* ──── ApexCharts tooltip flicker workaround ──── */
/* The default ApexCharts tooltip uses a CSS opacity transition. Under Blazor
   Server, hover-driven repaints can restart that transition mid-frame, producing
   a strobe/flicker loop. Killing the transitions makes the tooltip appear/hide
   discretely with no visual artifacts. */
.apexcharts-tooltip,
.apexcharts-xaxistooltip,
.apexcharts-yaxistooltip {
    transition: none !important;
}

.apexcharts-tooltip.apexcharts-active {
    opacity: 1 !important;
}

/* ──── PlayerResultsDrillDownDialog header & mobile fullscreen ──── */
.results-drilldown-header {
    position: relative;
    background: linear-gradient(135deg, var(--mud-palette-primary-hover) 0%, transparent 65%);
    border-bottom: 3px solid var(--mud-palette-primary);
    border-radius: 4px;
}

/* Variable-content scroll area: pin the body to a fixed height so the dialog
   does not jump as the user navigates between players with different evaluator
   counts. Content shorter than the available space simply leaves whitespace;
   longer content scrolls inside the body. */
.results-drilldown-body {
    height: calc(100vh - 280px);
    overflow-y: auto;
}

@media (max-width: 599.95px) {
    /* Fullscreen the dialog edge-to-edge on phones */
    .mud-dialog.results-drilldown-dialog {
        max-width: 100% !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    /* Drop the absolute-centered pager so it doesn't collide with CLOSE */
    .results-drilldown-actions {
        justify-content: space-between !important;
    }
    .results-drilldown-pager {
        position: static !important;
        transform: none !important;
    }

    /* On the full-screen mobile dialog let the body flow naturally */
    .results-drilldown-body {
        height: auto;
        overflow-y: visible;
    }
}

/* ──── Agents — mobile ──── */
/* AgentProfileDialog tab panels: capped on desktop so tab content scrolls inside
   a fixed-height region; on phone the dialog goes full-screen and the panel
   should expand naturally (no nested scroll inside the already-tall dialog). */
.agent-tab-panel {
    height: 350px;
    overflow-y: auto;
}

/* AgentSelectDialog results table container: capped on desktop so the picker
   stays compact; on phone we use a viewport-relative cap so the list adapts to
   landscape vs portrait without overflowing the dialog. */
.agent-select-results {
    max-height: 300px;
    overflow: auto;
    border: 1px solid var(--mud-palette-divider);
    border-radius: 4px;
}

@media (max-width: 599.95px) {
    .agent-tab-panel {
        height: auto;
        overflow-y: visible;
    }

    .agent-select-results {
        max-height: 55vh;
    }

    /* AgentEdit Section 1 (Name & Agency): stack avatar above the form fields
       on phones so the form column gets the full width. */
    .agent-edit-namebar {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .agent-edit-namebar > .agent-edit-namebar-avatar {
        width: 100% !important;
    }
}
