/* ─────────────────────────────────────────────────────────────────────────────
   calendar.css — the new EventCalendar-based calendars (league + facility).
   Brand: navy #2c3158 / deep navy #0a2b5a / red #c8102e.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── EventCalendar theme (its own CSS variables) ─────────────────────────── */
.isc-cal .ec {
    --ec-border-color: #e3e6ef;
    --ec-today-bg-color: rgba(200, 16, 46, .06);
    --ec-highlight-color: rgba(44, 49, 88, .08);
    --ec-now-indicator-color: #c8102e;
    --ec-button-bg-color: #fff;
    --ec-button-border-color: #d5d9e6;
    --ec-button-text-color: #2c3158;
    --ec-button-active-bg-color: #2c3158;
    --ec-button-active-border-color: #2c3158;
    --ec-button-active-text-color: #fff;
    --ec-event-bg-color: #2c3158;
    --ec-event-text-color: #fff;
    font-family: inherit;
    font-size: .92rem;
}
.isc-cal .ec-toolbar { margin-bottom: 1rem; gap: .5rem; flex-wrap: wrap; }
.isc-cal .ec-title { font-weight: 800; color: #0a2b5a; font-size: 1.45rem; letter-spacing: -.01em; }
.isc-cal .ec-button { font-weight: 600; border-radius: 8px; padding: .38rem .8rem; }
.isc-cal .ec-button-group .ec-button { border-radius: 0; }
.isc-cal .ec-button-group .ec-button:first-child { border-radius: 8px 0 0 8px; }
.isc-cal .ec-button-group .ec-button:last-child { border-radius: 0 8px 8px 0; }
.isc-cal .ec-day-head, .isc-cal .ec-col-head { font-weight: 700; color: #4a5070; text-transform: uppercase;
                                              font-size: .72rem; letter-spacing: .06em; }
.isc-cal .ec-today .ec-day-head { color: #c8102e; }

/* ── Shell around the calendar ───────────────────────────────────────────── */
.isc-cal {
    background: #fff;
    border: 1px solid #e3e6ef;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(10, 43, 90, .08);
    padding: 1.25rem;
    margin: 1.25rem auto;
    max-width: 1400px;
}
.isc-cal-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eef0f6;
}
.isc-cal-bar label { font-weight: 600; color: #4a5070; font-size: .85rem; margin: 0 .4rem 0 0; }
.isc-cal-bar .form-select { width: auto; min-width: 200px; display: inline-block; }
.isc-legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .8rem; color: #4a5070; margin-left: auto; }
.isc-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.isc-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.isc-preview-banner {
    max-width: 1400px; margin: 1rem auto 0;
    background: #fff8e1; border: 1px solid #f4d27a; color: #5c4400;
    border-radius: 10px; padding: .6rem 1rem; font-size: .9rem;
}

/* ── Events ──────────────────────────────────────────────────────────────── */
.isc-cal .ec-event { border-radius: 6px; box-shadow: none; border-left: 4px solid rgba(0, 0, 0, .25); cursor: pointer; }
.isc-cal .ec-event:hover { filter: brightness(1.08); }
.isc-ev-upcoming { background: #2c3158 !important; }
.isc-ev-final { background: #6b7190 !important; }
.isc-ev-playoffs { border-left-color: #f4b400 !important; }
.isc-ev-mine { box-shadow: 0 0 0 2px #c8102e inset !important; }
.isc-ev-rental { background: #1f7a5a !important; }
.isc-ev-rental.isc-ev-single { background: #2f9e78 !important; }

.isc-ev-body { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; overflow: hidden; }
.isc-ev-time { font-size: .72rem; opacity: .85; font-weight: 600; }
.isc-ev-line { font-weight: 600; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.isc-ev-score { font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, .18);
                border-radius: 4px; padding: 0 4px; margin: 0 2px; }
.isc-ev-tag { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #ffd76a; }

/* List views: roomier rows, real cards */
.isc-cal .ec-list .ec-event { background: transparent !important; color: #1d2240; border-left: none;
                              padding: .6rem .4rem; }
.isc-cal .ec-list .ec-event:hover { background: #f5f6fb !important; filter: none; }
.isc-cal .ec-list .isc-ev-line { font-size: .95rem; white-space: normal; }
.isc-cal .ec-list .isc-ev-score { background: #eef0f7; color: #0a2b5a; }
.isc-cal .ec-list .isc-ev-tag { color: #b07d00; }
.isc-cal .ec-list .ec-event-tag { width: 10px; border-radius: 3px; }
.isc-cal .ec-list .ec-day-head { background: #f5f6fb; color: #0a2b5a; font-size: .8rem; }

/* ── Detail modal ────────────────────────────────────────────────────────── */
.isc-game-modal .modal-header { background: #0a2b5a; border-bottom: 4px solid #c8102e; color: #fff; }
.isc-game-modal .modal-title { font-weight: 800; }
.isc-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .75rem; text-align: center; margin: .5rem 0 1rem; }
.isc-match .team { font-weight: 800; color: #0a2b5a; font-size: 1.05rem; line-height: 1.2; }
.isc-match .team a { color: inherit; text-decoration: none; }
.isc-match .team a:hover { text-decoration: underline; }
.isc-match .score { font-size: 2rem; font-weight: 900; color: #1d2240; font-variant-numeric: tabular-nums; }
.isc-match .vs { font-weight: 700; color: #8a90ab; }
.isc-match .winner { color: #c8102e; }
.isc-meta { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; font-size: .88rem; color: #4a5070; }
.isc-meta .badge { font-weight: 600; }

@media (max-width: 767.98px) {
    .isc-cal { padding: .75rem; border-radius: 10px; margin: .75rem 0; }
    .isc-cal .ec-title { font-size: 1.15rem; }
    .isc-legend { margin-left: 0; }
    .isc-cal-bar .form-select { min-width: 0; width: 100%; }
}

/* Scoreboard rows inside grid events */
.isc-ev-team { display: flex; justify-content: space-between; gap: .35rem; font-size: .8rem; font-weight: 600; line-height: 1.3; }
.isc-ev-team .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.isc-ev-team .pts { font-variant-numeric: tabular-nums; font-weight: 800; flex-shrink: 0; }
.isc-ev-team.loss { opacity: .72; }
.isc-ev-team.win .name, .isc-ev-team.win .pts { color: #fff; }
.isc-cal .ec-event .isc-ev-time { display: flex; align-items: center; }
.isc-cal .ec-event-body, .isc-ev-body { width: 100%; min-width: 0; }

/* List rows: time column + matchup */
.isc-ev-body.isc-ev-listrow { flex-direction: row; align-items: baseline; gap: 1rem; }
.isc-ev-listtime { width: 5.5rem; flex-shrink: 0; font-weight: 700; color: #c8102e; font-size: .88rem; }
.isc-ev-listmain { min-width: 0; }
.isc-cal .ec-list .isc-ev-mine { box-shadow: none !important; }
.isc-cal .ec-list .isc-ev-mine .isc-ev-line { font-weight: 800; }

/* ── Phones, Month view: compact chips (time + score), tap for details ───── */
.isc-ev-compact { width: 100%; text-align: center; line-height: 1.15; padding: 1px 0; }
.isc-ev-compact-time { font-size: .72rem; font-weight: 700; white-space: nowrap; }
.isc-ev-compact-score { font-size: .7rem; font-weight: 800; font-variant-numeric: tabular-nums; opacity: .9; white-space: nowrap; }
.isc-phone-hint { display: none; font-size: .82rem; color: #5a6080; margin: -.25rem 0 .75rem; }
@media (max-width: 575.98px) {
    .isc-phone-hint { display: block; }
    .isc-cal .ec-month-view .ec-event { border-left-width: 3px; padding: 1px 2px; }
    .isc-cal .ec-month-view .ec-day-head { font-size: .62rem; letter-spacing: .02em; }
    .isc-cal .ec-toolbar .ec-button { padding: .32rem .6rem; font-size: .85rem; }
}

/* ── All-leagues hockey calendar ─────────────────────────────────────────── */
.isc-hockey-head {
    max-width: 1400px; margin: 1rem auto 0;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem;
    background: linear-gradient(120deg, #0a2b5a, #2c3158);
    border-bottom: 4px solid #c8102e; border-radius: 12px;
    color: #fff; padding: 1.1rem 1.4rem;
}
.isc-hockey-head h1 { font-size: 1.6rem; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.isc-hockey-head p { margin: .15rem 0 0; opacity: .8; font-size: .95rem; }
/* League colour on the left edge of each game (set per event from the league) */
.isc-cal .ec-event { border-left-width: 5px; }
.isc-cal .ec-list .ec-event-tag { background: var(--isc-league-color, #2c3158) !important; }
@media (max-width: 575.98px) {
    .isc-hockey-head h1 { font-size: 1.25rem; }
}
