/* Sémantické UI třídy — design měňte zde nebo v tokens.css.php */

.rp-box,
.rp-card {
    border-radius: var(--radius-box);
    box-shadow: var(--shadow-card);
}

/* Panely na veřejném webu (mapa, katalog…) */
.panel {
    background-color: #fff;
    box-shadow: var(--shadow-card);
}

.rp-box {
    background-color: #fff;
}

.rp-card {
    background-color: #fff;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rp-card:hover {
    box-shadow: var(--shadow-card-hover);
}

.rp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-button);
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.rp-btn-primary {
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-color);
    border: 1px solid var(--btn-primary-border);
    padding: 0.75rem 1.5rem;
}

.rp-btn-primary:hover {
    background-color: var(--btn-primary-hover-bg);
    color: var(--btn-primary-hover-color);
}

.rp-btn-secondary {
    background-color: var(--btn-secondary-bg);
    color: var(--btn-secondary-color);
    border: 1px solid var(--btn-secondary-border);
    padding: 0.75rem 1.5rem;
}

.rp-btn-secondary:hover {
    background-color: var(--btn-secondary-hover-bg);
    color: var(--btn-secondary-hover-color);
}

.rp-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-button);
}

.rp-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 35%, transparent);
}

main .rounded-2xl,
main .rounded-xl,
main .rounded-\[2\.5rem\] {
    border-radius: var(--radius-box);
}

main .shadow-lg,
main .shadow-md {
    box-shadow: var(--shadow-card);
}

main .hover\:shadow-xl:hover,
main .hover\:shadow-lg:hover {
    box-shadow: var(--shadow-card-hover);
}

/* Hero — logo vlevo, obsah vpravo (fixní horizontální pozice loga na desktopu) */
.rp-hero-layout {
    width: 100%;
}

.rp-hero-logo {
    flex-shrink: 0;
}

.rp-hero-content {
    flex: 1 1 0%;
    min-width: 0;
}

.rp-hero-layout--minimal .rp-hero-content > div {
    width: 100%;
    max-width: none;
}

@media (min-width: 768px) {
    .rp-hero-layout--with-logo {
        position: relative;
    }

    .rp-hero-layout--with-logo .rp-hero-logo {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 10.5rem;
        max-width: 10.5rem;
        margin: 0;
        z-index: 1;
    }

    .rp-hero-layout--with-logo .rp-hero-content {
        flex: 1 1 0%;
        margin-left: calc(10.5rem + 2rem);
        width: calc(100% - 10.5rem - 2rem);
    }
}

.rp-hero--default {
    min-height: 240px;
}

@media (min-width: 768px) {
    .rp-hero--default {
        min-height: 330px;
    }
}

.rp-hero--compact {
    height: 300px;
}

.rp-hero--payment {
    height: 50vh;
}

@media (min-width: 1024px) {
    .rp-hero--payment {
        height: 450px;
    }
}

@media (max-width: 767px) {
    .rp-hero {
        padding-top: 3.5rem;
        padding-bottom: 0.75rem;
        min-height: auto !important;
    }

    .rp-hero-layout {
        gap: 0.5rem;
    }

    .rp-hero h1,
    .rp-hero h2 {
        color: #fff;
    }

    .rp-hero form.flex.space-x-2 {
        gap: 0.375rem;
    }

    .rp-hero form.flex.space-x-2 input[type="search"],
    .rp-hero form.flex.space-x-2 button[type="submit"] {
        min-height: 2.25rem;
        font-size: 0.875rem;
    }
}

/* Mapa — horizontální pruh se seznamem pod mapou */
.rp-map-list-strip {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--color-primary, #bed62f) 55%, #cbd5e1) transparent;
    padding-bottom: 0.35rem;
}

.rp-map-list-strip::-webkit-scrollbar {
    height: 8px;
}

.rp-map-list-strip::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--color-primary, #bed62f) 65%, #94a3b8);
    border-radius: 9999px;
}

.rp-map-list-strip .list-item,
.rp-map-list-strip .list-item-mobile {
    flex: 0 0 auto;
    width: min(280px, 78vw);
    margin-bottom: 0;
    scroll-snap-align: start;
}

.rp-map-list-strip .list-item-empty {
    flex: 1 1 100%;
    min-width: 100%;
}

/* Sémantické barvy — tokeny z tokens.css.php */
.bg-hover { background-color: var(--color-hover); }
.text-hover { color: var(--color-hover); }
.hover\:bg-hover:hover { background-color: var(--color-hover); }
.hover\:bg-primary-dark:hover { background-color: var(--color-hover); }
.bg-accent { background-color: var(--color-accent); }
.text-accent { color: var(--color-accent); }
.border-accent { border-color: var(--color-accent); }
.hover\:bg-accent:hover { background-color: var(--color-accent); }
.hover\:text-accent:hover { color: var(--color-accent); }
.focus\:border-primary:focus { border-color: var(--color-primary); }

.rp-gradient-accent {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-hover) 100%);
}

.rp-slideshow-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-box);
    box-shadow: var(--shadow-card);
    min-height: 450px;
}

.rp-slideshow,
#event-slideshow.rp-slideshow {
    position: relative;
    width: 100%;
    min-height: 450px;
    border-radius: 2rem;
    overflow: hidden;
}

.rp-slideshow-slide,
.event-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 450px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.rp-slideshow-slide.active,
.event-slide.active {
    opacity: 1 !important;
}

.rp-slideshow-sidebar {
    background-color: #f3f4f6;
    padding: 1.5rem;
    border-radius: var(--radius-box);
    box-shadow: var(--shadow-card);
    height: 450px;
    display: flex;
    flex-direction: column;
}

.rp-slideshow-empty {
    border-radius: 2rem;
    height: 100%;
}

.rp-slideshow-list-scroll {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--color-accent) 85%, transparent) #f1f1f1;
}

.rp-slideshow-list-scroll::-webkit-scrollbar {
    width: 6px;
}

.rp-slideshow-list-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.rp-slideshow-list-scroll::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 3px;
}

.rp-slideshow-list-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--color-hover);
}

#prev-slide.rp-slideshow-nav:hover,
#next-slide.rp-slideshow-nav:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

#slide-indicators button:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 767px) {
    .event-slideshow-shell.rp-slideshow-shell,
    .event-slideshow-shell .rp-slideshow,
    .event-slideshow-shell #event-slideshow,
    .event-slideshow-shell .rp-slideshow-slide,
    .event-slideshow-shell #event-slideshow .event-slide {
        height: auto;
        min-height: 22rem !important;
    }

    .event-slideshow-shell #event-slideshow {
        padding-bottom: 2.75rem;
    }

    .event-slideshow-shell .rp-slideshow-nav {
        top: 5.5rem;
        transform: translateY(-50%);
        padding: 0.4rem;
        z-index: 30;
    }

    .event-slideshow-shell #prev-slide {
        left: 0.5rem;
    }

    .event-slideshow-shell #next-slide {
        right: 0.5rem;
    }

    .event-slideshow-shell .rp-slideshow-nav svg {
        width: 1.125rem;
        height: 1.125rem;
    }

    .event-slideshow-shell .rp-slideshow-content {
        padding: 0.5rem 0.5rem 0.25rem;
    }

    .event-slideshow-shell .rp-slideshow-content > div {
        padding: 0.75rem;
    }

    .event-slideshow-shell .rp-slideshow-dots {
        bottom: 0.5rem;
        z-index: 35;
    }

    .event-slideshow-shell .rp-slideshow-dots .slide-dot {
        width: 0.5rem;
        height: 0.5rem;
    }
}

@media (max-width: 767px) {
    .rp-slideshow-shell:not(.event-slideshow-shell),
    .rp-slideshow:not(#event-slideshow),
    .rp-slideshow-slide:not(.event-slide) {
        height: 240px;
        min-height: 240px !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .rp-slideshow-shell,
    .rp-slideshow,
    #event-slideshow,
    .rp-slideshow-slide,
    #event-slideshow .event-slide {
        min-height: 320px !important;
    }
}

@media (max-width: 768px) {
    #event-slideshow .rp-slideshow-content {
        padding: 0.5rem;
    }

    #event-slideshow h3 {
        font-size: 1.0625rem;
        line-height: 1.35;
    }
}

/* Sidebar filtry — katalog, trhy-akce */
@media (min-width: 1024px) {
    .rp-sidebar-panel {
        position: sticky;
        top: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}

@media (max-width: 1023px) {
    .rp-slideshow-sidebar {
        height: auto;
        min-height: 240px;
    }
}

/* Mapa — canvas výška (mapa.php) */
.map-wrap {
    position: relative;
    min-height: 260px;
}

.map-skeleton-overlay {
    z-index: 5;
    background: rgba(255, 255, 255, 0.55);
    transition: opacity 0.2s ease;
}

.map-skeleton-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.rp-map-canvas {
    height: 52vh;
    min-height: 260px;
}

@media (min-width: 1024px) {
    .rp-map-canvas {
        height: min(58vh, calc(100vh - 380px));
        min-height: min(58vh, calc(100vh - 380px));
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .rp-map-canvas,
    #map.leaflet-container {
        height: 50vh !important;
        min-height: 320px !important;
    }

    body.page-mapa {
        padding-bottom: 0;
    }

    body.page-mapa footer {
        margin-bottom: 0;
    }
}

/* Media hero — detaily */
.rp-media-hero {
    max-height: 500px;
}

.rp-media-hero--sm {
    max-height: 300px;
}

@media (max-width: 767px) {
    .rp-media-hero--sm {
        max-height: 220px;
    }
}

/* Listing toolbar — katalog, tržiště, trhy-akce */
.rp-listing-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.rp-listing-toolbar__count {
    min-width: 0;
}

.rp-listing-toolbar__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    min-width: 0;
}

@media (max-width: 639px) {
    .rp-listing-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .rp-listing-toolbar__controls {
        flex-direction: column;
        align-items: stretch;
    }

    .rp-listing-toolbar__per-page {
        justify-content: space-between;
    }
}

@media (max-width: 1023px) {
    .rp-listing-toolbar__per-page-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        min-width: 44px;
    }

    .rp-listing-toolbar__view-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        min-width: 44px;
    }
}

/* Detail stránky — sticky aside (lg+ only) */
.rp-sticky-aside {
    position: static;
}

@media (min-width: 1024px) {
    .rp-sticky-aside {
        position: sticky;
        top: 7rem;
    }
}

/* Dlouhé texty — FAQ, popisy */
.rp-prose-safe {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.rp-prose-safe p,
.rp-prose-safe li,
.rp-prose-safe a,
.rp-prose-safe span {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Mapa — prostor pod mapou */
.rp-map-page-section {
    padding-bottom: 1.5rem;
}

@media (max-width: 767px) {
    .map-page-hero.rp-hero {
        padding-bottom: 0.5rem;
    }

    .map-page-hero .rp-hero-subtitle {
        font-size: 0.8125rem;
        line-height: 1.35;
    }

    .rp-map-page-section {
        padding-bottom: 0.75rem;
    }

    body.page-mapa #site-footer {
        margin-top: 0;
    }

    .rp-map-canvas,
    .map-wrap .leaflet-container,
    #map.leaflet-container {
        height: 46vh !important;
        min-height: 220px !important;
    }

    .rp-map-mobile-block {
        margin-top: 0.75rem;
    }

    .rp-map-mobile-block .rp-map-list-strip--mobile {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 0.75rem;
        width: max-content;
        min-width: 100%;
        padding-bottom: 0.25rem;
    }

    .rp-map-mobile-block .list-item-mobile {
        flex: 0 0 auto;
        width: 11.5rem;
        max-width: 78vw;
        overflow: hidden;
        box-sizing: border-box;
        background-color: #fff;
    }

    .rp-map-mobile-block .list-item-mobile h4,
    .rp-map-mobile-block .list-item-mobile p {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .rp-map-mobile-block .list-item-empty {
        flex: 0 0 100%;
        width: 100%;
        min-width: 0;
    }

    .map-wrap #locate-me-btn {
        position: absolute;
        bottom: 0.75rem;
        right: 0.75rem;
        z-index: 401;
    }
}

.rp-opening-hours-label {
    min-width: 86px;
}

/* CTA banner — home (batch 3B) */
.rp-cta-banner {
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .rp-cta-banner {
        padding: 4rem;
    }
}

/* Sekční spacing — homepage */
.rp-section-compact {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .rp-section-compact {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}
