/* Competition summary and history presentation. */
:root {
    --lps-green: #0b6a42;
    --lps-green-dark: #075234;
    --lps-surface: #ffffff;
    --lps-background: #f3f6f4;
    --lps-border: #d3ddd6;
    --lps-text: #1f2923;
    --lps-muted: #66736b;
}

.competition-section {
    background: var(--lps-background);
    padding: 3rem 0;
}

.competition-shell {
    width: min(1500px, calc(100% - 2rem));
    margin: 0 auto;
}

.competition-summary {
    padding: 1.25rem 0 0;
    text-align: left;
}

.competition-summary__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.9rem;
    border-bottom: 2px solid var(--lps-green);
}

.competition-eyebrow {
    display: block;
    margin-bottom: 0.1rem;
    color: var(--lps-green);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.competition-title {
    margin: 0;
    color: var(--lps-text);
    font-size: clamp(1.5rem, 3vw, 2.15rem);
}

.competition-standing-summary {
    flex: 0 0 auto;
    padding-bottom: 0.15rem;
    color: var(--lps-muted);
    font-size: 1rem;
    font-weight: 700;
}

.team-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.8rem;
}

.team-group {
    --team-color: var(--lps-green);
    --team-text: #ffffff;
    flex: 1 1 260px;
    min-width: min(100%, 230px);
    max-width: 380px;
    border: 1px solid var(--lps-border);
    background: var(--lps-surface);
}

.team-group__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 64px;
    padding: 0.65rem 0.8rem;
    background: var(--team-color);
    color: var(--team-text);
}

.team-badge-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.94);
}

.team-badge {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.team-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    color: inherit;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    padding: 0 0.55rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
}

.team-player-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.team-player {
    padding: 0.55rem 0.8rem;
    border-top: 1px solid #edf1ee;
    color: var(--lps-text);
    font-size: 0.9rem;
    line-height: 1.2;
}

.team-player:first-child {
    border-top: 0;
}

.team-grid.density-large {
    gap: 0.65rem;
}

.team-grid.density-large .team-group {
    flex-basis: 220px;
    max-width: 320px;
}

.team-grid.density-large .team-group__header {
    min-height: 54px;
    gap: 0.6rem;
    padding: 0.5rem 0.65rem;
}

.team-grid.density-large .team-badge-wrap {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    padding: 4px;
}

.team-grid.density-large .team-name {
    font-size: 0.92rem;
}

.team-grid.density-large .team-count {
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.45rem;
    font-size: 0.75rem;
}

.team-grid.density-large .team-player {
    padding: 0.42rem 0.65rem;
    font-size: 0.84rem;
}

.history-panel {
    margin-top: 1.25rem;
    border-top: 1px solid var(--lps-border);
    background: transparent;
    text-align: left;
}

.history-panel > summary {
    padding: 0.9rem 0;
    color: var(--lps-green-dark);
    cursor: pointer;
    font-weight: 700;
    list-style-position: inside;
}

.history-panel[open] > summary {
    border-bottom: 1px solid var(--lps-border);
}

.history-frame-wrap {
    width: 100%;
    overflow: hidden;
}

#myIframe {
    display: block;
    width: 100%;
    min-height: 450px;
    border: 0;
    background: var(--lps-green);
}

@media (max-width: 767.98px) {
    .competition-section {
        padding: 2rem 0;
    }

    .competition-shell {
        width: min(100% - 1rem, 1500px);
    }

    .competition-summary {
        padding-top: 0.5rem;
    }

    .competition-summary__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;
    }

    .competition-standing-summary {
        padding-bottom: 0;
        font-size: 0.9rem;
    }

    .team-group,
    .team-grid.density-large .team-group {
        flex: 1 1 calc(50% - 0.4rem);
        min-width: min(100%, 210px);
        max-width: none;
    }
}

@media (max-width: 520px) {
    .team-group,
    .team-grid.density-large .team-group {
        flex-basis: 100%;
        min-width: 100%;
    }
}



.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

#results,
#register {
    font-family: "Merriweather Sans", sans-serif;
}

.competition-section {
    padding: 2.25rem 0;
}

.results-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: 820px;
    margin: 0 auto;
    padding: 0.25rem 0;
    text-align: left;
}

.results-notice h2 {
    margin: 0 0 0.3rem;
    color: var(--lps-text);
    font-size: 1.4rem;
}

.results-notice p {
    margin: 0;
    color: var(--lps-muted);
    font-size: 0.95rem;
}

.results-status {
    flex: 0 0 auto;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--lps-border);
    color: var(--lps-green-dark);
    font-size: 0.78rem;
    font-weight: 700;
}

.registration-section {
    padding: 3.75rem 1rem 4.25rem;
    background: #ffffff;
}

.registration-card {
    max-width: 720px;
    margin: 0 auto;
    text-align: left;
}

.registration-card h2 {
    margin: 0 0 0.65rem;
    color: var(--lps-text);
    font-size: clamp(1.7rem, 4vw, 2.15rem);
}

.registration-intro {
    margin: 0;
    color: var(--lps-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.registration-countdown {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin: 1.5rem 0 1.75rem;
    padding-left: 0.9rem;
    border-left: 3px solid var(--lps-green);
}

.countdown-label {
    color: var(--lps-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.countdown-time {
    color: var(--lps-green-dark);
    font-size: 1.15rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.registration-actions {
    display: grid;
    gap: 0.75rem;
}

.registration-action {
    display: grid;
    grid-template-columns: 2rem 1fr auto;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--lps-border);
    background: #ffffff;
    color: var(--lps-text);
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.registration-action:hover {
    border-color: var(--lps-green);
    background: #f7faf8;
    color: var(--lps-text);
}

.registration-action--primary {
    border-color: var(--lps-green);
}

.action-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--lps-green);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
}

.registration-action strong,
.registration-action small {
    display: block;
}

.registration-action strong {
    font-size: 0.95rem;
}

.registration-action small {
    margin-top: 0.15rem;
    color: var(--lps-muted);
    font-size: 0.78rem;
}

.action-arrow {
    color: var(--lps-green);
    font-size: 1.25rem;
}

.registration-note {
    margin: 0.9rem 0 0;
    color: var(--lps-muted);
    font-size: 0.82rem;
}

.registration-countdown--closed {
    border-left-color: #8a2d2d;
}

.registration-countdown--closed .countdown-time {
    color: #8a2d2d;
}

@media (max-width: 575.98px) {
    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .results-notice {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.85rem;
    }

    .registration-section {
        padding-top: 2.75rem;
    }

    .registration-countdown {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }
}
