/* =====================================================================
   Bikepark Status Widget — zum Einbetten in CMS / Header / Footer.
   Rendert Saison + Gruppen-Zeilen (Shop & Rental, Lift & Trails, ...).
   Klick auf eine Zeile öffnet ein Overlay mit Liste der Standorte.
   ===================================================================== */

.trm-status-widget {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 14px 16px;
    max-width: 420px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    font-size: 14px;
    line-height: 1.4;
    color: #1a1a1a;
}
.trm-status-widget-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 8px;
}
.trm-status-widget-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.trm-status-widget-season {
    font-size: 12px;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}
.trm-status-widget-season small {
    color: #999;
    font-size: 11px;
}

.trm-status-widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.trm-status-widget-row { margin: 0; }
.trm-status-widget-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 4px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f5;
    transition: background 0.12s;
}
.trm-status-widget-row:last-child .trm-status-widget-btn { border-bottom: 0; }
.trm-status-widget-btn:hover,
.trm-status-widget-btn:focus-visible {
    background: rgba(255, 230, 0, 0.15);
    outline: none;
}
.trm-status-widget-label {
    flex: 1 1 auto;
    font-weight: 600;
}
.trm-status-widget-time {
    color: #555;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.trm-status-widget-status {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    color: #fff;
    white-space: nowrap;
}
.trm-status-widget-status.trm-status-widget-phase-open {
    background: #16a34a;
}
.trm-status-widget-status.trm-status-widget-phase-soon {
    background: #eab308;
    color: #1a1a1a;
}
.trm-status-widget-status.trm-status-widget-phase-pre,
.trm-status-widget-status.trm-status-widget-phase-post,
.trm-status-widget-status.trm-status-widget-phase-closed {
    background: #dc2626;
}

/* ── Overlay ───────────────────────────────────────── */
.trm-status-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.trm-status-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    cursor: pointer;
}
.trm-status-overlay-panel {
    position: relative;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    max-width: 520px;
    width: calc(100% - 32px);
    max-height: calc(100% - 64px);
    padding: 22px 26px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.trm-status-overlay-close {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 0;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    border-radius: 4px;
}
.trm-status-overlay-close:hover { background: #f1f3f5; color: #111; }
.trm-status-overlay-title {
    margin: 0 40px 4px 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.trm-status-overlay-time {
    margin: 0 0 16px;
    color: #666;
    font-size: 13px;
}
.trm-status-overlay-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.trm-status-overlay-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    background: #f8f9fa;
    transition: background 0.12s;
}
.trm-status-overlay-item:hover,
.trm-status-overlay-item a:focus-visible {
    background: rgba(255, 230, 0, 0.25);
    outline: none;
}
.trm-status-overlay-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-decoration: none;
    color: inherit;
}
.trm-status-overlay-name {
    flex: 1 1 auto;
    font-weight: 600;
    color: #1a1a1a;
}
.trm-status-overlay-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    color: #fff;
    white-space: nowrap;
}
.trm-status-overlay-badge.is-open    { background: #16a34a; }
.trm-status-overlay-badge.is-partial { background: #eab308; color: #1a1a1a; }
.trm-status-overlay-badge.is-closed  { background: #dc2626; }
.trm-status-overlay-empty {
    color: #999;
    font-style: italic;
    margin: 24px 0 0;
    text-align: center;
}

@media (max-width: 767px) {
    .trm-status-widget { max-width: 100%; }
    .trm-status-overlay-panel { padding: 18px 20px; }
    .trm-status-overlay-title { font-size: 18px; }
}
