/* ==========================================================================
   Pokerpetitie - algemene huisstijl
   --------------------------------------------------------------------------
   Alle kleuren, breedtes, ruimtes en radii staan als custom properties in
   :root. De huisstijl is daardoor op één plek aan te passen.
   Componentspecifieke opmaak staat in de bijbehorende .razor.css bestanden.
   ========================================================================== */

:root {
    /* Kleuren ------------------------------------------------------------- */
    --color-background: #faf7f3;
    /* warm gebroken wit */
    --color-surface: #ffffff;
    /* kaarten en formulieren */
    --color-surface-cream: #fbf3dd;
    /* informatievlakken */
    --color-text: #47102a;
    /* donker bordeaux: primaire tekst */
    --color-text-muted: #7d6470;
    /* secundaire tekst */
    --color-bordeaux: #7c1f3f;
    /* primaire actiekleur */
    --color-bordeaux-dark: #5c1630;
    /* hover en statusbalk */
    --color-bordeaux-accent: #a8446a;
    /* lichtere bordeaux voor accenten */
    --color-bordeaux-soft: #f7eef1;
    /* zachte achtergrondtint */
    --color-gold: #e0ad35;
    /* klein accent */
    --color-line: #e8dfd7;
    /* subtiele scheidingslijnen */
    --color-line-strong: #dcc9c4;
    /* randen van invoervelden */
    --color-danger: #a4162b;
    /* foutmeldingen */

    /* Typografie ---------------------------------------------------------- */
    --font-sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
        "Helvetica Neue", Arial, sans-serif;
    --text-xs: 0.8125rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.375rem;
    --text-2xl: 1.75rem;
    --text-display: clamp(2.5rem, 1.35rem + 4vw, 4rem);
    --line-height: 1.6;
    --line-height-tight: 1.1;

    /* Breedtes en ruimte -------------------------------------------------- */
    --container-width: 1240px;
    --container-padding: 1.25rem;
    --space-2xs: 0.25rem;
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Vorm ---------------------------------------------------------------- */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --shadow-card: 0 20px 45px -32px rgba(71, 16, 42, 0.45);
    --transition: 150ms ease;
    --focus-ring: 0 0 0 3px rgba(124, 31, 63, 0.22);

    color-scheme: light;
}

@media (min-width: 48rem) {
    :root {
        --container-padding: 2.5rem;
    }
}

/* Reset ------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--line-height);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
figure,
ul,
ol {
    margin: 0;
}

ul,
ol {
    padding-left: 1.25rem;
}

img,
svg {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

/* Typografie -------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: var(--line-height-tight);
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--text-display);
    letter-spacing: -0.035em;
}

h2 {
    font-size: var(--text-2xl);
}

h3 {
    font-size: var(--text-xl);
}

a {
    color: var(--color-bordeaux);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

strong {
    font-weight: 700;
}

/* Zichtbare focusstates voor alles wat met het toetsenbord te bedienen is. */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--color-bordeaux);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* FocusOnNavigate zet de focus op de h1 van elke pagina. Dat is goed voor
   hulpmiddelen, maar een focusring om een hele kop is visueel storend; de h1
   staat niet in de tab-volgorde, dus er gaat geen toetsenbordbediening verloren. */
h1:focus,
h1:focus-visible {
    outline: none;
}

/* Bouwstenen -------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

.eyebrow {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-bordeaux-accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.85rem 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--transition), border-color var(--transition),
        color var(--transition);
}

.btn:hover {
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: progress;
}

.btn--primary {
    background-color: var(--color-bordeaux);
    color: #ffffff;
}

.btn--primary:hover:not(:disabled) {
    background-color: var(--color-bordeaux-dark);
}

.btn--outline {
    background-color: transparent;
    border-color: var(--color-line-strong);
    color: var(--color-bordeaux);
}

.btn--outline:hover {
    border-color: var(--color-bordeaux);
    background-color: var(--color-bordeaux-soft);
}

.btn--block {
    width: 100%;
}

/* Formulieren ------------------------------------------------------------- */

.field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
}

.field__label {
    font-size: var(--text-sm);
    font-weight: 600;
}

.field__input,
.field__textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-line-strong);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.field__textarea {
    resize: vertical;
    min-height: 8rem;
}

.field__input:focus,
.field__textarea:focus {
    outline: none;
    border-color: var(--color-bordeaux);
    box-shadow: var(--focus-ring);
}

.field__input.invalid,
.field__textarea.invalid {
    border-color: var(--color-danger);
}

.field__input.invalid:focus,
.field__textarea.invalid:focus {
    box-shadow: 0 0 0 3px rgba(164, 22, 43, 0.16);
}

.validation-message {
    font-size: var(--text-sm);
    color: var(--color-danger);
}

.form-error {
    padding: var(--space-sm) var(--space-md);
    background-color: var(--color-bordeaux-soft);
    border-left: 3px solid var(--color-danger);
    border-radius: var(--radius-sm);
    color: var(--color-danger);
    font-size: var(--text-sm);
}

/* Plaatsaanduidingen ------------------------------------------------------ */

.text-placeholder {
    color: var(--color-bordeaux-accent);
    font-size: var(--text-sm);
    font-style: italic;
}

.placeholder-note {
    padding: var(--space-lg);
    background-color: var(--color-surface-cream);
    border: 1px dashed var(--color-gold);
    border-radius: var(--radius-md);
}

.placeholder-note__label {
    margin-bottom: var(--space-xs);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-bordeaux);
}

/* Foutafhandeling --------------------------------------------------------- */

.blazor-error-boundary {
    padding: var(--space-lg);
    background-color: var(--color-bordeaux-dark);
    border-radius: var(--radius-md);
    color: #ffffff;
}

.blazor-error-boundary::after {
    content: "Er is een fout opgetreden.";
}

/* Statuspagina's (fout en pagina niet gevonden) --------------------------- */

.status-page {
    display: grid;
    justify-items: start;
    gap: var(--space-md);
    max-width: 62ch;
    padding-block: var(--space-xl);
}

.status-page__meta {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}
