/* =========================================================
   RLP Shared CSS
   Gemeinsame Styles für Cards, Filter, Detail, Icons, Karten
   CI-Variablen kommen aus kell-ui-system.php
   ========================================================= */

/* ---------- Cards: Label + Meta ---------- */
.rlp-card,
.rlp-card .rlp-card__label,
.rlp-card .rlp-label-text,
.rlp-card .rlp-card__title,
.rlp-card .rlp-card__meta,
.rlp-card .rlp-card__meta-item,
.rlp-card .rlp-card__excerpt,
.rlp-card .rlp-contact-text,
.rlp-card .rlp-acc-contact-text {
    color: #000;
}

.rlp-card__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.1;
}

.rlp-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
}

.rlp-card__meta--primary,
.rlp-card__meta--difficulty,
.rlp-card__meta--elevation {
    margin-top: 6px;
}

@media (min-width: 520px) {
    .rlp-card__meta--primary,
    .rlp-card__meta--elevation {
        display: flex;
        flex-wrap: wrap;
        column-gap: 18px;
        row-gap: 8px;
    }
}

.rlp-filter-hint {
    margin: 8px 0 18px;
    font-size: 0.9rem;
    line-height: 1.35;
}

.rlp-map-wrapper .leaflet-popup-content,
.rlp-map-fullscreen-inner .leaflet-popup-content {
    font-size: 15px;
    line-height: 1.35;
    margin: 12px 14px 12px 12px;
}

.rlp-map-popup {
    position: relative;
    padding-right: 28px;
    min-width: 110px;
}

.rlp-map-popup__close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 4;
    padding: 0;
}

.rlp-poi-detail__left {
    position: relative;
    z-index: 2;
}

.rlp-poi-detail__map-big {
    isolation: isolate;
}

.rlp-card__label--bike::before,
.rlp-card__label--bike::after,
.rlp-card__label--hike::before,
.rlp-card__label--hike::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

/* ---------- Icons ---------- */
html, body {
    --rlp-icon-color: var(--hf-gruenblau, #079D91);
    --rlp-icon-accent: var(--hf-gruenblau, #079D91);
    --rlp-icon-bg: rgba(7, 157, 145, 0.10);
    --rlp-icon-ring: rgba(7, 157, 145, 0.35);
}

.rlp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: var(--rlp-icon-color, var(--hf-gruenblau, #079D91)) !important;
    line-height: 0;
}

.rlp-icon svg,
.rlp-card--type-hike .rlp-icon svg,
.rlp-poi-detail .rlp-icon svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rlp-card__meta .rlp-icon,
.rlp-poi-detail__tourinfo .rlp-icon {
    width: 19px;
    height: 19px;
    flex-basis: 19px;
    transform: translateY(-0.5px);
}

.rlp-card--type-hike .kell-ui-icon,
.rlp-card--type-hike .rlp-icon,
.rlp-poi-detail .kell-ui-icon,
.rlp-poi-detail .rlp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-right: 6px;
    color: var(--hf-gruenblau, #079D91);
}

.rlp-tourinfo li::marker {
    color: transparent;
}

/* ---------- POI / Gastro Cards ---------- */
.rlp-grid--poi {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.rlp-card--poi {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.rlp-card--poi .rlp-card__image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f5f5f5;
}

.rlp-card--poi .rlp-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rlp-card--poi .rlp-card__body {
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
}

.rlp-card--poi .rlp-card__title {
    margin: 0;
}

.rlp-card--poi .rlp-card__footer {
    margin-top: auto;
    padding-top: 6px;
}

.rlp-grid--trails .rlp-card__button {
    background: var(--hf-wald, #005B5B) !important;
    border-color: var(--hf-wald, #005B5B) !important;
    color: #fff !important;
}

.rlp-grid--trails .rlp-card__button:hover,
.rlp-grid--trails .rlp-card__button:focus {
    background: var(--hf-gruenblau, #079D91) !important;
    border-color: var(--hf-gruenblau, #079D91) !important;
    color: #fff !important;
}

/* ---------- Status-Badges ---------- */
.rlp-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    line-height: 1.2;
}

.rlp-badge--closed {
    background: #f8d7da;
    color: #842029;
}

.rlp-badge--open {
    background: #d1e7dd;
    color: #0f5132;
}

.rlp-badge--soon {
    background: #e6f4ea;
    color: #146c2e;
}

/* ---------- Parken / ÖPNV Chips ---------- */
.rlp-access-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    overflow: visible;
}

.rlp-access-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 0;
    border-radius: 999px;
    background: var(--hf-leinen, #ebe7cc);
    color: #222628;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    line-height: 1.2;
    text-decoration: none !important;
    pointer-events: auto;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.rlp-access-chips--card .rlp-access-chip {
    cursor: default;
    pointer-events: none;
}

.rlp-access-chip-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.rlp-access-chip-wrap > summary {
    list-style: none;
}

.rlp-access-chip-wrap > summary::-webkit-details-marker,
.rlp-access-chip-wrap > summary::marker {
    display: none;
    content: none;
}

.rlp-access-chip-wrap[open] {
    flex: 1 1 100%;
}

.rlp-access-chip .kell-ui-icon,
.rlp-card .rlp-access-chip .kell-ui-icon,
.rlp-poi-detail .rlp-access-chip .kell-ui-icon {
    width: 16px;
    height: 16px;
    color: var(--hf-gruenblau, #079d91) !important;
    pointer-events: none;
}

.rlp-access-popover {
    position: relative;
    box-sizing: border-box;
    margin-top: 8px;
    max-width: min(520px, 100%);
    max-height: 280px;
    overflow: auto;
    padding: 16px 44px 14px 14px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
    color: #303438;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
}

.rlp-access-popover a,
.rlp-access-popover a:hover,
.rlp-access-popover a:focus {
    color: inherit !important;
    text-decoration: none !important;
    pointer-events: none !important;
    cursor: default !important;
}

.rlp-access-popover__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.rlp-access-popover__done {
    display: inline-flex;
    margin-top: 10px;
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    background: var(--hf-gruenblau, #079d91);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
}

.rlp-access-popover strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 800;
    color: #222628;
}

.rlp-access-popover__text p {
    margin: 0 0 8px;
}

.rlp-access-popover__text p:last-child {
    margin-bottom: 0;
}

/* ---------- Kontaktzeilen ---------- */
.rlp-contact-row,
.rlp-acc-contact-row {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 8px;
    align-items: start;
    margin-top: 6px;
}

.rlp-contact-icon,
.rlp-acc-contact-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    color: var(--hf-gruenblau, #079D91);
    opacity: 0.95;
}

.rlp-contact-text,
.rlp-acc-contact-text {
    line-height: 1.35;
}

/* ---------- Detail ---------- */
.rlp-poi-detail__title {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.rlp-poi-detail__contactbox {
    background: #fff;
    border-radius: 12px;
    padding: 14px 14px 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    margin-top: 14px;
}

.rlp-poi-detail__navbox img {
    display: block;
    margin-top: 10px;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.rlp-poi-detail__navbox-place {
    margin-top: 6px;
    opacity: .9;
}

.rlp-poi-detail__qrhint {
    margin-top: 8px;
    font-size: 12px;
    opacity: .85;
}

.rlp-poi-detail__contactbox.rlp-poi-detail__tourinfo {
    padding: 24px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.rlp-poi-detail__contactbox.rlp-poi-detail__tourinfo strong {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 14px;
}

.rlp-poi-detail__hero-thumbs img.rlp-poi-detail__hero-thumb {
    width: 64px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
}

.rlp-tourinfo-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- Datum / Kalender ---------- */
.rlp-card__meta-item--date {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
    margin-top: 6px;
}

.rlp-card__date-text {
    display: inline-block;
}

.rlp-icon--calendar {
    width: 18px;
    height: 18px;
    display: inline-block;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 2h2v2h6V2h2v2h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h3V2zm15 8H2v10a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V10zM3 6a1 1 0 0 0-1 1v1h20V7a1 1 0 0 0-1-1H3z'/%3E%3C/svg%3E") no-repeat center / contain;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 2h2v2h6V2h2v2h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h3V2zm15 8H2v10a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V10zM3 6a1 1 0 0 0-1 1v1h20V7a1 1 0 0 0-1-1H3z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------- Event-Termine ---------- */
.rlp-poi-detail__dates .rlp-event-dates {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)) !important;
    gap: 8px;
    margin-top: 10px;
}

.rlp-poi-detail__dates .rlp-event-date {
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 8px 6px;
    text-align: center;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 74px;
    line-height: 1.1;
}

.rlp-poi-detail__dates .rlp-event-date__day {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.rlp-poi-detail__dates .rlp-event-date__mon {
    font-size: 12px;
    opacity: 0.75;
    margin-top: 2px;
}

.rlp-poi-detail__dates .rlp-event-date__wk {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 4px;
}

@media (max-width: 640px) {
    .rlp-poi-detail__dates .rlp-event-dates {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)) !important;
    }
}

/* ---------- Linked Cards (Kulinarik) ---------- */
.rlp-linked-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.rlp-linked-card {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.10);
    overflow: hidden;
    background: #fff;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

/* Child-Theme deaktiviert alle <a> im Detail-Text (Kiosk, keine externen Links).
   Interne POI-Kacheln müssen trotzdem klickbar bleiben. */
.rlp-poi-detail__content a.rlp-linked-card,
.rlp-poi-detail__content a.rlp-linked-card:hover,
.rlp-poi-detail__content a.rlp-linked-card:focus {
    pointer-events: auto !important;
    cursor: pointer !important;
    text-decoration: none !important;
    color: inherit !important;
}

.rlp-linked-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.rlp-linked-card__img {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.rlp-linked-card__img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rlp-linked-card__img--placeholder {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.08));
}

.rlp-linked-card__body {
    padding: 12px 12px 14px;
}

.rlp-linked-card__title {
    font-weight: 700;
    line-height: 1.2;
}

.rlp-linked-card__meta {
    margin-top: 6px;
    font-size: 13px;
    opacity: 0.75;
}

.rlp-actions-linked-section {
    margin-top: 26px;
    padding-top: 8px;
}

.rlp-actions-linked-section h2 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 800;
}

/* ---------- Karten / Vollbild ---------- */
.rlp-map-wrapper,
.rlp-poi-detail__map {
    position: relative;
}

.rlp-map-zoom-btn,
.rlp-map-fullscreen-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 500;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.leaflet-container > .rlp-map-zoom-btn {
    z-index: 500;
}

.rlp-map-wrapper.is-popup-open .rlp-map-zoom-btn {
    visibility: hidden;
    pointer-events: none;
}

.rlp-map-zoom-btn:hover,
.rlp-map-fullscreen-btn:hover {
    background: #f3f3f3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.rlp-map-fullscreen-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rlp-map-fullscreen-inner {
    position: relative;
    width: 96%;
    height: 92%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.rlp-map-fullscreen-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: #fff;
    border-radius: 999px;
    width: 32px;
    height: 32px;
    font-size: 22px;
    line-height: 28px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
