/* =============================================================
   Podstrony przystanków (pages/stop/_template.php) — nowy wygląd
   (październik 2026), styl live trackera. Prefiks body.stop-page
   wygrywa z regułami w <style> szablonu. Tokeny --ui-*: navbar.css.
   ============================================================= */

body.stop-page { background: var(--ui-ground); color: var(--ui-ink); }

/* ── nagłówek: tekst po lewej, zdjęcie z kartą „na żywo” po prawej ── */
body.stop-page .page-hero.sp-hero {
    background: var(--ui-ground);
    color: var(--ui-ink);
    padding: 40px 24px 16px;
    min-height: 0;
    text-align: left;
}
body.stop-page .page-hero.sp-hero::before,
body.stop-page .page-hero.sp-hero::after { content: none; }
.sp-hero-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.sp-hero-text { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
body.stop-page .breadcrumb--hero, body.stop-page .breadcrumb--hero a { color: var(--ui-muted); font-size: 14px; text-decoration: none; }
body.stop-page .breadcrumb--hero a:hover { color: var(--ui-ink); text-decoration: underline; }
body.stop-page .sp-hero h1 { margin: 0; font-size: 52px; line-height: 1.04; font-weight: 800; letter-spacing: -0.02em; color: var(--ui-ink); text-shadow: none; }
.sp-route-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sp-route-chip { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 5px 12px 5px 5px; font-size: 14px; font-weight: 800; }
.sp-route-chip b {
    min-width: 26px; height: 26px; padding: 0 6px;
    border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #FFFFFF; font-size: 12px; font-weight: 800;
}
.sp-route-chip--red { background: #FBE6E7; }
.sp-route-chip--red b { background: var(--ui-red); }
.sp-route-chip--blue { background: #E4ECFB; }
.sp-route-chip--blue b { background: var(--ui-blue); }
.sp-code { font-size: 12px; font-weight: 700; color: var(--ui-muted); letter-spacing: .04em; }
.sp-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.sp-hero-media { position: relative; padding-bottom: 28px; }
.sp-hero-img { width: 100%; height: 440px; object-fit: cover; border-radius: 28px; display: block; }
.sp-live {
    position: absolute; left: -32px; bottom: 0;
    width: 360px;
    background: var(--ui-card);
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(23, 24, 28, .18);
    padding: 16px;
    display: flex; flex-direction: column; gap: 10px;
}
.sp-live-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--ui-muted); text-transform: uppercase; letter-spacing: .06em; }
.sp-live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ui-live); flex: none; }
.sp-live-row { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.sp-live-route { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.sp-live-route--red { background: var(--ui-red); }
.sp-live-route--blue { background: var(--ui-blue); }
.sp-live-name { flex: 1; font-size: 15px; font-weight: 800; }
.sp-live-eta { font-size: 14px; font-weight: 700; color: var(--ui-muted); text-align: right; }
.sp-live-eta.is-live { color: var(--ui-ink); font-size: 18px; font-weight: 800; }
.sp-live-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.sp-live-actions .sp-btn { width: 100%; min-height: 46px; font-size: 14px; }

.sp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 22px;
    border-radius: 14px; border: none;
    font-weight: 800; font-size: 15px;
    text-decoration: none;
}
.sp-btn--red, .sp-btn--red:hover { background: var(--ui-red); color: #FFFFFF; }
.sp-btn--red:hover { background: var(--ui-red-dark); }
.sp-btn--line, .sp-btn--line:hover { background: var(--ui-card); color: var(--ui-ink); border: 1px solid var(--ui-line); }
.sp-btn--ink, .sp-btn--ink:hover { background: var(--ui-ink); color: #FFFFFF; }
.sp-btn--ink:hover { background: #000000; }
.sp-btn:focus-visible { outline: 3px solid var(--ui-ink); outline-offset: 2px; }
.sp-live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ui-live); }

/* stare przyciski w treści szablonu → czerwone, jak w całej stronie */
body.stop-page .btn-gradient {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0 22px;
    border-radius: 14px;
    background: var(--ui-red);
    color: #FFFFFF;
    font-weight: 800; font-size: 15px;
    box-shadow: none;
}
body.stop-page .btn-gradient:hover { background: var(--ui-red-dark); color: #FFFFFF; transform: none; }

/* ── sekcje ── */
body.stop-page .stop-section { padding: 32px 24px; background: transparent; border-top: none; }
body.stop-page .stop-section--gray { background: transparent; }
body.stop-page .stop-container { max-width: 1200px; padding: 0; }
body.stop-page .stop-section h2 { font-size: 32px !important; line-height: 1.15; font-weight: 800; color: var(--ui-ink) !important; }
body.stop-page .stop-section .text-center { text-align: left; margin-bottom: 20px !important; }
body.stop-page .stop-grid-2 { background: var(--ui-card); border-radius: 24px; padding: 28px; gap: 28px; }
body.stop-page .intro-text p { color: #3E4148; font-size: 16px; line-height: 1.65; }
body.stop-page .intro-visual img { border-radius: 20px !important; box-shadow: none !important; }

/* atrakcje przy przystanku */
body.stop-page .highlights-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
body.stop-page .highlight-card {
    background: var(--ui-card);
    border-radius: 20px;
    padding: 20px;
    box-shadow: none;
    border: none;
    text-align: left;
    display: flex; flex-direction: column; gap: 8px;
}
body.stop-page .highlight-card:hover { transform: none; box-shadow: none; }
body.stop-page .highlight-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #FBE6E7; color: var(--ui-red);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 800;
    margin: 0;
}
body.stop-page .highlight-card h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--ui-ink); }
body.stop-page .highlight-card p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ui-muted); }

/* wskazówki + informacje praktyczne */
body.stop-page .stop-grid-sidebar { gap: 20px; align-items: start; }
body.stop-page .visitor-tips { background: var(--ui-ink); color: #FFFFFF; border-radius: 24px; padding: 28px; }
body.stop-page .visitor-tips h2 { color: #FFFFFF !important; font-size: 26px !important; margin-bottom: 14px; }
body.stop-page .visitor-tips ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
body.stop-page .visitor-tips li { padding: 0; border: none; background: none; }
body.stop-page .visitor-tips li::before { content: none; }
body.stop-page .visitor-tips li p { color: #E3E1DA; font-size: 15px; line-height: 1.55; margin: 0; }
body.stop-page .visitor-tips li p strong { color: #FFFFFF; }
body.stop-page .stop-sidebar-card { background: var(--ui-card); border-radius: 24px; padding: 24px; box-shadow: none; border: none; position: static; }
body.stop-page .stop-sidebar-card h3 { font-size: 20px; font-weight: 800; color: var(--ui-ink); }
body.stop-page .sidebar-info-label { font-size: 12px; font-weight: 700; color: var(--ui-muted); text-transform: uppercase; letter-spacing: .06em; }
body.stop-page .sidebar-info-value { color: var(--ui-ink); font-size: 15px; }
body.stop-page .departure-pills { gap: 5px; }
body.stop-page .departure-pill, body.stop-page .stop-time {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 13px; font-weight: 700;
    color: var(--ui-ink);
    border: none;
    font-variant-numeric: tabular-nums;
}
body.stop-page .departure-pill--red, body.stop-page .stop-time--red { background: #FBE6E7; color: var(--ui-ink); }
body.stop-page .departure-pill--blue, body.stop-page .stop-time--blue { background: #E4ECFB; color: var(--ui-ink); }

/* FAQ przystanku */
body.stop-page .faq-list { display: flex; flex-direction: column; gap: 10px; max-width: none; }
body.stop-page .faq-item { background: var(--ui-card); border-radius: 18px; border: none; box-shadow: none; padding: 0; }
body.stop-page .faq-item summary { padding: 16px 22px; font-weight: 800; font-size: 17px; color: var(--ui-ink); cursor: pointer; min-height: 56px; }
body.stop-page .faq-item p { padding: 0 22px 20px; margin: 0; color: var(--ui-muted); line-height: 1.55; }

/* w pobliżu */
body.stop-page .sp-nearby .stop-container { text-align: left; }
body.stop-page .nearby-grid { justify-content: flex-start; gap: 8px; }
body.stop-page .nearby-tag { background: var(--ui-card); color: var(--ui-ink); border: none; border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; }
body.stop-page .nearby-tag:hover { background: var(--ui-card); transform: none; }

/* zachęta na dole */
body.stop-page .sp-cta { padding-bottom: 64px; }
.sp-cta-card { max-width: 1200px; margin: 0 auto; background: #FBE6E7; border-radius: 28px; padding: 36px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
body.stop-page .sp-cta h2 { margin: 0; font-size: 32px !important; }

/* ── telefon / tablet ── */
@media (max-width: 900px) {
    /* telefon/tablet: zdjęcie → tytuł → karta „na żywo” */
    .sp-hero-inner { display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
    .sp-hero-media { display: contents; }
    .sp-hero-img { order: -1; height: 300px; border-radius: 22px; }
    .sp-live { position: static; width: auto; box-shadow: 0 6px 24px rgba(23, 24, 28, .08); }
    body.stop-page .highlights-grid { grid-template-columns: 1fr; }
    body.stop-page .stop-grid-2, body.stop-page .stop-grid-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    body.stop-page .page-hero.sp-hero { padding: 16px 16px 8px; }
    body.stop-page .sp-hero h1 { font-size: 32px; }
    .sp-hero-img { height: 240px; }
    .sp-hero-actions, .sp-hero-actions .sp-btn { width: 100%; }
    body.stop-page .stop-section { padding: 24px 16px; }
    body.stop-page .stop-section h2 { font-size: 26px !important; }
    body.stop-page .stop-grid-2, body.stop-page .visitor-tips, body.stop-page .stop-sidebar-card { padding: 20px; border-radius: 20px; }
    .sp-cta-card { padding: 22px; border-radius: 22px; }
    body.stop-page .faq-item summary { padding: 14px 16px; font-size: 16px; }
}

/* drobne poprawki: brak zdjęcia, wyrównanie tagów, kolor znaku w FAQ */
body.stop-page .stop-grid-2:not(:has(.intro-visual)) { grid-template-columns: 1fr; }
body.stop-page .nearby-grid { margin: 0; max-width: none; }
body.stop-page .faq-item summary::after, body.stop-page .faq-item summary::marker { color: var(--ui-muted); }
body.stop-page .breadcrumb--hero { padding: 0; margin: 0; background: none; }

/* ── „W okolicy przystanku”: wydarzenia i toalety z danych miasta ── */
body.stop-page .sp-around[hidden], body.stop-page .sp-around-col[hidden] { display: none; }
body.stop-page .sp-around .stop-container { text-align: left; }
.sp-around-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 8px; }
.sp-around-col { background: var(--ui-card); border-radius: 24px; padding: 22px 22px 14px; }
.sp-around-col h3 { margin: 0 0 8px; font-size: 18px; font-weight: 800; color: var(--ui-ink); }
.sp-around-list { list-style: none; margin: 0; padding: 0; }
.sp-around-list li + li { border-top: 1px solid var(--ui-line); }
.sp-around-list li > a, .sp-around-list li > div { display: flex; flex-direction: column; gap: 3px; padding: 12px 0; color: var(--ui-ink); text-decoration: none; }
.sp-around-list li > a:hover b { text-decoration: underline; }
.sp-around-list b { font-size: 15px; font-weight: 700; line-height: 1.3; }
.sp-around-when { font-size: 13px; font-weight: 800; color: #7B3FC4; }
.sp-around-where { font-size: 13px; color: var(--ui-muted); }
.sp-around-src { margin: 14px 0 0; font-size: 12px; color: var(--ui-muted); }
.poi-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.poi-fact { background: #F4F3EF; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; color: var(--ui-ink); }
.poi-fact--ok { background: #DDF3E6; color: #14693B; }
.poi-fact--off { background: #FBE6E7; color: #9B1420; }

/* ── Podpis zdjęcia z Wikimedia Commons (wymagany przez CC BY / CC BY-SA) ── */
.sp-hero-credit {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    max-width: calc(100% - 24px);
    padding: 3px 8px; border-radius: 8px;
    background: rgba(0, 0, 0, .5); color: #FFFFFF;
    font-size: 11px; line-height: 1.4; text-decoration: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sp-hero-credit:hover, .sp-hero-credit:focus-visible { background: rgba(0, 0, 0, .75); text-decoration: underline; }

/* ── Przystanek nieczynny (panel v2) ── */
.sp-closed {
    margin: 14px 0 0; padding: 12px 14px; border-radius: 14px;
    background: #FDECEA; color: #8C1D18; font-size: 15px; line-height: 1.45;
    border-left: 4px solid #B3261E;
}
