/* Baseball section for the Lampa fork — mirrors the Twitch card metrics so the
   two sections read as one app. Uses a padding-ratio box rather than CSS
   aspect-ratio, which old webOS Chromium (<88) does not support. */

.baseball-card {
    width: 16em;
    flex-shrink: 0;
}
.baseball-card + .baseball-card {
    margin-left: 1em;
}
.baseball-card .card__view {
    padding-bottom: 56.25%;
    background: #3e3e3e;
    border-radius: 0.3em;
    overflow: hidden;
}
.baseball-card__live {
    position: absolute;
    top: 0.4em;
    left: 0.4em;
    background: #e91916;
    color: #fff;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.12em 0.45em;
    border-radius: 0.2em;
    z-index: 2;
}
.baseball-card__meta {
    margin-top: 0.25em;
    font-size: 0.9em;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Placeholder shown for a league with nothing on right now. Not focusable-
   looking, but it still takes focus so the row is reachable by D-pad. */
.baseball-card--empty .card__view {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 0;
    height: 9em;
    background: rgba(255, 255, 255, 0.06);
}
.baseball-card__note {
    padding: 0 1em;
    text-align: center;
    font-size: 0.95em;
    opacity: 0.65;
}

/* ------------------------------------------------------------------------ */
/* Schedule cards — the fixture lines under the live one                     */
/* ------------------------------------------------------------------------ */

.baseball-sched .card__view {
    background: rgba(255, 255, 255, 0.06);
}
.baseball-sched__teams {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.baseball-sched__logo {
    width: 3.6em;
    height: 3.6em;
    object-fit: contain;
    flex-shrink: 0;
}
/* Two team names on one card wrap often, so pin the title to a two-line box:
   otherwise a long pairing pushes that card's time out of step with the row. */
.baseball-sched .card__title {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    height: 2.4em;
}
/* Reserved even when empty (an upcoming game shows its time in the middle of
   the card instead), so a day that mixes played and upcoming games stays even. */
.baseball-sched .baseball-card__meta {
    min-height: 1.2em;
}
.baseball-sched__score {
    min-width: 4em;
    text-align: center;
    font-size: 1.1em;
    font-weight: 700;
    white-space: nowrap;
}

/* Corner badge. Same metrics as the LIVE flag on a live card, which keeps the
   two kinds of card reading as one set. */
.baseball-card__tag {
    position: absolute;
    top: 0.4em;
    left: 0.4em;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.12em 0.45em;
    border-radius: 0.2em;
    color: #fff;
    z-index: 2;
}
.baseball-card__tag--live {
    background: #e91916;
}
.baseball-card__tag--muted {
    background: rgba(255, 255, 255, 0.2);
}

/* ------------------------------------------------------------------------ */
/* Replays — "More" at the end of the line, and the archive grid behind it   */
/* ------------------------------------------------------------------------ */

/* A replay is a fixture card with a play mark in place of the score. */
.baseball-sched__play svg {
    width: 2em;
    height: 2em;
    vertical-align: middle;
    opacity: 0.85;
}
.baseball-card--more .card__view {
    background: rgba(255, 255, 255, 0.08);
}
.baseball-card__label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
}
/* Comes after the ".baseball-card + .baseball-card" rule on purpose: same
   specificity, and in a wrapping grid every card needs the same margins. */
.baseball-grid {
    display: flex;
    flex-wrap: wrap;
    padding: 1em 1em 2em;
}
.baseball-grid .card {
    margin: 0 1.2em 1.6em 0;
}
