.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."
    }

/* What Blazor shows when a circuit gives out. It is hidden until then: Blazor itself puts it on the screen. Without
   this it stood at the end of every page, saying an error had occurred where none had. */
#blazor-error-ui {
    color-scheme: light only;
    display: none;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 1000;
    box-sizing: border-box;
    width: 100%;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    background: lightyellow;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
}

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

.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;
}

/* The site's frame. Radzen renders the layout, the header and the menus itself, and a scoped stylesheet cannot
   reach into another component's markup, so what the frame needs is written here. */

/* The page runs on as long as it is and ends with its footer, rather than being cut to the window with a footer
   pinned under it. */
.clubsite-layout.rz-layout {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
}

.clubsite-layout .rz-body {
    overflow: visible;
}

/* The page is as wide as the window and no wider. The sponsors that pass by are wider than any screen, and a grid
   column grows to whatever stands in it unless what stands in it may shrink, which pushed the header out of
   sight. */
.clubsite-layout > .rz-header,
.clubsite-layout > .clubsite-frame,
.clubsite-layout .rz-body,
.clubsite-layout > .rz-footer {
    min-width: 0;
}

/* The row that holds the sidebar and the page lies between the header and the footer, across both columns of
   Radzen's layout, in the middle of the window. */
.clubsite-layout > .clubsite-frame {
    grid-row: 2;
    grid-column: 1 / -1;
    width: 100%;
    max-width: var(--clubsite-frame-width);
    margin-inline: auto;
}

/* How wide the sidebar and the page are together, and the sidebar on its own, at each of Radzen's breakpoints. The
   page takes what the sidebar leaves, so it has one width at each breakpoint however wide the window is. The widths
   are the most the row takes: a window that loses some of its width to a scrollbar still fits. */
@media (min-width: 769px) {
    .clubsite-layout {
        --clubsite-frame-width: 768px;
        --rz-sidebar-width: 224px;
    }

    .clubsite-layout > .clubsite-frame {
        flex-wrap: nowrap;
    }

    .clubsite-layout > .clubsite-frame > .rz-sidebar {
        flex: 0 0 var(--rz-sidebar-width);
    }

    .clubsite-layout > .clubsite-frame > .rz-body {
        flex: 1 1 0;
    }
}

@media (min-width: 1024px) {
    .clubsite-layout {
        --clubsite-frame-width: 1024px;
        --rz-sidebar-width: 256px;
    }
}

@media (min-width: 1280px) {
    .clubsite-layout {
        --clubsite-frame-width: 1280px;
    }
}

@media (min-width: 1920px) {
    .clubsite-layout {
        --clubsite-frame-width: 1408px;
    }
}

/* The row across the top: the toggle where there is one, and whoever is signed in at the far end. The row is as high
   as the header, so what stands in it is in the middle of the header; left to its contents it would only be as high
   as the toggle, and where the toggle is hidden as high as the profile menu, at the top of the header. */
.clubsite-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-height: var(--rz-header-min-height);
    padding: 0 1rem;
}

.clubsite-header > .rz-profile-menu {
    margin-inline-start: auto;
}

/* Above the menu bar stands the bar with the club's sites, lower on a small screen. The club's logo is placed by its
   height. */
.clubsite-layout {
    --clubsite-top-bar-height: 3.5rem;
}

@media (max-width: 768px) {
    .clubsite-layout {
        --clubsite-top-bar-height: 2.5rem;
    }
}

/* Below the bar stand what a page opens with and the club's logo. The logo's size follows the width of this row, so
   it grows and shrinks with the carousel below it. */
.clubsite-header-below {
    position: relative;
    container: header-below / inline-size;
}

/* The header runs across the window, and what stands in it, the menu bar's row and the carousel below it, is as wide
   as the frame below it, in the middle of the window: so the toggle and the profile menu line up with the sidebar and
   the page. Where the frame has no width of its own, on a small screen, it is as wide as the header. */
.clubsite-header,
.clubsite-header-below {
    max-width: var(--clubsite-frame-width, none);
    margin-inline: auto;
}

/* Icon, name and arrow stand on one line, each in the middle of it. Left to the baseline they line up by the
   bottom of the letters, which drops the name below the icon. */
.clubsite-profile-menu .item-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Room above and below only: Radzen's body already keeps the page from the edges of the window. */
.clubsite-content {
    padding: 1.5rem 0;
}

/* The line between the pages of this site and what lies outside it. */
.clubsite-menu-divider {
    margin: 0.5rem 1rem;
}

/* On a small screen there is no room beside the page, so the sidebar folds away and the menu the toggle brings back
   slides in over the page, the full height of the window, while the page stays where it is under it. With room
   enough Radzen's own layout stands: the footer over the full width and the sidebar above it. */
@media (max-width: 768px) {
    /* The row is for a screen with room beside the page. Here it steps aside, as if it were not there, so the
       page is placed by the layout itself. Radzen marks its row as a flex container with !important, which is why
       this needs it too. */
    .clubsite-layout > .clubsite-frame {
        display: contents !important;
    }

    /* The header, the page and the footer have the window to themselves; the menu lies over them. */
    .clubsite-layout.rz-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "rz-header"
            "rz-body"
            "rz-footer";
    }

    /* Radzen makes them as wide as the window, its scrollbar included, so beside a scrollbar they would stand past
       the edge of the page. They take the width of the layout instead. Radzen's selector is the more specific one,
       which is why this needs !important. */
    .clubsite-layout.rz-layout > .rz-header,
    .clubsite-layout.rz-layout .rz-body,
    .clubsite-layout.rz-layout > .rz-footer {
        width: auto !important;
    }

    /* The menu is always as wide as when it is open and slides in from the left edge, rather than growing from
       nothing, which would wrap every item while it grows. Folded, it is out of sight and out of reach of the
       keyboard. A sliver of the page stays in view beside it however narrow the screen, to touch to fold it away.
       Radzen folds it away by its width with !important, which is why this needs it too. */
    .clubsite-layout.rz-layout .rz-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 4;
        width: var(--rz-sidebar-width) !important;
        max-width: calc(100vw - 3rem);
        opacity: 1;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 0.25s ease, visibility 0s linear 0.25s;
    }

    .clubsite-layout.rz-layout .rz-sidebar.rz-sidebar-expanded {
        transform: none;
        visibility: visible;
        box-shadow: 0 0 1.5rem rgba(20, 20, 60, 0.3);
        transition: transform 0.25s ease;
    }

    /* The way out of the menu stands in its top corner, on a row of its own above the menu. */
    .clubsite-layout .clubsite-sidebar-close {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
    }

    .clubsite-layout.rz-layout .rz-sidebar {
        padding-top: 3.25rem;
    }

    /* The page under the open menu is dimmed, and fades in and out as the menu slides. */
    .clubsite-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 3;
        background: rgba(20, 20, 60, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0s linear 0.25s;
    }

    .clubsite-layout:has(.rz-sidebar-expanded) > .clubsite-sidebar-backdrop {
        opacity: 1;
        visibility: visible;
        transition: opacity 0.25s ease;
    }

    /* While the menu is open the page under it stays where it is. The menu scrolls within itself where it is
       longer than the screen. */
    body:has(> .clubsite-layout .rz-sidebar-expanded) {
        overflow: hidden;
    }
}

/* Only a menu that covers the page has to be dimmed beside or closed from within. */
@media (min-width: 769px) {
    .clubsite-sidebar-backdrop,
    .clubsite-layout .clubsite-sidebar-close {
        display: none;
    }
}

/* A folded sidebar has no width, but Radzen leaves its border standing: a column of one pixel that, beside a page as
   wide as the window, made every page on a small screen scroll sideways by that pixel. */
.clubsite-layout .rz-sidebar.rz-sidebar-collapsed {
    border: 0;
}

/* Folding the menu away is a small screen's business. Where the sidebar simply stands there, nothing folds it. */
@media (min-width: 769px) {
    .clubsite-layout .rz-sidebar-toggle {
        display: none;
    }
}

/* Radzen gives the body a transform, which makes it the box that fixed elements inside it are placed in. The photo
   viewer covers the whole window, so while it is open the body does without. */
.clubsite-layout .rz-body:has(.photo-viewer) {
    transform: none;
}

/* A carousel of cards or of whole blocks, as the news and a visitor's teams are. Radzen puts the arrows over the sides
   of what a carousel shows, which suits pictures and covers what is to be read. Here the carousel keeps room at its
   sides for them, so they stand beside what it shows, and only when it has arrows. Radzen renders the carousel, so a
   scoped stylesheet cannot reach it and the rule lives here, once for every such carousel. */
@media (min-width: 768.02px) {
    .clubsite-carousel .rz-carousel:has(> .rz-carousel-prev) {
        padding-inline: 3.5rem;
    }
}

/* On a small screen, where the sidebar folds away behind the menu button, the arrows make way: swiping reaches every
   page, with what peeks at the edges of a visitor's teams, the news and the Instagram posts, and what the carousel
   shows keeps the room. */
@media (max-width: 768px) {
    .clubsite-carousel .rz-carousel-prev,
    .clubsite-carousel .rz-carousel-next {
        display: none;
    }
}
