@import 'fonts.css';
@import 'theme.css';

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

html, body {
    height: 100%;
    margin: 0;
}

/* Vesta's page is the themed root (no SThemeProvider), so the library's line height goes here: 1.5, as the prototype's. */
body {
    font-family: var(--font-sans);
    line-height: var(--s-line-height);
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* The library's titles in Vesta's heading font, and the teal of the prototype's "Open" links on SCountCard. */
:root {
    --s-font-heading: var(--font-heading);
    --s-count-card-link: var(--vesta-teal-raw);
}

/* The mark while the app starts (brand/boot.js): over the whole screen, in the page's background, until the app draws
   itself in its place. The colours are the native splash screen's, so it carries on from there. */
.vesta-boot {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    background-color: hsl(var(--background));
    color: hsl(var(--primary));
}

.vesta-boot > svg {
    inline-size: min(30vw, 7.5rem);
    block-size: auto;
    overflow: visible;
}

/* A tab's dot (NavBadges): something new is waiting there. Top right of the tab, as the prototype's. */
.app-tab-dot {
    position: absolute;
    inset-block-start: 0.25rem;
    inset-inline-end: 0.25rem;
    inline-size: 0.375rem;
    block-size: 0.375rem;
    border-radius: 9999px;
    background-color: hsl(var(--vesta-teal-raw));
}

.app-bottom-link .app-tab-dot {
    inset-block-start: 0.5rem;
    inset-inline-end: calc(50% - 14px);
}

/* Read by a screen reader, not shown. */
.app-sr-only {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Brand utility classes */
.text-vesta-lime  { color: hsl(var(--vesta-lime-raw)); }
.bg-vesta-lime    { background-color: hsl(var(--vesta-lime-raw)); }
.text-vesta-teal  { color: hsl(var(--vesta-teal-raw)); }
.bg-vesta-teal    { background-color: hsl(var(--vesta-teal-raw)); }
.text-vesta-navy  { color: hsl(var(--vesta-navy-raw)); }
.bg-vesta-navy    { background-color: hsl(var(--vesta-navy-raw)); }

/* Blazor form validation */
h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid hsl(var(--success));
}

.invalid {
    outline: 1px solid hsl(var(--destructive));
}

.validation-message {
    color: hsl(var(--destructive));
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, hsl(var(--destructive));
    padding: 1rem 1rem 1rem 3.7rem;
    color: hsl(var(--destructive-foreground));
}

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

.darker-border-checkbox.form-check-input {
    border-color: hsl(var(--border));
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: hsl(var(--muted-foreground));
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ==============================================================
   The app shell, as the prototype's AppHeader and BottomNav (Tailwind's md breakpoint: 768px).
   ============================================================== */
.app-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.app-muted {
    color: hsl(var(--muted-foreground));
}

.app-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 40;
    background: hsl(var(--card) / 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid hsl(var(--border));
}

.app-header-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 3.5rem;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 0.75rem;
}

.app-logo {
    display: inline-flex;
    flex-shrink: 0;
}

.app-logo img {
    height: 1.75rem;
    width: auto;
}

/* The light logo's wordmark is navy, the dark one's white. */
.dark .app-logo-light,
:root:not(.dark, .system) .app-logo-dark {
    display: none;
}

@media (prefers-color-scheme: dark) {
    .system .app-logo-light {
        display: none;
    }
}

@media not (prefers-color-scheme: dark) {
    .system .app-logo-dark {
        display: none;
    }
}

/* The club a page is about, under the menu and above the tabs within it: on the page's column, only on a club's pages. */
/* The club a page is about: a panel in the page column, joined to the club's tabs when they follow, so the name reads
   as the heading of what is under it rather than as part of the menu above. */
.app-club-bar {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    max-width: min(var(--s-page-max-width), calc(var(--s-readable-width) + 2 * var(--s-page-gutter)));
    min-height: 3.25rem;
    margin: 1rem auto 0;
    padding: 0.375rem 0.5rem 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    background: hsl(var(--muted) / 0.6);
}

.app-club-bar:has(+ .app-sub-nav) {
    padding-bottom: 0.125rem;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.app-club-bar + .app-sub-nav {
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.app-club-single {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    padding: 0 0.5rem;
}

.app-club-icon {
    flex: none;
    color: hsl(var(--primary));
}

.app-club-name {
    overflow: hidden;
    max-width: 20rem;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    line-height: 1.5rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.app-club-button.s-btn {
    gap: 0.5rem;
    min-width: 0;
    padding-inline: 0.5rem;
    color: hsl(var(--foreground));
}

/* A tab that cannot be chosen, as a club's for someone in no club: in its place, faded. */
.app-header-link.is-disabled,
.app-sub-link.is-disabled,
.app-bottom-link.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.app-header-link.is-disabled:hover,
.app-sub-link.is-disabled:hover,
.app-bottom-link.is-disabled:hover {
    color: hsl(var(--muted-foreground));
    background: none;
}

.app-club-button .s-icon:last-child {
    color: hsl(var(--muted-foreground));
}

.app-header-nav {
    display: none;
    align-items: center;
    gap: 0.25rem;
    margin-left: 1.5rem;
}

.app-header-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: var(--s-text-sm-line);
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: color 0.15s, background-color 0.15s;
}

.app-header-link .app-icon {
    width: 1rem;
    height: 1rem;
}

.app-header-link:hover {
    color: hsl(var(--primary));
    background: hsl(var(--muted) / 0.5);
}

.app-header-link.active {
    color: hsl(var(--primary));
    background: hsl(var(--muted) / 0.6);
}

.app-header-actions {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    margin-left: auto;
}

.app-icon-btn.s-btn {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    color: hsl(var(--muted-foreground));
}

.app-icon-btn.s-btn:hover {
    color: hsl(var(--foreground));
}

.app-main {
    padding: 3.5rem 0 5rem;
}

/* The page's column, as Subro's .s-page: by default as wide as readable text (--s-readable-width), for what is read or acted
   on; a page of overviews or columns says app-page-wide and gets what the display type allows (--s-page-max-width). A phone
   gets its whole width either way. */
.app-page {
    box-sizing: border-box;
    max-width: min(var(--s-page-max-width), calc(var(--s-readable-width) + 2 * var(--s-page-gutter)));
    margin: 0 auto;
    padding: 0 var(--s-page-gutter);
}

.app-page.app-page-wide {
    max-width: var(--s-page-max-width);
}

/* The tabs within the current one, as the prototype's ClubSubNav: a segmented row above the page. */
/* On a phone, more tabs than fit scroll within the row rather than widening the page. */
.app-sub-nav {
    display: flex;
    gap: 0.25rem;
    max-width: min(var(--s-page-max-width), calc(var(--s-readable-width) + 2 * var(--s-page-gutter)));
    margin: 1rem auto 0;
    padding: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
    border-radius: var(--radius-md);
    background: hsl(var(--muted) / 0.6);
}

.app-sub-link {
    position: relative;
    display: inline-flex;
    flex: 1 0 auto;
    white-space: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm, var(--radius-md));
    font-size: 0.875rem;
    line-height: var(--s-text-sm-line);
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: color 0.15s, background-color 0.15s;
}

.app-sub-link .app-icon {
    width: 1rem;
    height: 1rem;
}

/* Four tabs within Club fit a phone by their names alone. */
@media (max-width: 39.99rem) {
    .app-sub-nav,
    .app-club-bar {
        margin-inline: 1rem;
    }

    .app-sub-link {
        padding-inline: 0.5rem;
    }

    .app-sub-link .app-icon {
        display: none;
    }
}

.app-sub-link:hover {
    color: hsl(var(--foreground));
}

.app-sub-link.active {
    color: hsl(var(--foreground));
    background: hsl(var(--background));
}

.app-bottom-nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 50;
    display: flex;
    justify-content: space-around;
    height: 4rem;
    padding: 0 0.5rem env(safe-area-inset-bottom);
    background: hsl(var(--card));
    border-top: 1px solid hsl(var(--border));
}

.app-bottom-link {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 8rem;
    font-size: 0.75rem;
    line-height: var(--s-text-xs-line);
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: color 0.15s;
}

.app-bottom-link .app-icon {
    margin-bottom: 0.25rem;
    transition: transform 0.15s;
}

.app-bottom-link:hover,
.app-bottom-link.active {
    color: hsl(var(--primary));
}

.app-bottom-link.active {
    font-weight: 600;
}

.app-bottom-link.active .app-icon {
    transform: scale(1.1);
}

@media (min-width: 48rem) {
    .app-header-bar {
        padding: 0 1.5rem;
    }

    .app-logo img {
        height: 2rem;
    }

    .app-header-nav {
        display: flex;
    }

    .app-main {
        padding: 4rem 0 1rem;
    }

    .app-bottom-nav {
        display: none;
    }
}

/* ==============================================================
   Home
   ============================================================== */
.home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.home-greeting {
    margin: 0;
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* Home's sections, as the prototype's: a heading, then the cards. */
.home-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.home-section-title {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.home-action-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* About 2.2 cards across on a phone, 3.5 on a tablet: the one cut off says there is more. From a desktop, in Home's side
   column, a grid with all of them (SScrollStrip GridFrom). */
.home-pulse {
    --s-strip-item-width: 44%;
}

@media (min-width: 40rem) {
    .home-pulse {
        --s-strip-item-width: 32%;
    }
}

@media (min-width: 48rem) {
    .home-pulse {
        --s-strip-item-width: 28.5%;
    }
}

/* Club → Groups: the list's filter, a group's page and the dialogs that change a group. */
.groups-filter {
    margin-block: var(--s-space-3);
}

.group-description {
    margin: 0 0 var(--s-space-4);
    white-space: pre-wrap;
}

/* The group's sport and levels, under its description. */
.group-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-space-2);
    margin: 0 0 var(--s-space-4);
}

.group-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-space-2) var(--s-space-3);
    margin-block: var(--s-space-4) var(--s-space-2);
}

.group-section-header h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.group-section-header .s-btn {
    margin-inline-start: auto;
}

/* A group's trainings: its schedules, then the next sessions under a smaller heading. */
.group-subheading {
    margin-block: var(--s-space-3) var(--s-space-1);
    font-size: 0.9375rem;
    font-weight: 600;
}

/* Adding a training: two fields to a row while each keeps 10rem (a phone too), else one below the other; what saving
   makes under them. */
.training-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: var(--s-space-3);
}

.training-preview p {
    margin: 0;
}

.training-preview {
    display: flex;
    flex-direction: column;
    gap: var(--s-space-1);
    min-height: 1.5rem;
}

.app-error {
    color: hsl(var(--destructive));
}

/* A session's page: why it was called off, and what the organiser wrote. */
.session-cancelled {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-space-2);
    margin-block-end: var(--s-space-3);
}

.session-description {
    white-space: pre-line;
    margin-block: 0 var(--s-space-4);
}

.group-editor {
    display: flex;
    flex-direction: column;
    gap: var(--s-space-3);
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--s-space-2);
    margin-block-start: var(--s-space-2);
}

/* Club → Members: the search and filter over the list, a member's role chips beside their name, a member's page and
   their roles. */
.members-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-space-2) var(--s-space-4);
    margin-block: var(--s-space-3);
}

.members-search {
    flex: 1 1 14rem;
    max-width: 24rem;
}

.member-facts {
    margin-block: 0 var(--s-space-4);
}

.member-roles-section {
    margin-block-start: var(--s-space-4);
}

.member-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--s-space-1);
}

.member-roles-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.member-roles-give {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--s-space-2);
}

/* A member's phone number and email address among the facts: links, in the text's own colour. */
.member-contact {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* A member's guardians end the member's own parts: room before what follows. */
.member-guardians {
    margin-block-end: var(--s-space-4);
}

/* The groups a member plays in: chips under their heading, from the start, each a link to its group. */
.member-groups {
    display: flex;
    flex-direction: column;
    gap: var(--s-space-2);
}

.member-group-chips {
    justify-content: flex-start;
}

.member-group-link {
    text-decoration: none;
    border-radius: var(--s-radius-md);
}

.member-group-link:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

/* ==============================================================
   Work in progress: a part of the prototype not built yet, drawn in its place (Placeholders/WorkInProgress). A dashed
   amber frame over faint stripes, a tag, and what is left to do.
   ============================================================== */
:root {
    --wip: 38 92% 50%;
}

.wip {
    margin-block: 0 1rem;
    padding: 0.75rem;
    border: 2px dashed hsl(var(--wip));
    border-radius: var(--radius-lg, 0.75rem);
    background: repeating-linear-gradient(-45deg, hsl(var(--wip) / 0.06) 0 10px, transparent 10px 20px);
}

.wip-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-block-end: 0.75rem;
}

.wip-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: hsl(var(--wip));
    color: hsl(30 60% 10%);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wip-title {
    font-size: 0.9375rem;
    font-weight: 600;
}

.wip-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wip-todo {
    margin-block-start: 0.75rem;
    padding-block-start: 0.5rem;
    border-top: 1px dashed hsl(var(--wip) / 0.7);
    color: hsl(var(--muted-foreground));
    font-size: 0.8125rem;
}

.wip-todo strong {
    color: hsl(var(--wip));
}

.wip-todo ul {
    margin: 0.25rem 0 0;
    padding-inline-start: 1.1rem;
}

.wip-plan {
    margin: 0.375rem 0 0;
    font-style: italic;
}

/* The sketches inside a frame: rows of cards, tiles and facts as the prototype lays them out. */
.wip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.5rem;
}

.wip-columns {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 48rem) {
    .wip-columns {
        grid-template-columns: 16rem 1fr;
    }
}

.wip-muted {
    margin: 0;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    line-height: var(--s-text-sm-line);
}

.wip-heading {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.wip-video {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

.wip-timer {
    margin: 0;
    font-size: 3.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

/* A language's flag, in the header's language button and beside each language in its menu. */
.app-flag {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 0.9375rem;
    overflow: hidden;
    border-radius: 2px;
    box-shadow: 0 0 0 1px hsl(var(--border));
}

.app-flag svg {
    width: 100%;
    height: 100%;
    display: block;
}

.app-flag-code {
    font-size: 0.5625rem;
    font-weight: 600;
    line-height: 1;
    color: hsl(var(--muted-foreground));
}

.app-language-btn .app-flag {
    width: 1.5rem;
    height: 1.125rem;
}

/* The profile's tabs. Settings: one card below the other, and the bar that applies what was changed in them, which
   stays in view above the phone's tab bar. */
.app-profile-cards:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    --s-settings-apply-bottom: calc(4.75rem + env(safe-area-inset-bottom));
}

@media (min-width: 48rem) {
    .app-profile-cards:not([hidden]) {
        --s-settings-apply-bottom: 0.75rem;
    }
}

/* How the app looks: the theme switch, then the text size. */
.app-appearance-settings-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* The account: passkeys and signing out. */
.app-account-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ==============================================================
   Library: exercises (Library/Exercise*.razor). The card of a lane, which turns over on a tap, and the detail with its
   tiles, sections and scores.
   ============================================================== */
.library-tag-mark {
    display: inline-flex;
    align-items: center;
}

.library-tag-mark-text {
    padding: 0 0.375rem;
    border-radius: 999px;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
    white-space: nowrap;
}

/* --- actions --- */
.exercise-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.25rem;
}

.exercise-actions-compact {
    justify-content: center;
}

.exercise-action {
    color: hsl(var(--muted-foreground));
}

.exercise-action-on {
    color: hsl(var(--vesta-teal));
}

    .exercise-action-on svg {
        fill: currentColor;
    }

/* --- scores --- */
.exercise-ratings {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.exercise-ratings-compact {
    gap: 0.375rem;
}

.exercise-rating {
    display: grid;
    grid-template-columns: 4.5rem 1fr 1.5rem;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.exercise-ratings-compact .exercise-rating {
    grid-template-columns: 3.5rem 1fr 1rem;
}

.exercise-rating-label {
    overflow: hidden;
    color: hsl(var(--muted-foreground));
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exercise-rating-value {
    font-weight: 500;
    text-align: end;
}

/* --- card --- */
.exercise-card {
    block-size: 100%;
    perspective: 60rem;
    cursor: pointer;
}

.exercise-card-turn {
    position: relative;
    block-size: 100%;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.exercise-card-flipped .exercise-card-turn {
    transform: rotateY(180deg);
}

.exercise-card-face {
    display: flex;
    flex-direction: column;
    block-size: 100%;
    overflow: hidden;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg, 0.75rem);
    background: hsl(var(--card));
    color: hsl(var(--card-foreground));
    box-shadow: var(--s-shadow-sm);
    backface-visibility: hidden;
}

.exercise-card-is-placeholder .exercise-card-face {
    border-style: dashed;
}

.exercise-card-back {
    position: absolute;
    inset: 0;
    gap: 0.5rem;
    padding: 0.75rem;
    transform: rotateY(180deg);
}

.exercise-card-picture {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

    .exercise-card-picture > img {
        position: absolute;
        inset: 0;
        inline-size: 100%;
        block-size: 100%;
        object-fit: cover;
    }

.exercise-card-add {
    position: absolute;
    inset-block-start: 0.375rem;
    inset-inline-start: 0.375rem;
    display: grid;
    place-items: center;
    inline-size: 2rem;
    block-size: 2rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: hsl(var(--vesta-teal));
    color: hsl(var(--vesta-teal-foreground));
    box-shadow: var(--s-shadow-md);
    cursor: pointer;
}

    .exercise-card-add:focus-visible {
        outline: 2px solid hsl(var(--ring));
        outline-offset: 2px;
    }

.exercise-card-counts {
    position: absolute;
    inset-block-start: 0.5rem;
    inset-inline-end: 0.5rem;
    display: flex;
    gap: 0.375rem;
}

.exercise-card-count {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: hsl(var(--background) / 0.8);
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
}

.exercise-card-hidden {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background: hsl(0 0% 0% / 0.4);
    color: hsl(0 0% 100% / 0.85);
    font-size: 0.75rem;
    font-weight: 500;
}

.exercise-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.375rem;
    padding: 0.75rem;
}

.exercise-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
    min-block-size: 2.5rem;
}

.exercise-card-name {
    flex: 1;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
}

    .exercise-card-name > a,
    .exercise-card-name > button {
        display: -webkit-box;
        overflow: hidden;
        padding: 0;
        border: 0;
        background: none;
        color: inherit;
        font: inherit;
        text-align: start;
        text-decoration: none;
        cursor: pointer;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

        .exercise-card-name > a:hover,
        .exercise-card-name > button:hover {
            text-decoration: underline;
        }

.exercise-card-marks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-inline-size: 0;
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
}

.exercise-card-needs {
    margin-block-start: auto;
}

.exercise-card-format {
    color: hsl(var(--foreground));
    font-weight: 500;
}

.exercise-card-players {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    color: hsl(var(--foreground));
}

.exercise-card-scores {
    flex: 1;
}

.exercise-card-open {
    margin-block-start: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
    .exercise-card-turn {
        transition: none;
    }
}

/* --- detail --- */
.exercise-detail {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.exercise-audio {
    inline-size: 100%;
}

.exercise-head {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.exercise-name {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.25;
}

.exercise-flags {
    display: flex;
    gap: 0.375rem;
}

.exercise-goal,
.exercise-chains,
.exercise-author {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
    margin: 0;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

.exercise-author {
    align-items: center;
}

.exercise-chains {
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius-md);
    background: hsl(var(--muted) / 0.5);
    font-size: 0.75rem;
}

.exercise-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.exercise-tile {
    display: flex;
    flex: 1 1 calc(25% - 0.5rem);
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-inline-size: 4.5rem;
    padding: 0.625rem 0.5rem;
    border-radius: var(--radius-md);
    background: hsl(var(--muted) / 0.5);
}

.exercise-tile-icons {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    color: hsl(var(--muted-foreground));
}

.exercise-tile-text {
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
    line-height: 1.25;
    text-align: center;
}

.exercise-sections {
    display: flex;
    flex-direction: column;
    padding-block-start: 0.75rem;
}

.exercise-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

    .exercise-section + .exercise-section {
        margin-block-start: 1rem;
        padding-block-start: 1rem;
        border-top: 1px solid hsl(var(--border));
    }

.exercise-section-title {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0;
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.exercise-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.exercise-row-label {
    flex: none;
    inline-size: 6.5rem;
    padding-block-start: 0.125rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
}

.exercise-row-values {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 0.25rem;
    min-inline-size: 0;
    font-size: 0.875rem;
}

.exercise-techniques {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .exercise-techniques > .exercise-row-label {
        inline-size: auto;
    }

.exercise-text,
.exercise-none {
    margin: 0;
    font-size: 0.875rem;
    line-height: var(--s-text-sm-line, 1.5);
}

.exercise-none {
    color: hsl(var(--muted-foreground));
}

/* Sessions: the schedule's week, its cards and filters, and answering on a session's page (Sessions/). As the
   prototype's: a bar in the group's colour, discs per person (going solid, not going struck through, not sure and no
   response dashed), muted once over. */

.week-schedule {
    display: flex;
    flex-direction: column;
    gap: var(--s-space-3);
}

.week-schedule-tools {
    display: flex;
    justify-content: center;
}

.week-schedule-list {
    display: flex;
    flex-direction: column;
    gap: var(--s-space-2);
}

.week-schedule-divider {
    margin-block-start: var(--s-space-2);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
}

.week-schedule-empty {
    text-align: center;
    padding-block: var(--s-space-4);
}

.session-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--s-space-1);
    padding: var(--s-space-3) var(--s-space-3) var(--s-space-3) calc(var(--s-space-3) + 4px);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-md);
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    text-decoration: none;
    overflow: hidden;
}

.session-card::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 4px;
    background: var(--session-bar, transparent);
}

.session-card:hover {
    background: hsl(var(--muted));
}

.session-card:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.session-card-muted {
    opacity: 0.6;
}

.session-card-title {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.session-card-when {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-space-1) var(--s-space-3);
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.session-card-count {
    display: inline-flex;
    align-items: center;
    gap: var(--s-space-1);
}

.session-card-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-space-1);
    margin-block-start: var(--s-space-1);
}

.session-disc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
    border: 1.5px solid var(--disc);
    color: var(--disc);
}

.session-disc-going {
    background: var(--disc);
    color: #fff;
}

.session-disc-not-going {
    opacity: 0.55;
    text-decoration: line-through;
}

.session-disc-not-sure,
.session-disc-no-response {
    border-style: dashed;
}

.session-answer,
.session-role {
    display: inline-flex;
    align-items: center;
    padding: 0.0625rem var(--s-space-2);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid hsl(var(--border));
    color: hsl(var(--muted-foreground));
}

.session-answer-going {
    border-color: hsl(var(--vesta-teal));
    color: hsl(var(--vesta-teal));
}

.session-answer-not-going {
    border-color: hsl(var(--destructive));
    color: hsl(var(--destructive));
}

.session-answer-not-sure,
.session-answer-no-response {
    border-style: dashed;
}

.session-role {
    border-color: hsl(var(--primary));
    color: hsl(var(--primary));
}

.schedule-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-space-2);
    margin-block-end: var(--s-space-3);
}

.schedule-filter {
    display: inline-flex;
    align-items: center;
    gap: var(--s-space-1);
    padding: var(--s-space-1) var(--s-space-3);
    border: 1px solid hsl(var(--border));
    border-radius: 999px;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font: inherit;
    font-size: 0.875rem;
    cursor: pointer;
}

.schedule-filter-chosen {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
}

.schedule-filter:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.session-my-response,
.session-attendees {
    margin-block-end: var(--s-space-4);
}

.session-response-row {
    display: flex;
    flex-direction: column;
    gap: var(--s-space-1);
    padding-block: var(--s-space-2);
}

.session-response-row + .session-response-row {
    border-block-start: 1px solid hsl(var(--border));
}

.session-response-name {
    font-weight: 500;
}

.session-reason {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-space-2);
}

.session-deadline {
    margin-block-end: var(--s-space-2);
}

.session-attendee-counts {
    list-style: none;
    margin: 0 0 var(--s-space-2);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s-space-1);
}

.session-attendee-counts li {
    display: flex;
    align-items: center;
    gap: var(--s-space-2);
}

.session-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex: none;
}

.session-dot-going { background: hsl(var(--vesta-teal)); }
.session-dot-no-response { background: hsl(var(--muted-foreground)); }
.session-dot-not-going { background: hsl(var(--destructive)); }

.session-list-heading {
    margin: var(--s-space-3) 0 var(--s-space-1);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
}

/* Changing a session or a training (Club/Trainings): the actions on a session's page and the edit's scope. */

.session-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-space-2);
    margin-block-end: var(--s-space-4);
}

.edit-scopes {
    display: flex;
    flex-direction: column;
    gap: var(--s-space-2);
}

.edit-scope {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-space-1);
    padding: var(--s-space-3);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-md);
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    font: inherit;
    text-align: start;
    cursor: pointer;
}

.edit-scope:hover {
    background: hsl(var(--muted));
}

.edit-scope:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

/* Who came, recorded afterwards (Sessions/RecordAttendance). */

.session-attendance {
    margin-block-end: var(--s-space-4);
}

.attendance-list {
    display: flex;
    flex-direction: column;
    margin-block: var(--s-space-2);
}

.attendance-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-space-2);
    padding-block: var(--s-space-2);
}

.attendance-row + .attendance-row {
    border-block-start: 1px solid hsl(var(--border));
}

.attendance-who {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-space-2);
    min-width: 0;
}

.attendance-name {
    font-weight: 500;
}

.attendance-extras {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-space-3);
    flex-basis: 100%;
}

.attendance-add {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--s-space-2);
    margin-block: var(--s-space-2);
}

.session-came {
    margin: 0 0 var(--s-space-2);
    font-weight: 500;
}

/* Club → Members: her filters and the count under them. */

.members-kinds {
    margin-block-start: var(--s-space-2);
}

.members-count {
    margin-block: var(--s-space-2);
    font-size: 0.75rem;
}

/* Club → Settings: the club's profile. */

.club-profile {
    margin-block-end: var(--s-space-4);
}

/* A training's own page (Pages/Club/TrainingPage). */

.training-facts {
    margin-block-end: var(--s-space-4);
}

.training-section {
    margin-block-end: var(--s-space-4);
}

/* Club → Settings: holidays and closed days. */

.club-holidays {
    margin-block-end: var(--s-space-4);
}
