/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

/* ── vscode-elements theme variables (light) ─────────────────
   Without these the web components render completely unstyled
   because they expect VS Code to inject them.               */
:root {
    color-scheme: light;
    --site-accent: #aa1d47;
    --site-accent-hover: #c32353;
    --site-accent-soft: #aa1d4733;

    --vscode-font-family: 'Symbols', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --vscode-font-size: 13px;
    --vscode-font-weight: normal;

    --vscode-foreground: #323130;
    --vscode-background: #ffffff;
    --vscode-disabledForeground: rgba(50, 49, 48, 0.4);
    --vscode-errorForeground: #a4262c;
    --vscode-descriptionForeground: #605e5c;
    --vscode-focusBorder: var(--site-accent);
    --vscode-selection-background: var(--site-accent-soft);

    --vscode-textLink-foreground: var(--site-accent);
    --vscode-textLink-activeForeground: var(--site-accent-hover);
    --vscode-textPreformat-foreground: #a31515;
    --vscode-textPreformat-background: rgba(0, 0, 0, 0.06);

    --vscode-button-background: var(--site-accent);
    --vscode-button-foreground: #ffffff;
    --vscode-button-hoverBackground: var(--site-accent-hover);
    --vscode-button-secondaryBackground: #edebe9;
    --vscode-button-secondaryForeground: #323130;
    --vscode-button-secondaryHoverBackground: #e1dfdd;
    --vscode-button-separator: rgba(255, 255, 255, 0.35);
    --vscode-button-border: transparent;

    --vscode-input-background: #ffffff;
    --vscode-input-foreground: #323130;
    --vscode-input-border: #8a8886;
    --vscode-input-placeholderForeground: #a19f9d;

    --vscode-table-border: #edebe9;
    --vscode-table-columnsBorder: #edebe9;
    --vscode-table-headerBackground: #f3f2f1;
    --vscode-table-headerForeground: #201f1e;
    --vscode-table-rowHoverBackground: #f3f2f1;

    --vscode-badge-background: var(--site-accent);
    --vscode-badge-foreground: #ffffff;

    --vscode-scrollbarSlider-background: rgba(0, 0, 0, 0.12);
    --vscode-scrollbarSlider-hoverBackground: rgba(0, 0, 0, 0.22);
    --vscode-scrollbarSlider-activeBackground: rgba(0, 0, 0, 0.36);
    --vscode-scrollbar-shadow: rgba(0, 0, 0, 0.1);

    --vscode-widget-border: #edebe9;
    --vscode-widget-shadow: rgba(0, 0, 0, 0.12);

    --vscode-checkbox-background: #ffffff;
    --vscode-checkbox-foreground: #323130;
    --vscode-checkbox-border: #8a8886;
    --vscode-checkbox-selectBackground: var(--site-accent);
    --vscode-checkbox-selectBorder: var(--site-accent);

    --vscode-dropdown-background: #ffffff;
    --vscode-dropdown-foreground: #323130;
    --vscode-dropdown-border: #8a8886;
    --vscode-dropdown-listBackground: #ffffff;
}

/* ── Base ───────────────────────────────────────────────────── */
html, body {
    margin: 0;
    padding: 0;
    font-family: var(--vscode-font-family);
    font-size: 16px;
    color: #323130;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px;
    line-height: 1.25;
}

h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px;
}

p {
    line-height: 1.65;
    margin: 0 0 16px;
    color: #605e5c;
}

a {
    color: var(--site-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1:focus {
    outline: none;
}

/* ── Form validation ────────────────────────────────────────── */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #107c10;
}

.invalid {
    outline: 1px solid #a4262c;
}

.validation-message {
    color: #a4262c;
    font-size: 13px;
    margin-top: 4px;
}

/* ── Loading overlay ────────────────────────────────────────── */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    height: 100%;
    width: 100%;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.loading-overlay--hidden {
    opacity: 0;
}

.loading-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at 20% 20%, #f4f9ff 0%, #ffffff 55%, #eef6ff 100%);
}

.loading-model {
    width: min(560px, 100%);
    height: min(560px, 72vh);
}

/* ── Error boundary ─────────────────────────────────────────── */
.blazor-error-boundary {
    background: #fff4ce;
    border-left: 4px solid #d83b01;
    padding: 16px 16px 16px 20px;
    color: #323130;
    margin: 16px 0;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
    display: block;
    font-weight: 600;
    color: #d83b01;
}

.min-p {
    font-family: var(--vscode-font-family), "Symbols";
    font-size: var(--vscode-font-size, 13px);
}
