/* Liga / Begegnungen view — Kickbase reference + meeting-modal look */


.liga-stickybar {
    position: sticky;
    top: 0;
    z-index: 5;
    background-color: var(--base-color);
    padding: .5rem 0 .75rem 0;
}

/* overlay must cover the sticky bar, but stay below the modal (z-index 10) */
#modal-overlay {
    z-index: 8;
}

.liga-switcher {
    display: flex;
    justify-content: center;
    margin: 0 auto 1rem auto;
    width: min(1000px, 100%);
}

#liga-select {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: transparent;
    border: none;
    color: var(--White);
    font-family: KB_Volksans-Regular;
    font-size: 1.1rem;
    letter-spacing: .05em;
    cursor: pointer;
    padding: .5rem 1rem;
    border-radius: .5rem;
    max-width: 100%;
}

#liga-select:hover {
    background-color: var(--Light-Black);
}

#liga-select-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70vw;
}

#liga-select .fa-chevron-up,
#liga-select .fa-chevron-down {
    font-size: .6rem;
}

.liga-tabs {
    display: flex;
    justify-content: space-evenly;
    gap: 2rem;
    width: min(1000px, 100%);
    margin: 0 auto;
    color: var(--Grey);
    font-family: KB_Volksans-Regular;
    font-size: .95rem;
    letter-spacing: .04em;
    line-height: 1.3;
}

.liga-tabs button {
    background: transparent;
    border: none;
    padding: .25rem 0;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}

.liga-tabs button:hover {
    color: var(--White);
}

.liga-tabs .active {
    color: var(--White);
}

#liga-list[hidden],
#liga-table[hidden] {
    display: none;
}

#liga-table {
    width: min(1000px, 100%);
    margin: 0 auto;
    padding-bottom: 3rem;
}

#liga-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: min(1000px, 100%);
    margin: 0 auto;
    padding-bottom: 3rem;
    scroll-margin-top: 1rem;
}

.liga-status {
    width: min(1000px, 100%);
    margin: 0 auto;
    padding: 1rem;
    text-align: center;
    color: var(--Light-Grey);
}

.spieltag-card {
    background-color: #1b1b1e;
    border-radius: 1.25rem;
    padding: 1.25rem .9rem 1rem .9rem;
    display: flex;
    flex-direction: column;
    gap: .8rem;
    scroll-margin-top: 9rem;
}

.spieltag-title {
    font-family: KB_Pitch-Still;
    font-size: 1.6rem;
    letter-spacing: .04em;
    line-height: 1.3;
    margin: 0 0 .25rem .25rem;
}

.date-pill-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: .25rem 0;
}

.date-pill-row hr {
    flex-grow: 1;
    border: none;
    border-top: 1px solid var(--Dark-Grey);
}

.date-pill {
    padding: .3rem .9rem;
    border-radius: 1rem;
    background-color: var(--Dark-Grey);
    color: var(--White);
    font-size: .9rem;
    letter-spacing: .04em;
    line-height: 1.4;
    white-space: nowrap;
}

.liga-match {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(4.5rem, auto) auto minmax(0, 1fr);
    align-items: center;
    gap: .6rem;
    width: 100%;
    background-color: var(--Light-Black);
    border: 1px solid transparent;
    border-radius: .9rem;
    padding: .9rem .75rem;
    color: var(--White);
    font-family: KB_Volksans-Regular;
}

button.liga-match {
    cursor: pointer;
}

button.liga-match:hover {
    border-color: var(--Grey);
}

.liga-match.is-scheduled {
    cursor: default;
}

.liga-match .team {
    min-width: 0;
    font-size: .95rem;
    line-height: 1.4;
    letter-spacing: .02em;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.liga-match .team.home {
    text-align: right;
}

.liga-match .team.away {
    text-align: left;
}

.liga-match img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.liga-match .center {
    font-family: KB_Pitch-Still;
    letter-spacing: .03em;
    line-height: 1.3;
    white-space: nowrap;
    min-width: 3.5rem;
    text-align: center;
}

.liga-match.is-done .center {
    font-size: 1.5rem;
}

.liga-match.is-scheduled .center {
    font-size: 1.1rem;
    color: var(--Light-Grey);
}

.liga-match.is-own {
    border-color: var(--Dark-Grey);
}

/* league table (TABELLE tab) — Kickbase reference */
.tabelle-card {
    background-color: #1b1b1e;
    border-radius: 1.25rem;
    padding: 1.25rem .9rem 1rem .9rem;
    display: flex;
    flex-direction: column;
}

.tabelle-row {
    display: grid;
    grid-template-columns: 2.5rem 2.5rem minmax(0, 1fr) 2.75rem 2.75rem 3.25rem;
    align-items: center;
    gap: .5rem;
    padding: .8rem .25rem;
    color: var(--White);
    font-family: KB_Volksans-Regular;
    font-size: .95rem;
    letter-spacing: .02em;
    line-height: 1.4;
}

.tabelle-row + .tabelle-row {
    border-top: 1px solid var(--Light-Black);
}

.tabelle-head {
    padding-top: 0;
    color: var(--Grey);
    font-size: .85rem;
    letter-spacing: .04em;
}

.tabelle-head .c-stat {
    font-family: KB_Volksans-Regular;
}

.tabelle-row .c-rank {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-family: KB_Pitch-Still;
    font-size: 1.1rem;
}

.tabelle-row .c-tend {
    font-size: .6rem;
}

.tabelle-row .tend-rise {
    color: var(--bar4);
}

.tabelle-row .tend-fall {
    color: var(--bar1);
}

.tabelle-row .tend-steady {
    color: var(--Grey);
}

.tabelle-row .c-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tabelle-row .c-logo img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.tabelle-row .c-name {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-transform: uppercase;
}

.tabelle-row .c-stat {
    font-family: KB_Pitch-Still;
    font-size: 1.1rem;
    text-align: right;
    white-space: nowrap;
    letter-spacing: 8%;
}

.tabelle-row .c-points {
    color: var(--White);
}

.tabelle-row.is-own {
    background-color: var(--Light-Black);
    border-radius: .6rem;
    border-top: none;
}

.tabelle-row.is-own + .tabelle-row {
    border-top: none;
}

.tabelle-row.is-excluded {
    opacity: .45;
}

/* league selection bottom sheet — screenshot 3 */
.liga-modal {
    top: auto;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%);
    width: min(700px, 100%);
    max-height: 75%;
    border-radius: 1rem 1rem 0 0;
}

.liga-modal.active {
    transform: translate(-50%, 0);
}

.liga-modal-title {
    font-family: KB_Pitch-Still;
    font-size: 1.1rem;
    letter-spacing: .04em;
    line-height: 1.3;
}

.liga-select-list {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.liga-select-row {
    display: flex;
    align-items: center;
    gap: .9rem;
    width: 100%;
    padding: .8rem .75rem;
    background: transparent;
    border: none;
    border-radius: .6rem;
    color: var(--White);
    font-size: 1rem;
    letter-spacing: .02em;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}

.liga-select-row:hover {
    background-color: var(--Light-Black);
}

.liga-select-row.active {
    background-color: var(--Light-Black);
}

.liga-select-row img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    flex-shrink: 0;
}

.liga-select-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 700px) {
    .spieltag-title {
        font-size: 2rem;
    }

    .liga-match {
        padding: 1rem 1.25rem;
    }

    .liga-match img {
        width: 2.5rem;
        height: 2.5rem;
    }
}
