/* Global base styles: the self-hosted fonts, the HTML elements, the house style of the MudBlazor components
   that applies everywhere, the loading screen and the print layout of the whole app. Component styles live in their .razor.css. */

/* Bebas Neue is the fallback for Kaneda Gothic (not licensed yet). Add an @font-face for "Kaneda Gothic" to switch. */
@font-face {
    font-family: "Bebas Neue";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/bebas-neue-latin-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Gothic A1";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/gothic-a1-latin-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Gothic A1";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/gothic-a1-latin-600-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Gothic A1";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/gothic-a1-latin-700-normal.woff2") format("woff2");
}

h1:focus {
    outline: none;
}

/* Plain heading tags (e.g. page titles) use the same scale as MudText Typo.h1-h6. */
h1 { font-family: var(--mud-typography-h1-family); font-size: var(--mud-typography-h1-size); font-weight: var(--mud-typography-h1-weight); line-height: var(--mud-typography-h1-lineheight); letter-spacing: var(--mud-typography-h1-letterspacing); text-transform: var(--mud-typography-h1-text-transform); }

h2 { font-family: var(--mud-typography-h2-family); font-size: var(--mud-typography-h2-size); font-weight: var(--mud-typography-h2-weight); line-height: var(--mud-typography-h2-lineheight); letter-spacing: var(--mud-typography-h2-letterspacing); text-transform: var(--mud-typography-h2-text-transform); }

h3 { font-family: var(--mud-typography-h3-family); font-size: var(--mud-typography-h3-size); font-weight: var(--mud-typography-h3-weight); line-height: var(--mud-typography-h3-lineheight); letter-spacing: var(--mud-typography-h3-letterspacing); text-transform: var(--mud-typography-h3-text-transform); }

h4 { font-family: var(--mud-typography-h4-family); font-size: var(--mud-typography-h4-size); font-weight: var(--mud-typography-h4-weight); line-height: var(--mud-typography-h4-lineheight); letter-spacing: var(--mud-typography-h4-letterspacing); text-transform: var(--mud-typography-h4-text-transform); }

h5 { font-family: var(--mud-typography-h5-family); font-size: var(--mud-typography-h5-size); font-weight: var(--mud-typography-h5-weight); line-height: var(--mud-typography-h5-lineheight); letter-spacing: var(--mud-typography-h5-letterspacing); text-transform: var(--mud-typography-h5-text-transform); }

h6 { font-family: var(--mud-typography-h6-family); font-size: var(--mud-typography-h6-size); font-weight: var(--mud-typography-h6-weight); line-height: var(--mud-typography-h6-lineheight); letter-spacing: var(--mud-typography-h6-letterspacing); text-transform: var(--mud-typography-h6-text-transform); }

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
}

/* Bebas Neue only has weight 400: never let the browser fake bold for the Kaneda weights. */
h1,
h2,
h3,
h4,
h5,
h6,
.mud-typography-h1,
.mud-typography-h2,
.mud-typography-h3,
.mud-typography-h4,
.mud-typography-h5,
.mud-typography-h6 {
    font-synthesis: none;
}

/* Button 25:2936: pill, Primary = Filled, Secondary = Outlined, Ghost = Text. No shadow. */
.mud-button {
    min-width: 0;
    padding: 9px 14px;
    border-radius: var(--kaa-radius-full);
}

.mud-button.mud-button-filled {
    box-shadow: none;
}

.mud-button.mud-button-outlined {
    padding: 8px 13px;
}

.mud-button.mud-button-outlined.mud-button-outlined-primary {
    background-color: var(--mud-palette-surface);
    border-color: var(--mud-palette-lines-default);
    color: var(--mud-palette-primary);
}

.mud-button.mud-button-text.mud-button-text-primary {
    color: var(--mud-palette-primary);
}

.mud-button .mud-button-icon-start {
    margin-left: 0;
    margin-right: 8px;
}

.mud-button .mud-button-icon-start .mud-icon-root {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* Input 25:3508: white field, 1px border-default, radius-md, padding 10/10/10/12, Body S (height kept at 22px). */
.mud-input.mud-input-outlined {
    background-color: var(--mud-palette-surface);
    border-radius: var(--kaa-radius-md);
}

.mud-input > input.mud-input-root-outlined,
div.mud-input-slot.mud-input-root-outlined {
    padding: 10px 10px 10px 12px;
    font-size: var(--mud-typography-body1-size);
    line-height: 22px;
    height: 22px;
}

.mud-input input::placeholder {
    color: var(--mud-palette-text-secondary);
    opacity: 1;
}

.mud-input-adornment .mud-icon-root {
    width: 18px;
    height: 18px;
    font-size: 18px;
    color: var(--mud-palette-text-primary);
}

/* Chips: pills without margin, Subtitle2. */
.mud-chip {
    margin: 0;
}

.mud-chip.mud-chip-size-medium {
    height: auto;
    border-radius: var(--kaa-radius-full);
    font-family: var(--mud-typography-subtitle2-family);
    font-size: var(--mud-typography-subtitle2-size);
    font-weight: var(--mud-typography-subtitle2-weight);
    line-height: var(--mud-typography-subtitle2-lineheight);
    letter-spacing: var(--mud-typography-subtitle2-letterspacing);
}

/* Table (Ranking table header 26:2899 / Ranking row 26:2984). */
.mud-table {
    box-shadow: none !important;
}

.mud-table-head .mud-table-cell {
    padding: 12px;
    /* TODO: af te stemmen met klant (white header with a 2px line instead of the Figma bg/page header, which is now Off-White like a selected row). */
    background-color: var(--mud-palette-surface);
    border-bottom-width: 2px;
    color: var(--mud-palette-text-secondary);
    font-family: var(--mud-typography-subtitle2-family);
    font-size: var(--mud-typography-subtitle2-size);
    font-weight: var(--mud-typography-subtitle2-weight);
    line-height: var(--mud-typography-subtitle2-lineheight);
    letter-spacing: var(--mud-typography-subtitle2-letterspacing);
}

.mud-table-head .mud-table-sort-label:has(.mud-direction-asc, .mud-direction-desc) {
    color: var(--mud-palette-primary);
}

.mud-table-head .mud-table-sort-label .mud-table-sort-label-icon {
    font-size: 14px;
}

.mud-table-body .mud-table-cell {
    padding: 10px 12px;
    color: var(--mud-palette-text-primary);
    font-family: var(--mud-typography-body2-family);
    font-size: var(--mud-typography-body2-size);
    font-weight: var(--mud-typography-body2-weight);
    line-height: var(--mud-typography-body2-lineheight);
    letter-spacing: var(--mud-typography-body2-letterspacing);
}

.mud-table-row.mud-selected-row {
    background-color: var(--kaa-bg-subtle);
}

/* Slider 25:3534: 4px rail in bg-subtle, brand range, white handle with a 3px brand border. */
.mud-slider.mud-slider-medium .mud-slider-input::-webkit-slider-runnable-track {
    height: 4px;
    margin: 8px 0;
    background-color: var(--kaa-bg-subtle);
}

.mud-slider.mud-slider-medium .mud-slider-input::-moz-range-track {
    height: 4px;
    margin: 8px 0;
    background-color: var(--kaa-bg-subtle);
}

.mud-slider.mud-slider-medium .mud-slider-input::-webkit-slider-thumb {
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    margin-top: -7px;
    transform: none;
    background-color: var(--mud-palette-surface);
    border: 3px solid var(--mud-palette-primary);
    box-shadow: none;
}

.mud-slider.mud-slider-medium .mud-slider-input::-moz-range-thumb {
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    transform: none;
    background-color: var(--mud-palette-surface);
    border: 3px solid var(--mud-palette-primary);
    box-shadow: none;
}

.mud-slider .mud-slider-filled {
    border-radius: 2px;
}

/* Toggle 60:3238: 40x24 track, white 18px knob, brand when on and border-default when off. */
.mud-switch-span.mud-switch-span-medium {
    width: 40px;
    height: 24px;
    padding: 0;
}

.mud-switch-span .mud-switch-track {
    opacity: 1;
    border-radius: 12px;
    background-color: var(--mud-palette-lines-default);
}

.mud-switch-base.mud-checked + .mud-switch-track {
    opacity: 1;
    background-color: var(--mud-palette-primary);
}

.mud-switch-base.mud-switch-base-medium {
    padding: 3px;
    color: var(--mud-palette-surface) !important;
}

.mud-switch-base.mud-switch-base-medium.mud-checked {
    transform: translateX(16px);
}

.mud-switch-button .mud-switch-thumb-medium {
    width: 18px;
    height: 18px;
    box-shadow: none;
}

/* Tab 25:2945: pills in a container, active tab in Reflex Blue (style guide). */
.mud-tabs .mud-tabs-tabbar {
    background-color: transparent;
}

.mud-tabs .mud-tabs-tabbar-wrapper {
    gap: 4px;
    padding: 4px;
    /* TODO: af te stemmen met klant (container padding is not in Figma; white with a border instead of bg/subtle,
       because bg/subtle is now Off-White like the page background). */
    background-color: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--kaa-radius-full);
}

.mud-tabs .mud-tab-slider {
    display: none;
}

.mud-tabs .mud-tab {
    width: auto;
    min-height: 0;
    padding: 8px 16px;
    border-radius: var(--kaa-radius-full);
    color: var(--mud-palette-text-secondary);
    font-family: var(--mud-typography-subtitle1-family);
    font-size: var(--mud-typography-subtitle1-size);
    font-weight: var(--mud-typography-subtitle1-weight);
    line-height: var(--mud-typography-subtitle1-lineheight);
    letter-spacing: var(--mud-typography-subtitle1-letterspacing);
    text-transform: none;
}

.mud-tabs .mud-tab.mud-tab-active {
    background-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
}

/* Dialog: no modal in Figma, styled like the white cards.
   TODO: af te stemmen met klant. */
.mud-dialog {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--kaa-radius-xl);
}

.mud-dialog .mud-dialog-title {
    padding: 20px 20px 0;
}

.mud-dialog .mud-dialog-content {
    padding: 12px 20px;
}

.mud-dialog .mud-dialog-actions {
    gap: 8px;
    padding: 8px 20px 20px;
}

@page {
    size: A4 portrait;
    margin: 12mm;
}

@media print {
    /* Keep the house style colors: browsers drop backgrounds in print by default. */
    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    html,
    body,
    .mud-layout {
        background-color: var(--mud-palette-surface) !important;
    }

    /* Only the page itself is printed, not the app bar and the navigation rail. */
    .mud-appbar,
    .mud-drawer,
    #blazor-error-ui {
        display: none !important;
    }

    .mud-layout .mud-main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG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1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #0050A0;
    /* bg/brand, MudTheme variables don't exist yet while loading */
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}
