/*
 * RADARCESKA — STATION PRODUCT v2.0.3
 * 10-row board + stable infrastructure column
 */

.rs-board-row[hidden]{
    display:none;
}


/* ============================================================
   BOARD GEOMETRY
   ============================================================ */

/*
 * Old product gave infrastructure only 60px.
 * Keep it compact, but give it enough stable room
 * so Nást./Kolej never explodes into 3–4 lines.
 */
.rs-two .rs-board-row{
    grid-template-columns:
        62px
        minmax(0,1fr)
        76px
        82px;

    align-items:center;
    min-height:58px;
}


/* ============================================================
   PLATFORM / TRACK
   ============================================================ */

.rs-platform{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;

    min-width:0;
    min-height:34px;

    text-align:center;
    line-height:1.15;
}

/*
 * Hide the old verbose SSR caption immediately.
 * JS replaces the content with compact semantic lines.
 */
.rs-platform > span:not(.rs-platform-main):not(.rs-platform-sub){
    display:none;
}

.rs-platform > strong{
    font-size:11px;
    line-height:1.2;
}

.rs-platform-main{
    display:block;

    color:var(--rs-text);

    font-size:11px;
    font-weight:850;
    line-height:1.2;

    white-space:nowrap;
}

.rs-platform-sub{
    display:block;

    margin-top:3px;

    color:var(--rs-muted);

    font-size:9px;
    font-weight:700;
    line-height:1.15;

    white-space:nowrap;
}

.rs-platform-estimate{
    display:inline;

    margin-left:3px;

    color:var(--rs-muted);

    font-size:8px;
    font-weight:650;
}

/*
 * Disable v202 pseudo badge.
 * v203 renders "odhad" as part of the compact second line.
 */
.rs-platform.is-estimated > strong::after{
    content:none;
}


/* ============================================================
   LOAD MORE
   ============================================================ */

.rs-board-more-wrap{
    display:flex;
    justify-content:center;

    padding:14px 8px 3px;
}

.rs-board-more{
    appearance:none;

    display:inline-flex;
    align-items:center;
    justify-content:center;

    min-width:142px;
    min-height:40px;

    padding:9px 17px;

    border:1px solid var(--rs-line);
    border-radius:12px;

    background:var(--rs-soft);
    color:var(--rs-text);

    font:inherit;
    font-size:12px;
    font-weight:800;

    cursor:pointer;

    transition:
        border-color .16s ease,
        background .16s ease,
        transform .16s ease;
}

.rs-board-more:hover{
    border-color:var(--rs-accent);
    background:var(--rs-accent-soft);
}

.rs-board-more:active{
    transform:translateY(1px);
}

.rs-board-more:focus-visible{
    outline:2px solid var(--rs-accent);
    outline-offset:2px;
}

/*
 * No "38 zbývá", no "1 zbývá".
 */
.rs-board-more small{
    display:none !important;
}


/* ============================================================
   OPERATOR LINKS — preserve v2.0.2 product
   ============================================================ */

.rs-operator-card{
    min-width:0;
}

.rs-operator-card .rs-operator-link{
    display:grid;

    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:
        "name arrow"
        "meta arrow";

    align-items:center;
    column-gap:10px;

    width:100%;
    min-width:0;

    color:inherit;
    text-decoration:none;
}

.rs-operator-card .rs-operator-link strong{
    grid-area:name;
    min-width:0;
}

.rs-operator-card .rs-operator-link span{
    grid-area:meta;
}

.rs-operator-card .rs-operator-link b{
    grid-area:arrow;

    color:var(--rs-accent);

    font-size:16px;
    font-weight:850;

    transition:transform .16s ease;
}

.rs-operator-card .rs-operator-link:hover b{
    transform:translateX(2px);
}

.rs-operator-card .rs-operator-link:focus-visible{
    outline:2px solid var(--rs-accent);
    outline-offset:4px;
    border-radius:8px;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media(max-width:720px){

    .rs-board-more-wrap{
        padding:11px 6px 2px;
    }

    .rs-board-more{
        width:100%;
    }

    .rs-two .rs-board-row{
        min-height:56px;
    }

    .rs-platform-main{
        font-size:10px;
    }

    .rs-platform-sub{
        font-size:8px;
    }
}


/* ============================================================
   RADARCESKA — STATION PRODUCT v2.0.4
   LOAD-MORE CLICK STABILITY
   ============================================================ */

/*
 * The two timetable cards must keep their own natural height.
 * Expanding one must not visually stretch the neighbouring card.
 */
.rs-board-pair{
    align-items:start;
}

/*
 * Do not let Chromium choose the timetable or its button as
 * a scroll anchor while hidden rows become visible.
 */
.rs-board-pair,
.rs-board-pair .rs-card,
.rs-board-pair .rs-board,
.rs-board-pair .rs-board-row,
.rs-board-pair .rs-board-more-wrap,
.rs-board-pair .rs-board-more{
    overflow-anchor:none;
}


/* ============================================================
   RADARCESKA — STATION PRODUCT v2.0.5
   FINAL COMPACT TIMETABLE
   ============================================================ */

/*
 * Departure and arrival cards are independent summaries.
 * Neither card stretches to the height of its neighbour.
 */
.rs-station-timetables{
    align-items:start;
}

/*
 * There is no progressive / hidden timetable state in v2.0.5.
 */
.rs-station-timetables .rs-board-row{
    overflow-anchor:auto;
}


/* ============================================================
   RADARCESKA — STATION BOARD AJAX v2.1.2
   ============================================================ */

.rs-ajax-timetable{
    align-self:start;
}

.rs-ajax-board-list{
    min-width:0;
}

.rs-board-history{
    display:flex;
    justify-content:flex-start;

    margin:-2px 0 8px;
}

.rs-board-next{
    display:flex;
    justify-content:center;

    padding:13px 0 1px;
}

.rs-board-page-btn{
    appearance:none;

    display:inline-flex;
    align-items:center;
    justify-content:center;

    min-height:38px;
    padding:8px 13px;

    border:1px solid var(--rs-line);
    border-radius:11px;

    background:var(--rs-soft);
    color:var(--rs-text);

    font:inherit;
    font-size:11px;
    font-weight:800;

    cursor:pointer;

    transition:
        border-color .16s ease,
        background .16s ease,
        opacity .16s ease;
}

.rs-board-page-btn:hover{
    border-color:var(--rs-accent);
    background:var(--rs-accent-soft);
}

.rs-board-page-btn:focus-visible{
    outline:2px solid var(--rs-accent);
    outline-offset:2px;
}

.rs-board-page-btn[disabled]{
    opacity:.55;
    cursor:wait;
}

.rs-board-page-btn--history{
    min-height:30px;

    padding:5px 9px;

    border-color:transparent;

    background:transparent;
    color:var(--rs-muted);

    font-size:10px;
}

.rs-board-page-btn--history:hover{
    border-color:var(--rs-line);
}

.rs-board-page-status{
    padding:8px 0 2px;

    color:var(--rs-muted);

    font-size:10px;
    text-align:center;
}

.rs-ajax-timetable,
.rs-ajax-timetable .rs-board,
.rs-ajax-timetable .rs-board-history,
.rs-ajax-timetable .rs-board-next,
.rs-ajax-timetable .rs-board-page-btn{
    overflow-anchor:none;
}

@media(max-width:720px){

    .rs-board-next{
        padding-top:10px;
    }

    .rs-board-page-btn--next{
        width:100%;
    }
}


/* ============================================================
   RADARCESKA — STATION PRODUCT v2.2.0
   DAY CALENDAR · FULL-DAY PAGINATION
   ============================================================ */

.rs-station-daybar{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;

    margin:0 0 12px;
    padding:9px 10px;

    border:1px solid var(--rs-line);
    border-radius:14px;

    background:var(--rs-soft);
}

.rs-station-daynav{
    display:inline-flex;
    align-items:stretch;

    border:1px solid var(--rs-line);
    border-radius:11px;

    overflow:hidden;

    background:var(--rs-card,#fff);
}

.rs-day-arrow,
.rs-day-current{
    appearance:none;

    border:0;
    margin:0;

    background:transparent;
    color:var(--rs-text);

    font:inherit;
    cursor:pointer;
}

.rs-day-arrow{
    display:flex;
    align-items:center;
    justify-content:center;

    width:38px;
    min-height:42px;
    padding:0;

    font-size:21px;
    line-height:1;
}

.rs-day-arrow:hover{
    background:var(--rs-soft);
}

.rs-day-arrow:focus-visible,
.rs-day-current:focus-visible,
.rs-day-picker:focus-within{
    outline:2px solid var(--rs-accent);
    outline-offset:-2px;
}

.rs-day-arrow[disabled]{
    opacity:.3;
    cursor:default;
}

.rs-day-current{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;

    min-width:132px;
    min-height:42px;

    padding:5px 11px;

    border-left:1px solid var(--rs-line);
    border-right:1px solid var(--rs-line);
}

.rs-day-current:hover{
    background:var(--rs-soft);
}

.rs-day-current strong{
    display:block;

    font-size:12px;
    font-weight:850;
    line-height:1.2;
    white-space:nowrap;
}

.rs-day-current span{
    display:block;

    margin-top:2px;

    color:var(--rs-muted);

    font-size:9px;
    font-weight:700;
    line-height:1.2;
    white-space:nowrap;
}

.rs-day-picker{
    display:inline-flex;
    align-items:center;
    gap:7px;

    min-height:42px;

    padding:5px 9px 5px 11px;

    border:1px solid var(--rs-line);
    border-radius:11px;

    background:var(--rs-card,#fff);
}

.rs-day-picker > span{
    color:var(--rs-muted);

    font-size:10px;
    font-weight:800;
}

.rs-day-picker input{
    min-width:122px;
    min-height:30px;

    border:0;
    outline:0;

    background:transparent;
    color:var(--rs-text);

    font:inherit;
    font-size:12px;
    font-weight:800;
}

.rs-day-status{
    margin-left:auto;

    color:var(--rs-muted);

    font-size:10px;
    font-weight:700;
    line-height:1.3;
}

.rs-station-daybar.is-loading{
    opacity:.68;
    pointer-events:none;
}

.rs-board-page-btn--history{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:5px;

    min-height:32px;

    padding:5px 10px;

    border:1px solid var(--rs-line);
    border-radius:999px;

    background:var(--rs-card,#fff);
    color:var(--rs-muted);

    font-size:10px;
    font-weight:800;
    line-height:1;

    box-shadow:
        0 1px 2px rgba(0,0,0,.025);
}

.rs-board-page-btn--history::before{
    content:"←";

    display:inline-block;

    font-size:13px;
    line-height:1;
}

.rs-board-page-btn--history:hover{
    border-color:var(--rs-accent);

    background:var(--rs-accent-soft);

    color:var(--rs-text);
}

.rs-board-history{
    display:flex;
    justify-content:flex-start;

    margin:0 0 9px;
}

.rs-board-next{
    padding-top:12px;
}

.rs-day-empty{
    padding:18px 4px;

    color:var(--rs-muted);

    font-size:11px;
    text-align:center;
}

@media(max-width:720px){

    .rs-station-daybar{
        display:grid;

        grid-template-columns:
            minmax(0,1fr)
            auto;

        gap:8px;

        padding:8px;
    }

    .rs-station-daynav{
        display:flex;

        width:100%;
        min-width:0;
    }

    .rs-day-arrow{
        flex:0 0 36px;

        width:36px;
        min-height:40px;
    }

    .rs-day-current{
        flex:1;

        min-width:0;
        min-height:40px;

        padding-left:5px;
        padding-right:5px;
    }

    .rs-day-current strong{
        overflow:hidden;

        max-width:100%;

        text-overflow:ellipsis;
    }

    .rs-day-picker{
        min-width:0;
        min-height:40px;

        padding-left:7px;
        padding-right:7px;
    }

    .rs-day-picker > span{
        display:none;
    }

    /*
     * Prevent iOS focus zoom.
     */
    .rs-day-picker input{
        min-width:118px;
        font-size:16px;
    }

    .rs-day-status{
        grid-column:1 / -1;

        margin:0;

        padding:0 2px 1px;

        text-align:center;
    }

    .rs-board-page-btn--history{
        min-height:34px;

        padding-left:11px;
        padding-right:11px;
    }
}


/* ============================================================
   RADARCESKA — STATION PRODUCT v2.2.1
   COMPACT MOBILE HERO
   ============================================================ */

@media(max-width:700px){

    /*
     * Mobile first viewport:
     * station identity + three useful live KPIs only.
     */
    .rs-page .rs-main > .rs-hero{
        margin-bottom:8px;

        padding:
            11px
            12px
            10px;

        border-radius:15px;
    }

    .rs-page .rs-main > .rs-hero .rs-kicker{
        font-size:8px;
        line-height:1.1;
    }

    .rs-page .rs-main > .rs-hero h1{
        margin:
            4px
            0
            3px;

        font-size:
            clamp(
                22px,
                7vw,
                25px
            );

        line-height:1.03;
    }

    /*
     * Keep text in HTML/SEO, remove only visually on mobile.
     */
    .rs-page .rs-main > .rs-hero > p{
        display:none;
    }

    .rs-page .rs-main > .rs-hero .rs-kpis{
        display:grid;

        grid-template-columns:
            repeat(
                3,
                minmax(
                    0,
                    1fr
                )
            );

        gap:5px;

        margin-top:7px;
    }

    /*
     * Hide:
     * 1 = Vlaky v datech
     * 5 = Dopravci
     *
     * Keep:
     * Do 60 min / Živě poblíž / Nástupiště
     */
    .rs-page .rs-main > .rs-hero .rs-kpis > div:nth-child(1),
    .rs-page .rs-main > .rs-hero .rs-kpis > div:nth-child(5){
        display:none;
    }

    .rs-page .rs-main > .rs-hero .rs-kpis > div{
        min-width:0;
        min-height:46px;

        padding:
            7px
            6px;

        border-radius:9px;
    }

    .rs-page .rs-main > .rs-hero .rs-kpis span{
        display:block;

        overflow:hidden;

        margin:0 0 2px;

        font-size:7px;
        line-height:1.1;

        white-space:nowrap;
        text-overflow:ellipsis;
    }

    .rs-page .rs-main > .rs-hero .rs-kpis strong{
        margin-top:0;

        font-size:15px;
        line-height:1.05;
    }

    /*
     * A little less vertical air around date controls.
     * Touch targets stay unchanged.
     */
    .rs-station-daybar{
        margin-bottom:9px;
    }

    .rs-day-status{
        padding-top:0;

        font-size:9px;
        line-height:1.15;
    }
}


@media(max-width:390px){

    .rs-page .rs-main > .rs-hero{
        padding:
            10px
            9px
            9px;
    }

    .rs-page .rs-main > .rs-hero h1{
        font-size:22px;
    }

    .rs-page .rs-main > .rs-hero .rs-kpis{
        gap:4px;
    }

    .rs-page .rs-main > .rs-hero .rs-kpis > div{
        padding-left:4px;
        padding-right:4px;
    }
}


/* ============================================================
   RADARCESKA — STATION PHOTO PUBLIC v1.0.0
   ============================================================ */

.rs-station-cover{
    position:relative;

    height:210px;

    margin:
        10px
        0
        12px;

    overflow:hidden;

    border:1px solid #dfe2e5;
    border-radius:13px;

    background:#e9ebec;
}

.rs-station-cover img{
    display:block;

    width:100%;
    height:100%;

    object-fit:cover;
}

.rs-station-cover figcaption{
    position:absolute;
    right:7px;
    bottom:7px;

    max-width:calc(100% - 14px);

    overflow:hidden;

    padding:4px 7px;

    border-radius:999px;

    background:rgba(20,24,27,.68);
    color:#fff;

    font-size:8px;
    font-weight:700;

    white-space:nowrap;
    text-overflow:ellipsis;

    backdrop-filter:blur(7px);
}

.rs-station-photo-gallery{
    margin-top:12px;
}

.rs-station-photo-grid{
    display:grid;

    grid-template-columns:
        repeat(
            4,
            minmax(
                0,
                1fr
            )
        );

    gap:8px;
}

.rs-station-photo-item{
    display:block;

    min-width:0;

    overflow:hidden;

    border:1px solid #dfe2e5;
    border-radius:10px;

    background:#f6f7f8;

    color:inherit;

    text-decoration:none;
}

.rs-station-photo-item figure{
    margin:0;
}

.rs-station-photo-item img{
    display:block;

    width:100%;
    height:125px;

    object-fit:cover;

    background:#e9ebec;
}

.rs-station-photo-item figcaption{
    padding:7px 8px;
}

.rs-station-photo-item figcaption strong,
.rs-station-photo-item figcaption small{
    display:block;

    overflow:hidden;

    white-space:nowrap;
    text-overflow:ellipsis;
}

.rs-station-photo-item figcaption strong{
    font-size:9px;
    font-weight:800;
}

.rs-station-photo-item figcaption small{
    margin-top:2px;

    color:#747b81;

    font-size:8px;
}


@media(max-width:700px){

    /*
     * Cover is outside the compact station hero.
     */
    .rs-station-cover{
        height:92px;

        margin:
            7px
            0
            8px;

        border-radius:10px;
    }

    .rs-station-cover figcaption{
        padding:3px 5px;

        font-size:7px;
    }

    .rs-station-photo-grid{
        display:flex;

        gap:7px;

        overflow-x:auto;

        padding-bottom:3px;

        scroll-snap-type:x proximity;

        -webkit-overflow-scrolling:touch;
    }

    .rs-station-photo-item{
        flex:
            0
            0
            min(
                74vw,
                250px
            );

        scroll-snap-align:start;
    }

    .rs-station-photo-item img{
        height:132px;
    }
}
