/*
 * HoFi Billard
 * Holdoversigt v2.0
 */

.teams-page {
    max-width: 1180px;
    margin: 0 auto;
}

.teams-page-header h1 {
    margin: .15rem 0;
}

.teams-page-header p {
    margin: 0;
    color: var(--muted);
}

.teams-page-kicker {
    display: block;
    color: var(--primary);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}


/* ---------------------------------------------------------
   Filter
   --------------------------------------------------------- */

.teams-filter-card {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    align-items: end;
    gap: 18px;
    padding: 16px 18px;
    margin-bottom: 14px;
}

.teams-filter-form label > span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: .73rem;
    font-weight: 700;
}

.teams-filter-form select {
    width: 100%;
}

.teams-status-filter {
    display: flex;
    align-items: center;
    gap: 5px;
}

.teams-status-filter > span {
    margin-right: 4px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
}

.teams-status-filter a {
    padding: 7px 10px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: .76rem;
    font-weight: 700;
}

.teams-status-filter a:hover,
.teams-status-filter a.active {
    color: #fff;
    background: var(--primary);
}


/* ---------------------------------------------------------
   Summary
   --------------------------------------------------------- */

.teams-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 20px;
}

.teams-summary-card {
    padding: 14px 16px;
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease;
}

.teams-summary-card:hover {
    transform: translateY(-1px);
}

.teams-summary-card span,
.teams-summary-card strong,
.teams-summary-card small {
    display: block;
}

.teams-summary-card span {
    color: var(--muted);
    font-size: .73rem;
    font-weight: 700;
}

.teams-summary-card strong {
    margin: 3px 0 1px;
    font-size: 1.55rem;
}

.teams-summary-card small {
    color: var(--muted);
    font-size: .69rem;
}

.teams-summary-card--selected {
    border-color: var(--primary);
}

.teams-summary-card--active strong {
    color: #4ade80;
}

.teams-summary-card--inactive strong {
    color: var(--muted);
}


/* ---------------------------------------------------------
   Heading
   --------------------------------------------------------- */

.teams-list-heading {
    margin-bottom: 10px;
}

.teams-list-heading h2 {
    margin: 0;
    font-size: 1.05rem;
}

.teams-list-heading p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: .76rem;
}


/* ---------------------------------------------------------
   Cards
   --------------------------------------------------------- */

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.team-card {
    padding: 0;
    overflow: hidden;
}

.team-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 18px 15px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.team-card-header:hover {
    background: rgba(59,130,246,.035);
}

.team-card-header h2 {
    margin: 4px 0 0;
    font-size: 1.1rem;
}

.team-card-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: .71rem;
    font-weight: 700;
}

.team-short-name {
    margin-top: 2px;
    color: var(--muted);
    font-size: .72rem;
}

.team-card-status {
    flex-shrink: 0;
}


/* ---------------------------------------------------------
   Team summary
   --------------------------------------------------------- */

.team-card-summary {
    display: grid;
    grid-template-columns: .55fr .75fr 1fr;
    border-bottom: 1px solid var(--border);
}

.team-card-summary > div {
    padding: 10px 13px;
    border-right: 1px solid var(--border);
}

.team-card-summary > div:last-child {
    border-right: 0;
}

.team-card-summary span,
.team-card-summary strong {
    display: block;
}

.team-card-summary span {
    color: var(--muted);
    font-size: .63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.team-card-summary strong {
    margin-top: 3px;
    font-size: .78rem;
}


/* ---------------------------------------------------------
   Players
   --------------------------------------------------------- */

.team-card-players {
    display: grid;
}

.team-player {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 95px;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    border-bottom: 1px solid var(--border);
    color: inherit;
    text-decoration: none;
}

.team-player:last-child {
    border-bottom: 0;
}

.team-player:hover {
    background: rgba(59,130,246,.04);
}

.team-player-order {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: var(--muted);
    background: rgba(148,163,184,.08);
    font-size: .68rem;
    font-weight: 800;
}

.team-player-name {
    font-size: .81rem;
    font-weight: 780;
}

.team-player-display {
    margin-top: 1px;
    color: var(--muted);
    font-size: .68rem;
}

.captain {
    margin-left: 4px;
    color: #f59e0b;
    font-size: .72rem;
}

.team-player-average {
    text-align: right;
}

.team-player-average span,
.team-player-average strong {
    display: block;
}

.team-player-average span {
    color: var(--muted);
    font-size: .59rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.team-player-average strong {
    margin-top: 2px;
    font-size: .8rem;
    font-variant-numeric: tabular-nums;
}


/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

.team-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px;
    border-top: 1px solid var(--border);
}

.team-card-competition-link {
    color: var(--primary);
    text-decoration: none;
    font-size: .72rem;
    font-weight: 700;
}

.team-card-competition-link:hover {
    text-decoration: underline;
}

.team-empty {
    padding: 24px 14px;
    text-align: center;
    color: var(--muted);
    font-size: .76rem;
}

.teams-empty {
    padding: 34px 20px;
    text-align: center;
}

.teams-empty-icon {
    margin-bottom: 7px;
    font-size: 1.7rem;
}

.teams-empty h2 {
    margin: 0;
}

.teams-empty p {
    margin: 5px 0 0;
    color: var(--muted);
}


/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 900px) {

    .team-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 700px) {

    .teams-filter-card {
        grid-template-columns: 1fr;
    }

    .teams-status-filter {
        flex-wrap: wrap;
    }

    .teams-summary {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 520px) {

    .team-card-summary {
        grid-template-columns: 1fr 1fr;
    }

    .team-card-summary > div:nth-child(2) {
        border-right: 0;
    }

    .team-card-summary > div:last-child {
        grid-column: 1 / -1;
        border-top: 1px solid var(--border);
    }

    .team-player {
        grid-template-columns: 24px minmax(0, 1fr) 88px;
    }

    .team-card-footer {
        align-items: stretch;
        flex-direction: column;
    }

}


/* v1.1 - typefilter */
.teams-filter-card {
    grid-template-columns: minmax(220px, 1fr) auto auto;
}

.teams-type-filter,
.teams-status-filter {
    display: flex;
    align-items: center;
    gap: 5px;
}

.teams-type-filter > span,
.teams-status-filter > span {
    margin-right: 4px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
}

.teams-type-filter a,
.teams-status-filter a {
    padding: 7px 10px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: .76rem;
    font-weight: 700;
}

.teams-type-filter a:hover,
.teams-type-filter a.active,
.teams-status-filter a:hover,
.teams-status-filter a.active {
    color: #fff;
    background: var(--primary);
}

@media (max-width: 820px) {
    .teams-filter-card {
        grid-template-columns: 1fr;
    }

    .teams-type-filter,
    .teams-status-filter {
        flex-wrap: wrap;
    }
}


/* v1.2 - permanent holdregister */
.team-competitions {
    padding: 10px 13px;
    border-bottom: 1px solid var(--border);
}

.team-section-label {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.team-competition-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.team-competition-chip {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(59,130,246,.08);
    color: var(--primary);
    text-decoration: none;
    font-size: .69rem;
    font-weight: 700;
}

.team-competition-chip:hover {
    background: rgba(59,130,246,.14);
}

.team-card-footer-note {
    color: var(--muted);
    font-size: .7rem;
}


/* Dark baseline alignment */
.teams-filter-card,
.teams-summary-card,
.team-card{
    background:var(--surface);
    border:1px solid var(--border);
    box-shadow:var(--shadow);
}

.team-card-header:hover{
    background:rgba(77,163,255,.08);
}


/* v3.1 - klikbar hold/par-header */
.team-card-header-link{
    cursor:pointer;
}

.team-card-header-link:hover{
    background:rgba(77,163,255,.08);
}

.team-card-header-link:focus-visible{
    outline:2px solid var(--primary);
    outline-offset:-2px;
}
