/* =========================================================
   ERC Ingolstadt Gamecenter — dark "Flutlicht" theme (v2.0)
   Reuses the site's --jp-* design tokens (see theme style.css) so this
   plugin always matches whatever the current palette is, with sane
   fallbacks in case it's ever previewed without the theme active.
   ========================================================= */

.gc-wrap {
    width: 100%;
    font-family: inherit;
    box-sizing: border-box;
    color: var(--jp-text, #eaf0fd);
}

/* The page template wraps shortcode content in a fixed ~1100px card
   (.container > .card, theme style.css) — fine for text, but it leaves a
   lot of unused space either side of the schedule/standings on a real
   desktop monitor. Widen just that card, only on pages that actually have
   a Gamecenter on them, to the same "breakout" width the front page's own
   games row already uses (min(1600px,96%)) — everything else using
   .container > .card elsewhere on the site is untouched. */
@media (min-width: 900px) {
    .card:has(.gc-wrap) {
        width: min(1600px, 96%);
    }
}

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

/* =========================================================
   TEAM SWITCHER — a single dropdown. Scales to any number of
   teams (2 or 20) without scrolling, wrapping, or eating extra
   vertical space the way a row of pills would.
   ========================================================= */

.gc-nav {
    margin-bottom: 14px;
}

.gc-select-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 280px;
}

.gc-select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    background: var(--jp-panel-2, #142346);
    border: 1px solid var(--jp-line, rgba(255, 255, 255, .12));
    color: var(--jp-text, #eaf0fd);
    font: inherit;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .02em;
    padding: .65rem 2.4rem .65rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
    /* custom chevron — a plain <select> arrow doesn't follow the dark theme */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238ec9ff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 18px;
}

.gc-select:hover {
    border-color: rgba(142, 201, 255, .35);
}

.gc-select:focus-visible {
    outline: none;
    border-color: var(--jp-cyan, #8ec9ff);
    box-shadow: 0 0 0 3px rgba(142, 201, 255, .18);
}

.gc-select option {
    background: var(--jp-panel-2, #142346);
    color: var(--jp-text, #eaf0fd);
}

@media (max-width: 640px) {
    .gc-select-wrap {
        max-width: none;
    }
}

/* =========================================================
   TEAM CONTENT
   ========================================================= */

.gc-content {
    width: 100%;
}

.gc-team {
    display: none;
    width: 100%;
}

.gc-team.is-active {
    display: block;
    animation: gc-fade .25s ease;
}

@keyframes gc-fade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   INNER TABS (Spiele / Tabelle) — small segmented control.
   No per-team headline above this any more — the dropdown already says
   which team you're looking at, and every extra row here is a row between
   landing on the page and seeing an actual game.
   ========================================================= */

.gc-tabs {
    display: inline-flex;
    gap: 4px;
    background: rgba(5, 9, 26, .35);
    border: 1px solid var(--jp-line, rgba(255, 255, 255, .12));
    border-radius: 12px;
    padding: 3px;
    margin-bottom: 10px;
}

.gc-tab {
    border: none;
    background: transparent;
    color: var(--jp-muted, #93a3c4);
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .4rem 1rem;
    border-radius: 9px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.gc-tab:hover {
    color: var(--jp-text, #eaf0fd);
}

.gc-tab.is-active {
    background: var(--jp-panel, #101c3a);
    color: var(--jp-cyan, #8ec9ff);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

.gc-panel {
    display: none;
    width: 100%;
}

.gc-panel.is-active {
    display: block;
}

/* =========================================================
   NO DATA MESSAGE
   ========================================================= */

.gc-empty {
    text-align: center;
    color: var(--jp-muted, #93a3c4);
    font-style: italic;
    padding: 30px 18px;
    background: var(--jp-panel-2, #142346);
    border: 1px solid var(--jp-line, rgba(255, 255, 255, .12));
    border-radius: var(--jp-radius, 18px);
}

.gc-empty a {
    color: var(--jp-cyan, #8ec9ff);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
    .gc-tabs {
        width: 100%;
    }

    .gc-tab {
        flex: 1;
        text-align: center;
    }
}
