body {
    background-color: skyblue;
}

/* Squad table row actions (team/_squad_table.html.twig): all exactly the same box — width,
   height, symbol size — whether they show an emoji or a Font Awesome icon. */
.squad-action-btn {
    width: 2.25rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
}
.squad-action-btn > i {
    font-size: 1.05rem;
}

/* Week grids (training calendar, office calendar): the week as columns on the desktop; on a
   phone a list of days, one below the other, each with its day label (.week-grid-day) on the left. */
.week-grid { table-layout: fixed; min-width: 56rem; }
.training-group-col { width: 10rem; }
@media (max-width: 991.98px) {
    .week-grid { min-width: 0; }
    .week-grid thead { display: none; }
    .week-grid, .week-grid tbody, .week-grid tr { display: block; width: 100%; }
    .week-grid tbody th, .week-grid tbody td {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .25rem .6rem;
        width: 100% !important;
        height: auto !important;
        text-align: left !important;
        border-width: 0 0 1px 0;
    }
    .week-grid tbody th { background: var(--bs-tertiary-bg); }
    .week-grid tbody td > * { margin: 0 !important; }
    .week-grid tbody td .justify-content-center { justify-content: flex-start !important; }
    .week-grid-day { flex: 0 0 6.5rem; font-weight: 600; }
    .week-grid tbody td > .week-grid-day ~ * { flex: 0 1 auto; }
    .week-grid-month tbody td { display: block; padding: .5rem !important; }
    .week-grid-month tbody td > * { margin-top: .25rem !important; }
    .week-grid-month tbody td.week-grid-empty { display: none; }
    .training-group-col { width: 6.75rem; }
    .training-group-col select, td > select[name^="group["] { padding-left: .5rem; padding-right: 1.5rem; background-position: right .35rem center; }
}

/* The stadium expansion's − count + steppers: side by side on the desktop, on a phone the count
   above the two buttons, so the four stands × three seat categories fit the screen. */
.stadium-stepper-count { min-width: 4.5rem; display: inline-block; }
@media (max-width: 991.98px) {
    .stadium-stepper { flex-wrap: wrap; }
    .stadium-stepper-count { order: -1; width: 100%; min-width: 0; text-align: center; }
}

/* The squad's shirt number select: narrower on a phone. */
.squad-shirt-select { width: 4.5rem; }
@media (max-width: 991.98px) {
    .squad-shirt-select { width: 3.4rem; padding-left: .4rem; padding-right: 1.4rem; background-position: right .3rem center; }
}

/* On a phone the squad table fits the screen: no scroll box, so the ⋯ menu isn't cut off by it. */
@media (max-width: 991.98px) {
    .squad-table-wrap { overflow: visible; }
}

/* The squad's row actions (templates/team/_squad_table.html.twig): one set of buttons. On the desktop
   a row of icon buttons (label only as tooltip); on a phone they sit in the ⋯ menu, full width with label. */
.squad-actions {
    min-width: 15.5rem;
    padding: .5rem;
}
.squad-actions.show {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.squad-actions .squad-action-btn {
    width: 100%;
    height: auto;
    min-height: 2.25rem;
    justify-content: flex-start;
    gap: .6rem;
    padding: .3rem .75rem;
    font-size: .9rem;
    text-align: left;
    white-space: nowrap;
}
.squad-actions form {
    width: 100%;
}
@media (min-width: 992px) {
    .squad-actions {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: .25rem;
        position: static;
        min-width: 0;
        padding: 0;
        margin: 0;
        border: 0;
        background: none;
        box-shadow: none;
    }
    .squad-actions form {
        width: auto;
    }
    .squad-actions .squad-action-btn {
        width: 2.25rem;
        height: 2rem;
        min-height: 0;
        justify-content: center;
        padding: 0;
        font-size: 1rem;
    }
    /* Same as Bootstrap's .visually-hidden: kept for screen readers, the tooltip shows it. */
    .squad-action-label {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }
}

/* Collapsible boxes (templates/_collapsible_card.html.twig): the title row is the toggle. */
.collapsible-card > summary {
    cursor: pointer;
    list-style: none;
}
.collapsible-card > summary::-webkit-details-marker {
    display: none;
}
.collapsible-card-chevron {
    transition: transform .2s;
}
.collapsible-card[open] .collapsible-card-chevron {
    transform: rotate(180deg);
}

/* A Bootstrap collapse toggle with a leading chevron (e.g. Admin → Draft → Abgabelisten): the
   chevron points down while the section is open. */
[data-bs-toggle="collapse"] > .fa-chevron-right {
    transition: transform .2s;
}
[data-bs-toggle="collapse"]:not(.collapsed) > .fa-chevron-right {
    transform: rotate(90deg);
}

/* Player summary with badges (club/_player_macros.html.twig, playerSummaryBadges): fixed-width
   columns, so the rows of a list line up like a table — the positions column always has room
   for three badges, the name always starts at the same spot. On narrow screens it just wraps. */
.player-summary-row {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .5rem;
}
.player-summary-row > .badge {
    min-width: 3.5rem;
}
@media (min-width: 992px) {
    .player-summary-row {
        display: inline-grid;
        grid-template-columns: 8.25rem 10rem 3rem 6.5rem 3.5rem 3.75rem;
    }
    .player-summary-value {
        text-align: right;
    }
}
.player-summary-positions {
    display: inline-flex;
    gap: .125rem;
}

/* Sponsor pyramid (finance/_sponsor_pyramid.html.twig): a tier's places side by side, one column
   per place on wide screens, so every tier — the base too — is filled across its width. */
.sponsor-tier-grid {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
}
@media (min-width: 992px) {
    .sponsor-tier-grid {
        grid-template-columns: repeat(var(--slots), minmax(0, 1fr));
    }
}
.sponsor-tile {
    min-width: 0;
}
/* A tier folds away by its header; the chevron points right while folded. */
.sponsor-tier-toggle {
    cursor: pointer;
    user-select: none;
}
.sponsor-tier-chevron {
    display: inline-block;
    transition: transform .15s ease-in-out;
}
.sponsor-tier-toggle.collapsed {
    border-bottom: 0;
    border-radius: var(--bs-card-inner-border-radius);
}
.sponsor-tier-toggle.collapsed .sponsor-tier-chevron {
    transform: rotate(-90deg);
}
/* After acting on an offer the page jumps back to it (or its tier) — clear of the sticky top bar. */
.sponsor-pyramid-tier,
.sponsor-offer {
    scroll-margin-top: 5rem;
}
.sponsor-tile-free {
    border-style: dashed !important;
    min-height: 6rem;
}
/* The pyramid narrows towards the top only where there is room for it; on a phone every tier
   is full width, and an offer's buttons share the row. */
@media (min-width: 768px) {
    .sponsor-pyramid-tier {
        max-width: var(--pyramid-width);
    }
}
@media (max-width: 575.98px) {
    .sponsor-offer-actions .btn {
        flex: 1 1 0;
    }
}
/* Label above value — a base tile is narrow (seven per row). */
/* A signed sponsor's terms: side by side as far as the tile is wide (the main sponsor's tile
   takes the whole tier), stacked in the narrow tiles of the lower tiers. */
.sponsor-tile-terms {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 1.25rem;
}
.sponsor-tile-terms-row {
    flex-basis: 100%;
}
.sponsor-tile-terms dt {
    font-weight: normal;
    margin-top: .25rem;
}
.sponsor-tile-terms dd {
    margin: 0;
    color: var(--bs-body-color);
    white-space: nowrap;
}
.sponsor-tile-terms-inline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 1rem;
}

/* Transfer history (transfer/_transfer_decision.html.twig): one font size in a club's box — the
   compact market value's unit ("Mio. €") included, which is <small> elsewhere. */
.transfer-decision-box small {
    font-size: inherit;
}

/* National-team player lists (squad, latest call-ups, nominate): one fixed column grid from
   national_team/_player_columns.html.twig, so the lists on one page line up column for column.
   Below the minimum width the surrounding .table-responsive scrolls instead of squeezing. */
.national-player-table {
    table-layout: fixed;
    min-width: 76rem;
}
.national-player-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The live draw: a freshly drawn ball lights up for a moment in the ticker and in its group. */
.national-draw-new {
    animation: national-draw-flash 2.5s ease-out;
}
@keyframes national-draw-flash {
    from { background-color: color-mix(in srgb, var(--bs-warning) 45%, transparent); }
    to { background-color: transparent; }
}

/* The squad's "Bearbeiten" window: a card above a dimmed page. */
.player-edit-dialog { width: min(48rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); border: 0; color: inherit; }
.player-edit-dialog::backdrop { background: rgba(0, 0, 0, .55); }
/* Bootstrap's .card sets display: flex, which would show the closed dialog below the squad. */
.player-edit-dialog:not([open]) { display: none; }

/* Trophy cabinet (club and manager profile): the wooden display case as background, the trophies
   placed on its shelves in percent (see club/_trophy_cabinet.html.twig) — so the whole case scales
   with the page; sizes in cqw follow the case's width. */
.trophy-cabinet {
    position: relative; aspect-ratio: 1448 / 1086; max-width: 56rem; margin: 0 auto;
    background: center / 100% 100% no-repeat; container-type: inline-size;
}
.trophy-slot {
    position: absolute; width: 8cqw; height: 7cqw; margin: 0; transform: translateX(-50%);
    display: flex; align-items: flex-end; justify-content: center;
}
/* A shadow all around, not below: one shifted down showed as a gap under the base, as if the
   trophy floated above the board. */
.trophy-slot-image { max-width: 100%; max-height: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 0 .4cqw rgba(0, 0, 0, .55)); }
.trophy-slot-placeholder { font-size: 6cqw; line-height: 1; filter: drop-shadow(0 0 .4cqw rgba(0, 0, 0, .55)); }
.trophy-slot-image--faded { opacity: .32; filter: grayscale(.8) brightness(1.1); }
.trophy-slot-count {
    position: absolute; right: -.4cqw; bottom: 0; min-width: 2.6cqw; height: 2.6cqw; padding: 0 .5cqw; border-radius: 2cqw;
    background: #10c46a; color: #04170c; font-weight: 700; font-size: 1.6cqw; line-height: 2.6cqw; text-align: center;
    box-shadow: 0 0 .8cqw rgba(16, 196, 106, .7);
}

/* AI support assistant (Support → KI-Assistent): compact answer bubbles. */
.support-assistant-answer > :last-child { margin-bottom: 0; }
.support-assistant-answer ul,
.support-assistant-answer ol { padding-left: 1.25rem; margin-bottom: .5rem; }
.support-assistant-answer p { margin-bottom: .5rem; }

/* The head of a transfer-list offer (transfer/_player_hero.html.twig), after transfermarkt.de's
   player pages: a large name, the facts as a two-column grid, the market value in large type. */
.transfer-player-hero-name {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    line-height: 1.15;
}
.transfer-player-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: .45rem 1.5rem;
    flex: 1 1 auto;
    min-width: 0;
}
.transfer-player-facts > div {
    display: flex;
    gap: .4rem;
    align-items: baseline;
    flex-wrap: wrap;
}
.transfer-player-facts dt {
    font-weight: 400;
    color: var(--bs-secondary-color);
}
.transfer-player-facts dt::after {
    content: ":";
}
.transfer-player-facts dd {
    margin: 0;
    font-weight: 600;
}
.transfer-player-value-amount {
    font-size: clamp(2.2rem, 6vw, 3.2rem);
    font-weight: 300;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.transfer-player-value-amount small {
    font-size: .45em;
    font-weight: 400;
}

/* The switch between single players and squad lists next to the transfer list's heading
   (transfer/transfer_list.html.twig): bigger than a plain form switch, so it isn't missed. */
.transfer-list-view-switch {
    font-size: 1.1rem;
}
.transfer-list-view-switch .form-check-input {
    width: 3.25em;
    height: 1.75em;
    margin-top: 0;
    cursor: pointer;
}
.transfer-list-view-switch label {
    cursor: pointer;
}

/* "Leihabbruch" (team/_loan_cancel_icon.html.twig): the loan icon with a small cross in its corner. */
.loan-cancel-icon {
    position: relative;
    display: inline-block;
    line-height: 1;
}
.squad-action-btn > .loan-cancel-icon {
    font-size: 1.05rem;
}
.loan-cancel-icon-x {
    position: absolute;
    right: -.45em;
    bottom: -.4em;
    font-size: .6em;
}

/* A folding box's arrow: down while folded, turned up once open. */
.collapse-chevron { flex-shrink: 0; transition: transform .2s ease; }
[data-bs-toggle="collapse"]:not(.collapsed) .collapse-chevron { transform: rotate(180deg); }

/* Statistiken: each category tile carries its picture for both skins — only the current one shows
   (and is loaded), so the skin toggle switches them at once. */
[data-bs-theme="dark"] .statistics-category-image[data-skin-image="light"],
[data-bs-theme="light"] .statistics-category-image[data-skin-image="dark"] {
    display: none;
}

/* A background picture in the style's colours for both skins (Twig style_image()): the element
   carries --skin-bg-light and --skin-bg-dark, its background uses --skin-bg — the current skin's,
   so the skin toggle switches it at once and only that picture is loaded. */
[data-bs-theme="light"] .skin-bg { --skin-bg: var(--skin-bg-light); }
[data-bs-theme="dark"] .skin-bg { --skin-bg: var(--skin-bg-dark); }

/* A signature under forum posts stays small: pictures at most a banner's height. */
.forum-signature img { max-width: 100%; max-height: 120px; }
.forum-signature p, .forum-signature div { margin-bottom: 0; }

/* "Doppelte Spieler" (admin): a person's heading row — tinted in the theme's own colours, not a
   white table-light row that drowns in the dark skins. */
.duplicate-group-head > td {
    --bs-table-bg: transparent;
    --bs-table-accent-bg: transparent;
    background-color: color-mix(in srgb, var(--bs-primary) 16%, transparent);
    color: var(--bs-body-color);
}

/* Live cup draw: a tie as three columns — home club | : | away club — the colons one under the
   other, whatever the names' lengths. */
.cup-draw-tie {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) 1rem minmax(0, 1fr);
    align-items: center;
    column-gap: .5rem;
}
