/* ============================================================
   LIVE SCHEDULE + MAP COMPONENTS (home + schedule pages)
   Consumes main.css tokens: --brand, --brand-deep, --gold.
   Live green is local: --live.
============================================================ */

:root {
    --live: #1f9d55;
}

/* ------------------------------
   LAYOUT
------------------------------ */
.week-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    align-items: start;
}

@media (min-width: 980px) {
    .week-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(360px, 1fr);
        gap: 28px;
    }
}

/* ------------------------------
   MAP BOX (must stay positioned — markers anchor to it)
------------------------------ */
.pb-map {
    position: relative;
    width: 100%;
    height: clamp(420px, 44vw, 560px);
    border-radius: 20px;
    overflow: hidden;
    background: #dfe9e9;
    border: 1px solid rgba(5, 54, 54, 0.25);
    box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.16),
        0 3px 12px rgba(0, 0, 0, 0.08);
}

@media (max-width: 640px) {
    .pb-map {
        height: min(96vw, 420px);
    }
}

.pb-map__state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    padding: 24px;
    color: var(--brand-deep);
    z-index: 2;
}

.pb-map__state strong {
    font-size: 1.05rem;
}

.pb-map__state span {
    font-size: 0.95rem;
    color: rgba(5, 54, 54, 0.75);
}

.pb-map__state a {
    color: var(--brand);
    font-weight: 700;
}

.pb-map__note {
    position: absolute;
    left: 12px;
    bottom: 10px;
    margin: 0;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    font-size: 0.8rem;
    color: rgba(5, 54, 54, 0.85);
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* control cluster */
.pb-map__controls {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 4;
}

.pb-map__btn {
    /* 44px tall: these sit on a map, so mis-taps pan the map instead */
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    background: #ffffff;
    color: #163232;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
    transition: background 0.15s ease, transform 0.15s ease;
}

.pb-map__btn:hover {
    background: #f2f7f6;
    transform: translateY(-1px);
}

.pb-map__btn--reset {
    text-transform: uppercase;
    font-size: 12px;
}

.map-note {
    margin: 10px 2px 0;
    font-size: 0.88rem;
    color: rgba(5, 44, 44, 0.78);
}

.map-note a {
    color: var(--brand);
    font-weight: 700;
}

/* ------------------------------
   PINS
------------------------------ */
.pin {
    display: flex;
    align-items: center;
    justify-content: center;
    /* 34px: these are tapped on a map, where a miss pans instead */
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 2px solid #ffffff;
    background: var(--brand);
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.pin:hover,
.pin.is-hot {
    background: var(--gold);
    color: #163232;
    transform: scale(1.12);
    z-index: 5;
}

.pin--today {
    width: 42px;
    height: 42px;
    font-size: 17px;
    border-radius: 12px;
    background: var(--brand-deep);
}

.pin--live {
    background: var(--live);
}

.pin--today.pin--live {
    animation: pin-ripple 2.2s ease-out infinite;
}

@keyframes pin-ripple {
    0% { box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(31, 157, 85, 0.5); }
    70% { box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35), 0 0 0 14px rgba(31, 157, 85, 0); }
    100% { box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(31, 157, 85, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .pin--today.pin--live { animation: none; }
}

/* ------------------------------
   TODAY CARD
------------------------------ */
.today-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(5, 54, 54, 0.16);
    border-left: 5px solid var(--brand);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.07),
        0 2px 6px rgba(0, 0, 0, 0.05);
    padding: 18px 20px 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.today-card.is-live {
    border-left-color: var(--live);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.07),
        0 0 0 1px rgba(31, 157, 85, 0.25);
}

.today-card__label {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 6px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(5, 54, 54, 0.12);
    font-family: "Marcellus", Georgia, serif;
    font-size: 1.15rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand-deep);
}

.today-card__date {
    font-family: "Overlock", sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(5, 54, 54, 0.6);
}

/* rows */
.today-event {
    position: relative;
    padding: 12px 8px 12px 12px; /* number sits a bit further right of the ledge */
    border-bottom: 1px dashed rgba(5, 54, 54, 0.15);
    border-radius: 8px;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.today-event:last-child {
    border-bottom: none;
}

/* hovering the pin (or the row) glows the row in the brand teal */
.today-event.is-hot {
    background: linear-gradient(90deg, rgba(18, 128, 128, 0.14), rgba(18, 128, 128, 0.03));
    box-shadow:
        0 0 0 1px rgba(18, 128, 128, 0.35),
        0 4px 18px rgba(18, 128, 128, 0.35);
}

/* the ledge — pulled left of the row, pill-shaped, teal with the number */
.today-event.is-hot::before {
    content: "";
    position: absolute;
    left: -9px;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 999px;
    background: var(--brand);
}

/* the number square flips GOLD, matching the hot pin on the map */
.today-event.is-hot .today-event__num {
    background: var(--gold);
    color: #4b2e00;
}

.today-event__top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.today-event__num,
.week-item__num {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: var(--brand);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.today-event__time {
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: 0.04em;
    color: var(--brand-deep);
}

.badge-live {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 12px;
    border-radius: 999px;
    background: rgba(31, 157, 85, 0.12);
    color: var(--live);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.badge-live::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--live);
    box-shadow: 0 0 0 0 rgba(31, 157, 85, 0.45);
    animation: live-dot 2s ease-out infinite;
}

@keyframes live-dot {
    0% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0.45); }
    70% { box-shadow: 0 0 0 7px rgba(31, 157, 85, 0); }
    100% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .badge-live::before { animation: none; }
}

.today-event__summary {
    margin: 6px 0 2px;
    padding-left: 34px;
    font-weight: 700;
    font-size: 1.05rem;
    color: #10312f;
    line-height: 1.4;
}

.today-event__where,
.week-item__where {
    display: inline-block;
    margin: 2px 0 0 34px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 0.92rem;
    text-align: left;
    line-height: 1.5;
    color: var(--brand);
    text-decoration: underline;
    text-decoration-color: rgba(18, 128, 128, 0.4);
    text-underline-offset: 3px;
    cursor: pointer;
}

.today-event__where:hover,
.week-item__where:hover {
    color: var(--gold-deep);
}

.today-event__pin-ico {
    font-size: 0.85em;
}

.today-state {
    margin: 10px 2px;
    font-size: 0.98rem;
    color: rgba(5, 44, 44, 0.85);
}

.today-state a {
    color: var(--brand);
    font-weight: 700;
}

.today-card__more {
    display: inline-block;
    margin-top: 12px;
    font-weight: 700;
    color: var(--brand);
    text-decoration: none;
}

.today-card__more:hover {
    color: var(--gold-deep);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ------------------------------
   WEEK PANEL + LIST (schedule page)
------------------------------ */
.week-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

@media (min-width: 980px) {
    .week-panel {
        max-height: clamp(420px, 44vw, 560px);
        overflow-y: auto;
        padding-right: 8px;
        scrollbar-width: thin;
    }
}

.week-rest-label {
    margin: 6px 2px 0;
    font-family: "Marcellus", Georgia, serif;
    font-size: 0.95rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(5, 54, 54, 0.65);
}

.week-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.week-item {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid rgba(5, 54, 54, 0.14);
    border-left: 4px solid var(--brand);
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

/* hovering the pin (or the row) glows the card in the brand teal */
.week-item.is-hot {
    background: linear-gradient(90deg, rgba(18, 128, 128, 0.12), rgba(255, 255, 255, 0.92));
    border-left-color: var(--brand-deep);
    transform: translateX(2px);
    box-shadow:
        0 0 0 1px rgba(18, 128, 128, 0.35),
        0 10px 26px rgba(18, 128, 128, 0.32);
}

/* the number square flips GOLD, matching the hot pin on the map */
.week-item.is-hot .week-item__num {
    background: var(--gold);
    color: #4b2e00;
}

.week-item__body {
    min-width: 0;
}

.week-item__day {
    margin: 0 0 2px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(5, 54, 54, 0.6);
}

.week-item__summary {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    color: #10312f;
    line-height: 1.4;
}

.week-item__time {
    margin: 2px 0 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--brand-deep);
}

.week-item__where {
    margin-left: 0;
}

.week-empty {
    padding: 12px 4px;
    font-size: 0.95rem;
    color: rgba(5, 44, 44, 0.8);
}

.week-empty a {
    color: var(--brand);
    font-weight: 700;
}

/* honesty small print under the grid */
.sched-notes {
    margin: 14px 2px 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(5, 44, 44, 0.68);
}

/* MapLibre attribution sizing */
.pb-map .maplibregl-ctrl-attrib {
    font-size: 10.5px;
}

/* keyboard focus + disabled zoom buttons */
.week-item:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.pb-map__btn:disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
}

.today-event__where svg,
.week-item__where svg {
    vertical-align: -2px;
    margin-right: 2px;
}
