.svc-team {
    margin-bottom: 2em;
}

.svc-team-header {
    margin-bottom: 1em;
}

.svc-team-header h3 {
    margin: 0 0 0.25em;
}

.svc-team-league {
    display: inline-block;
    background: var(--svc-accent, #0073aa);
    color: var(--svc-accent-text, #fff);
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 1em;
}

.svc-team-image {
    margin-bottom: 1em;
}

.svc-team-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.svc-team-description {
    margin-bottom: 1.5em;
}

/* Sections */
.svc-section {
    margin-bottom: 1.5em;
}

.svc-section h4 {
    margin: 0 0 0.5em;
    padding-bottom: 0.25em;
    border-bottom: 2px solid var(--svc-accent, #0073aa);
}

/* Training table */
.svc-training-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1em;
}

.svc-training-table th,
.svc-training-table td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.svc-training-table thead th {
    background: #f5f5f5;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.svc-training-table tbody tr:hover {
    background: #fafafa;
}

/* Contacts */
.svc-contacts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.svc-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    align-items: baseline;
    padding: 0.5em 0;
    border-bottom: 1px solid #eee;
}

.svc-contact:last-child {
    border-bottom: none;
}

.svc-contact-role {
    color: #666;
}

.svc-contact-role::before {
    content: '–';
    margin-right: 0.5em;
}

.svc-contact-email,
.svc-contact-phone {
    font-size: 1em;
}

/* Competition widgets */
.svc-competition {
    padding: 1em;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 1em;
}

.svc-competition h4 {
    margin-top: 0;
}

.svc-competition-matches,
.svc-competition-table {
    margin-bottom: 1em;
}

.svc-competition-matches:last-child,
.svc-competition-table:last-child {
    margin-bottom: 0;
}

.svc-competition h5 {
    margin: 0 0 0.4em;
    font-size: 1em;
    color: #444;
}

/* Teams list layout */
.svc-teams-list {
    display: flex;
    flex-direction: column;
    gap: 2em;
}

/* Scraped tables */
.svc-scraped-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.svc-scraped-table th,
.svc-scraped-table td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.svc-scraped-table th {
    background: #f5f5f5;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.svc-scraped-table tbody tr:hover {
    background: #fafafa;
}

/* Team highlighting */
.svc-highlight {
    font-weight: 700;
    color: var(--svc-accent, #0073aa);
}

.svc-highlight-row {
    background-color: color-mix(in srgb, var(--svc-accent, #0073aa) 12%, transparent) !important;
}

.svc-highlight-row td {
    font-weight: 600;
}

/* Games: time in second line smaller */
.svc-scraped-games .svc-time {
    font-size: 14px;
    color: #666;
}

/* Games: always hide game number (col 1) and logo columns (col 3, 5) */
.svc-scraped-games tr > *:nth-child(1),
.svc-scraped-games tr > *:nth-child(3),
.svc-scraped-games tr > *:nth-child(5) {
    display: none;
}

/* Standings: always hide logo column (col 2) */
.svc-scraped-standings tr > *:nth-child(2) {
    display: none;
}

/* Responsive: scraped tables */
@media (max-width: 600px) {
    /* Games: hide venue (col 7), quarter results (col 9) */
    .svc-scraped-games tr > *:nth-child(7),
    .svc-scraped-games tr > *:nth-child(9) {
        display: none;
    }

    /* Standings: hide S/U/N (col 5,6,7), Tore (col 8) */
    .svc-scraped-standings tr > *:nth-child(5),
    .svc-scraped-standings tr > *:nth-child(6),
    .svc-scraped-standings tr > *:nth-child(7),
    .svc-scraped-standings tr > *:nth-child(8) {
        display: none;
    }

    .svc-scraped-table th,
    .svc-scraped-table td {
        padding: 4px 6px;
        font-size: 0.9em;
    }
}

/* Responsive: scrollable table wrappers */
@media (max-width: 600px) {
    .svc-games-wrapper,
    .svc-competition-matches,
    .svc-competition-table,
    .svc-section.svc-training {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        background:
            linear-gradient(to left, rgba(0, 0, 0, .1), transparent 30px) right / 30px 100% no-repeat scroll,
            linear-gradient(to left, #fff, #fff) right / 30px 100% no-repeat local;
    }
}

/* Responsive: training table */
@media (max-width: 600px) {
    .svc-training-table,
    .svc-training-table thead,
    .svc-training-table tbody,
    .svc-training-table th,
    .svc-training-table td,
    .svc-training-table tr {
        display: block;
    }

    .svc-training-table thead {
        display: none;
    }

    .svc-training-table td {
        display: flex;
        padding: 4px 6px;
        border: none;
        font-size: 0.9em;
    }

    .svc-training-table td::before {
        content: attr(data-label);
        font-weight: 600;
        flex-shrink: 0;
        width: 70px;
    }

    .svc-training-table tr {
        border-bottom: 1px solid #ddd;
        padding: 8px 0;
    }
}

/* ── Game list shortcode [svc_games] ─────────────────────── */

.svc-games-list {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.svc-games-list th,
.svc-games-list td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.svc-games-list th {
    background: #f5f5f5;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.svc-games-list tbody tr:hover {
    background: #fafafa;
}

.svc-games-list .svc-game-date {
    white-space: nowrap;
}

.svc-games-list .svc-game-score {
    text-align: center;
    white-space: nowrap;
}

.svc-games-list .svc-game-score a {
    text-decoration: underline;
}

.svc-games-list .svc-game-tbd {
    color: #999;
}

.svc-games-list .svc-time {
    font-size: 14px;
    color: #666;
}

.svc-game-badge {
    display: inline-block;
    background: var(--svc-accent, #0073aa);
    color: var(--svc-accent-text, #fff);
    padding: 1px 8px;
    border-radius: 3px;
    font-size: 0.85em;
    white-space: nowrap;
}

.svc-games-empty {
    color: #666;
    font-style: italic;
}

/* iCal subscribe/download links */
.svc-ical-links {
    display: flex;
    gap: 0.75em;
    margin-top: 0.75em;
    flex-wrap: wrap;
}

.svc-ical-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.svc-ical-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

.svc-ical-btn--subscribe {
    background: var(--svc-accent, #0073aa);
    color: var(--svc-accent-text, #fff);
}

.svc-ical-btn--subscribe:hover {
    opacity: 0.85;
    color: var(--svc-accent-text, #fff);
}

.svc-ical-btn--download {
    background: #f0f0f1;
    color: #333;
}

.svc-ical-btn--download:hover {
    background: #ddd;
    color: #333;
}

/* Responsive: game list */
@media (max-width: 600px) {
    .svc-games-list .svc-game-league,
    .svc-games-list .svc-game-venue {
        display: none;
    }

    .svc-games-list th,
    .svc-games-list td {
        padding: 4px 6px;
        font-size: 0.9em;
    }

    .svc-games-list {
        table-layout: fixed;
    }

    .svc-games-list .svc-game-date {
        width: 70px;
        white-space: normal;
    }

    .svc-games-list .svc-game-home,
    .svc-games-list .svc-game-guest {
        hyphens: auto;
        -webkit-hyphens: auto;
        overflow-wrap: break-word;
        word-break: break-word;
    }
}

/* ── Calendar [svc_games_calendar] ───────────────────────── */

/* Offset for sticky headers when navigating via #svc-cal anchor */
#svc-cal {
    scroll-margin-top: 120px;
}

/* Navigation */
.svc-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 0.75em;
    gap: 0.5em 1em;
}

.svc-cal-nav-arrows {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.svc-cal-nav-title {
    font-weight: 700;
    font-size: 1.1em;
}

/* View toggles (Monat / Woche) */
.svc-cal-view-toggles {
    display: flex;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.svc-cal-view-toggle {
    padding: 4px 12px;
    font-size: 0.85em;
    text-decoration: none;
    color: #555;
    background: #f9f9f9;
    border-right: 1px solid #ddd;
    transition: background 0.15s, color 0.15s;
}

.svc-cal-view-toggle:last-child {
    border-right: none;
}

.svc-cal-view-toggle:hover {
    background: #eee;
}

.svc-cal-view-toggle--active {
    background: var(--svc-accent, #0073aa);
    color: var(--svc-accent-text, #fff);
}

.svc-cal-view-toggle--active:hover {
    background: var(--svc-accent, #0073aa);
    color: var(--svc-accent-text, #fff);
}

.svc-cal-nav-prev,
.svc-cal-nav-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f0f1;
    color: #333;
    text-decoration: none;
    font-size: 1.4em;
    line-height: 1;
    transition: background 0.15s;
}

.svc-cal-nav-prev:hover,
.svc-cal-nav-next:hover {
    background: var(--svc-accent, #0073aa);
    color: var(--svc-accent-text, #fff);
}

/* Grid */
.svc-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #ddd;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

/* Day-of-week headers */
.svc-cal-header {
    background: #f5f5f5;
    padding: 6px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85em;
    color: #555;
}

/* Day cells */
.svc-cal-day {
    background: #fff;
    min-height: 100px;
    padding: 4px;
    vertical-align: top;
}

.svc-cal-day--other {
    background: #fafafa;
    color: #bbb;
}

.svc-cal-day--other .svc-cal-day-nr {
    color: #ccc;
}

.svc-cal-day--today {
    box-shadow: inset 0 0 0 2px var(--svc-accent, #0073aa);
}

.svc-cal-day-nr {
    display: block;
    font-weight: 600;
    font-size: 0.85em;
    margin-bottom: 2px;
    color: #333;
}

/* Calendar event badges container */
.svc-cal-event-badges {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

/* Category badge — secondary style */
.svc-game-badge--cat {
    background: #666;
}

/* Training-group chips on synced events */
.svc-cal-event-groups {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    margin-top: 2px;
}
.svc-game-badge--group {
    background: color-mix(in srgb, var(--svc-accent, #0073aa) 12%, transparent);
    color: var(--svc-accent, #0073aa);
    border: 1px solid color-mix(in srgb, var(--svc-accent, #0073aa) 30%, transparent);
}

.svc-cal-event-location {
    display: block;
    font-size: 0.85em;
    color: #666;
}

/* Events inside day cells */
.svc-cal-event {
    background: color-mix(in srgb, var(--svc-accent, #0073aa) 10%, transparent);
    border-left: 3px solid var(--svc-accent, #0073aa);
    border-radius: 2px;
    padding: 3px 5px;
    margin-bottom: 3px;
    font-size: 0.85em;
    line-height: 1.4;
    /* Lange Wörter (z.B. „Überprüfungswettkampf") sauber trennen statt abschneiden */
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* Custom events (manual dates) — lighter style */
.svc-cal-event.svc-cal-event--custom {
    background: #f5f5f5;
    border-left: 3px solid #ccc;
    color: #555;
}

.svc-cal-event-time {
    font-weight: 600;
    white-space: nowrap;
}

.svc-cal-event-teams {
    display: block;
}

.svc-cal-event-score {
    font-weight: 700;
    white-space: nowrap;
}

.svc-cal-empty {
    text-align: center;
    color: #ccc;
    padding: 8px;
}

/* ── Week view specifics ─────────────────────────────────── */

.svc-cal--week .svc-cal-grid {
    grid-template-columns: repeat(7, 1fr);
}

.svc-cal-day-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
    padding-bottom: 3px;
    border-bottom: 1px solid #eee;
}

.svc-cal-day-label {
    font-weight: 700;
    font-size: 0.85em;
}

.svc-cal--week .svc-cal-day-nr {
    font-weight: 400;
    color: #888;
    font-size: 0.8em;
}

.svc-cal-event--detail {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.svc-cal-event--detail .svc-cal-event-teams {
    display: block;
}

.svc-cal-event--detail .svc-game-badge {
    font-size: 0.75em;
    padding: 0 5px;
    align-self: flex-start;
}

/* ── Mobile list (hidden on desktop) ─────────────────────── */

.svc-cal-mobile {
    display: none;
}

.svc-cal-mobile-day {
    margin-bottom: 1em;
}

.svc-cal-mobile-header {
    font-weight: 700;
    font-size: 0.95em;
    padding: 6px 0;
    border-bottom: 2px solid var(--svc-accent, #0073aa);
    margin-bottom: 4px;
}

.svc-cal-mobile-empty {
    color: #888;
    font-style: italic;
    padding: 1em 0;
}

/* ── Calendar responsive ─────────────────────────────────── */

@media (max-width: 600px) {
    /* Month: hide grid, show mobile list */
    .svc-cal--month .svc-cal-grid {
        display: none;
    }

    .svc-cal-mobile {
        display: block;
    }

    /* Week: vertical stack */
    .svc-cal--week .svc-cal-grid {
        grid-template-columns: 1fr;
    }

    .svc-cal--week .svc-cal-day {
        min-height: auto;
    }
}
