/* App-wide rules only; page and component styles go in their scoped .razor.css (CLAUDE.md section 11).
   Fonts are self-hosted (CSP font-src 'self'): Inter and Outfit, Latin subsets, SIL Open Font License (licences beside
   the files in wwwroot/fonts). Colours come from the MudBlazor theme's variables, so dark mode follows. */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/inter-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Outfit";
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url("../fonts/outfit-latin.woff2") format("woff2");
}

html, body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--mud-palette-background, #F4F7FB);
    color: var(--mud-palette-text-primary, #172B4D);
}

/* Before the app starts (the "Loading…" screen), match the device's dark mode. */
@media (prefers-color-scheme: dark) {
    html, body {
        background: var(--mud-palette-background, #0B1726);
        color: var(--mud-palette-text-primary, #E6EDF5);
    }
}

.page {
    padding: 24px 16px 48px;
    max-width: 1120px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* A page that is mostly one form or card reads better narrower. */
.page-narrow {
    max-width: 640px;
}

/* Read by screen readers, not shown: words that a badge or icon stands for on screen. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.loading {
    padding: 16px;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: #fff4ce;
    color: #172B4D;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 16px;
}

/* Printing a tournament's results (PMP-54): the results alone, in black on white. */
.print-only {
    display: none;
}

@media print {
    body {
        background: #fff !important;
    }

    body * {
        visibility: hidden;
    }

    .print-results,
    .print-results * {
        visibility: visible;
        color: #000 !important;
    }

    .print-results {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        box-shadow: none !important;
        border: 0 !important;
    }

    .print-only {
        display: block;
    }

    .no-print,
    .print-results .no-print * {
        display: none !important;
    }
}
