/* =====================================================================
   Nézői páholy (spectator_hub.php) és kishajós klub-portál (dinghy_club.php)
   Az rs-theme.css változóira épül; fix szín nincs.
   ===================================================================== */

.sh-page [hidden] { display: none !important; }

.rs-live-dot {
    display: inline-block;
    width: 8px; height: 8px; border-radius: 50%; flex: none;
    background: var(--rs-danger);
    box-shadow: 0 0 0 0 rgba(255, 107, 94, 0.6);
    animation: shLivePulse 1.8s ease-out infinite;
}
@keyframes shLivePulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 94, 0.6); }
    70% { box-shadow: 0 0 0 9px rgba(255, 107, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 94, 0); }
}
@media (prefers-reduced-motion: reduce) { .rs-live-dot { animation: none; } }

/* ---- fejléc ---- */
.sh-page .container { max-width: 960px; }
.sh-head { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 2.4rem; }
.sh-lead { color: var(--rs-text-2); font-size: 1.05rem; max-width: 560px; margin: 0; line-height: 1.5; }
.sh-back { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--rs-muted); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.sh-back:hover { color: #ffffff; }

/* ---- fülek ---- */
.sh-tabs {
    display: flex; gap: 4px; padding: 5px;
    background: var(--rs-surface); border: 1px solid var(--rs-border); border-radius: 14px;
    margin-bottom: 2rem; overflow-x: auto; scrollbar-width: none;
}
.sh-tabs::-webkit-scrollbar { display: none; }
.sh-tab {
    flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-height: 44px; padding: 0 1rem; border: 0; border-radius: 10px;
    background: transparent; color: var(--rs-text-2); font-weight: 600; font-size: 0.97rem; white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}
.sh-tab:hover { color: #ffffff; background: rgba(255, 255, 255, 0.04); }
.sh-tab.is-active { background: var(--rs-surface-3); color: #ffffff; box-shadow: inset 0 0 0 1px var(--rs-border-strong); }
.sh-tab-count {
    font-size: 0.75rem; font-weight: 700; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.07); color: var(--rs-text-2);
}
.sh-tab.is-active .sh-tab-count { background: var(--rs-accent-soft); color: var(--rs-accent); }

/* ---- blokkok ---- */
.sh-block { margin-bottom: 2.6rem; }
.sh-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.4rem 1rem; margin-bottom: 0.9rem; }
.sh-h { font-family: var(--rs-font-serif); font-weight: 400; font-size: 1.6rem; color: #ffffff; margin: 0; display: inline-flex; align-items: center; gap: 0.55rem; }
.sh-h .bi-star-fill { color: var(--rs-accent); font-size: 1.1rem; }
.sh-note { color: var(--rs-muted); font-size: 0.88rem; display: inline-flex; align-items: center; gap: 0.4rem; }

/* ---- eszközsáv ---- */
.sh-toolbar { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1.6rem; }
.sh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-chip {
    height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--rs-border-strong);
    background: transparent; color: var(--rs-text-2); font-size: 0.88rem; font-weight: 600;
}
.sh-chip:hover { color: #ffffff; border-color: rgba(255, 255, 255, 0.3); }
.sh-chip.is-active { background: var(--rs-accent); border-color: var(--rs-accent); color: var(--rs-accent-ink); }
.sh-search-row { display: flex; gap: 0.6rem; }
.sh-search {
    flex: 1 1 auto; display: flex; align-items: center; gap: 0.6rem; min-height: 44px; padding: 0 0.9rem; margin: 0;
    background: var(--rs-input); border: 1px solid var(--rs-border-strong); border-radius: 10px; color: var(--rs-muted);
}
.sh-search:focus-within { border-color: var(--rs-accent-line); }
.sh-search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--rs-text); font-size: 1rem; }
.sh-search input::placeholder { color: var(--rs-faint); }
.sh-year { width: auto; min-width: 128px; min-height: 44px; }

/* ---- lista ---- */
.sh-group { margin-bottom: 1.8rem; }
.sh-group-title { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rs-muted); margin: 0 0 0.4rem; }
.sh-list { display: flex; flex-direction: column; }
.sh-item {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.95rem 0.25rem; border-top: 1px solid var(--rs-border);
    color: var(--rs-text); text-decoration: none;
}
.sh-list > .sh-item:last-child { border-bottom: 1px solid var(--rs-border); }
.sh-item:hover { color: #ffffff; }
.sh-item:hover .sh-item-arrow { color: var(--rs-accent); transform: translateX(3px); }
.sh-date {
    width: 52px; height: 52px; flex: none; border-radius: 12px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
    background: var(--rs-surface-2); border: 1px solid var(--rs-border);
}
.sh-date.is-live { border-color: rgba(255, 107, 94, 0.45); background: var(--rs-danger-soft); }
.sh-date-day { font-family: var(--rs-font-serif); font-size: 1.35rem; color: #ffffff; }
.sh-date-mon { font-size: 0.68rem; font-weight: 600; color: var(--rs-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 3px; }
.sh-item-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1 1 auto; }
.sh-item-title { font-size: 1.05rem; font-weight: 600; line-height: 1.3; }
.sh-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0.8rem; font-size: 0.86rem; color: var(--rs-muted); }
.sh-item-arrow { color: var(--rs-faint); font-size: 1rem; flex: none; transition: transform 0.15s ease, color 0.15s ease; }
.sh-type { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.sh-type-official { color: var(--rs-accent); }
.sh-type-dinghy { color: var(--rs-success); }
.sh-type-froccs { color: var(--rs-danger-text); }
.sh-type-series { color: var(--rs-steel); }
.sh-type-live { color: var(--rs-danger-text); }

.sh-empty, .sh-noresult {
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    padding: 2.4rem 1rem; color: var(--rs-muted); text-align: center;
}
.sh-more { display: block; margin: 0.4rem auto 0; }

/* ---- élő: klubok a vízen ---- */
.sh-water { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.sh-water-card {
    display: flex; flex-direction: column; gap: 0.8rem; padding: 1.1rem 1.2rem;
    background: var(--rs-panel-gradient); border: 1px solid rgba(255, 107, 94, 0.28); border-radius: var(--rs-radius-lg);
}
.sh-water-top { display: flex; align-items: center; gap: 0.75rem; }
.sh-water-name { font-weight: 600; font-size: 1.05rem; line-height: 1.25; }
.sh-water-count { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--rs-danger-text); font-weight: 600; font-size: 0.92rem; }
.sh-water-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- élő: nincs esemény ---- */
.sh-idle { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.2rem; padding: 1.5rem; margin-bottom: 2.6rem; }
.sh-idle-text { margin: 0.4rem 0 0; color: var(--rs-text-2); max-width: 420px; }
.sh-next {
    display: flex; flex-direction: column; gap: 4px; padding: 0.9rem 1.1rem; min-width: 240px;
    border: 1px solid var(--rs-accent-line); border-radius: var(--rs-radius); background: var(--rs-accent-soft);
    color: var(--rs-text); text-decoration: none;
}
.sh-next:hover { color: #ffffff; border-color: rgba(255, 193, 7, 0.45); }
.sh-next-name { font-weight: 600; font-size: 1.05rem; }
.sh-next-meta { color: var(--rs-muted); font-size: 0.88rem; }

/* ---- klubok ---- */
.sh-clubs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
.sh-club {
    display: flex; align-items: center; gap: 0.85rem; padding: 0.75rem 0.25rem;
    border-top: 1px solid var(--rs-border); color: var(--rs-text); text-decoration: none;
}
.sh-club:hover { color: #ffffff; }
.sh-club:hover .sh-item-arrow { color: var(--rs-accent); transform: translateX(3px); }
.sh-club-name { font-weight: 600; flex: 1 1 auto; min-width: 0; }
.sh-club-live { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 700; color: var(--rs-danger-text); }
.sh-club-logo {
    width: 40px; height: 40px; flex: none; border-radius: 10px; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--rs-border); color: var(--rs-muted);
}
.sh-club-logo img { width: 100%; height: 100%; object-fit: contain; background: #ffffff; padding: 3px; }

/* ---- kedvencek ---- */
.sh-favs { margin-bottom: 2.6rem; }
.sh-fav-list { display: flex; flex-direction: column; gap: 10px; }
.sh-fav {
    display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1.1rem;
    background: var(--rs-panel-gradient); border: 1px solid var(--rs-accent-line); border-radius: var(--rs-radius-lg);
}
.sh-fav-star { color: var(--rs-accent); font-size: 1.1rem; flex: none; }
.sh-fav-body { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.sh-fav-name { font-weight: 600; font-size: 1.02rem; }
.sh-fav-sail { font-family: var(--rs-font-mono); font-size: 0.82rem; color: var(--rs-muted); font-weight: 500; }
.sh-fav-club { font-size: 0.86rem; color: var(--rs-muted); }
.sh-fav-live { display: inline-flex; align-items: center; gap: 5px; color: var(--rs-danger-text); font-weight: 600; }
.sh-fav-actions { display: flex; gap: 6px; flex: none; }

/* =====================================================================
   Klub-portál (dinghy_club.php)
   ===================================================================== */
.dc-head { display: flex; align-items: center; gap: 1.1rem; margin: 1.2rem 0 2.2rem; }
.dc-head .sh-club-logo { width: 64px; height: 64px; border-radius: 14px; font-size: 1.6rem; }
.dc-head-text { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.dc-head .rs-h2 { overflow-wrap: anywhere; }

.dc-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 2.6rem; }
.dc-tile {
    display: flex; flex-direction: column; gap: 0.7rem; padding: 1.3rem 1.4rem; min-height: 168px;
    background: var(--rs-panel-gradient); border: 1px solid var(--rs-border); border-radius: var(--rs-radius-lg);
    color: var(--rs-text); text-decoration: none; transition: border-color 0.2s ease, transform 0.15s ease;
}
.dc-tile:hover { color: var(--rs-text); border-color: rgba(255, 255, 255, 0.16); transform: translateY(-2px); }
.dc-tile.is-live { border-color: rgba(255, 107, 94, 0.4); }
.dc-tile-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.dc-tile-title { font-family: var(--rs-font-serif); font-size: 1.55rem; color: #ffffff; line-height: 1.15; margin-top: auto; }
.dc-tile-desc { color: var(--rs-muted); font-size: 0.9rem; }
.dc-tile-status { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.88rem; color: var(--rs-muted); }
.dc-tile.is-live .dc-tile-status { color: var(--rs-danger-text); }

.dc-days { display: flex; flex-wrap: wrap; gap: 8px; }
.dc-day {
    display: inline-flex; align-items: center; gap: 0.5rem; min-height: 40px; padding: 0 14px;
    border: 1px solid var(--rs-border-strong); border-radius: 999px;
    color: var(--rs-text-2); text-decoration: none; font-weight: 500; font-size: 0.92rem;
}
.dc-day:hover { color: #ffffff; border-color: var(--rs-accent-line); background: var(--rs-accent-soft); }
.dc-day .bi { color: var(--rs-muted); }

.dc-fleet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
.dc-boat { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.1rem; border-top: 1px solid var(--rs-border); }
.dc-boat-link { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; color: var(--rs-text); text-decoration: none; }
.dc-boat-link:hover { color: #ffffff; }
.dc-boat-name { font-weight: 600; }
.dc-boat-sub { font-size: 0.84rem; color: var(--rs-muted); }
.dc-boat-sub .dc-sail { font-family: var(--rs-font-mono); font-size: 0.8rem; }
.dc-star {
    width: 44px; height: 44px; flex: none; border: 0; border-radius: 10px; background: transparent;
    color: var(--rs-faint); font-size: 1.15rem; display: inline-flex; align-items: center; justify-content: center;
}
.dc-star:hover { color: var(--rs-accent); background: var(--rs-accent-soft); }
.dc-star.is-on { color: var(--rs-accent); }

@media (max-width: 767.98px) {
    .sh-head { margin-bottom: 1.6rem; }
    .sh-tab { font-size: 0.9rem; padding: 0 0.7rem; }
    .sh-h { font-size: 1.35rem; }
    .sh-clubs, .dc-fleet { grid-template-columns: minmax(0, 1fr); }
    .dc-tiles { grid-template-columns: minmax(0, 1fr); }
    .dc-tile { min-height: 0; }
    .sh-search-row { flex-wrap: wrap; }
    .sh-year { flex: 1 1 100%; }
    .sh-fav { flex-wrap: wrap; }
    .sh-fav-actions { width: 100%; padding-left: 1.9rem; }
    .sh-date { width: 46px; height: 46px; }
    .sh-item { gap: 0.8rem; }
    .dc-head .sh-club-logo { width: 52px; height: 52px; }
}
@media (max-width: 479.98px) {
    .sh-tabs { gap: 2px; padding: 4px; }
    .sh-tab { padding: 0 0.45rem; gap: 0.35rem; font-size: 0.88rem; }
    .sh-tab .bi { display: none; }
}
