/* ============================================
   Traffics Integration — Layout Structure
   All visual styling goes in:
   WP Admin > Traffics > Settings > Custom CSS
   ============================================ */

/* ── Global Container Max Width ─────────────── */

.traffics-container,
.traffics-search-wrapper,
.traffics-results-container,
.traffics-top-destinations,
.traffics-bargains-slider {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

.tbs-card-link {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* ── iOS Zoom Prevention ───────────────────── */
/* Prevents iOS Safari from zooming when focusing input fields */
@media screen and (max-width: 768px) {
    .traffics-container input[type="text"],
    .traffics-container input[type="number"],
    .traffics-container input[type="email"],
    .traffics-container input[type="tel"],
    .traffics-container input[type="date"],
    .traffics-container select,
    .traffics-container textarea,
    .traffics-search-wrapper input[type="text"],
    .traffics-search-wrapper select,
    .traffics-single-trip-page input[type="text"],
    .traffics-single-trip-page input[type="number"],
    .traffics-single-trip-page input[type="email"],
    .traffics-single-trip-page input[type="tel"],
    .traffics-single-trip-page select,
    .traffics-single-trip-page textarea,
    .traffics-booking-modal input,
    .traffics-booking-modal select,
    .traffics-booking-modal textarea {
        font-size: 16px !important;
    }
}

/* ── Type Tabs ───────────────────────────────── */

.traffics-type-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.traffics-type-tab {
    cursor: pointer;
}

/* ── Search Form ────────────────────────────── */

.traffics-search-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
    align-items: end;
}

.traffics-form-group {
    display: flex;
    flex-direction: column;
}

.traffics-form-group--autocomplete {
    position: relative;
}

/* Autocomplete dropdown for main search */
.traffics-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 9999;
    max-height: 280px;
    overflow-y: auto;
    margin-top: 4px;
}

.traffics-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    color: #1a3347;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.traffics-autocomplete-item:last-child {
    border-bottom: none;
}

.traffics-autocomplete-item:hover,
.traffics-autocomplete-item.active {
    background: #f5f8fa;
}

.traffics-autocomplete-type {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-left: auto;
}

.traffics-autocomplete-icon {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    flex-shrink: 0;
}

/* ── Travelers Selector ────────────────────── */

.traffics-form-group--travelers {
    position: relative;
}

.traffics-travelers-selector {
    position: relative;
}

.traffics-travelers-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: #fff;
    text-align: left;
}

.traffics-travelers-trigger.active .travelers-chevron {
    transform: rotate(180deg);
}

.travelers-chevron {
    transition: transform 0.2s ease;
    opacity: 0.5;
    flex-shrink: 0;
}

.travelers-summary {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.traffics-travelers-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 9999;
    margin-top: 4px;
    padding: 16px;
    min-width: 240px;
}

.travelers-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.travelers-row:last-of-type {
    border-bottom: none;
}

.travelers-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.travelers-type {
    font-weight: 500;
    color: #1a3347;
    font-size: 14px;
}

.travelers-age {
    font-size: 12px;
    color: #888;
}

.travelers-counter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.travelers-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a3347;
    transition: all 0.2s ease;
}

.travelers-btn:hover:not(:disabled) {
    border-color: #00b4b4;
    color: #00b4b4;
}

.travelers-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.travelers-count {
    font-size: 16px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    color: #1a3347;
}

.traffics-travelers-done {
    width: 100%;
    margin-top: 12px;
    padding: 10px 16px;
    background: #00b4b4;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.traffics-travelers-done:hover {
    background: #009e9c;
}

/* ── Flatpickr date range input + calendar ──────────────────────────────── */

.traffics-daterange-fp {
    cursor: pointer;
    caret-color: transparent;
}

/* Appearance only — no sizing, no font-size, no height overrides */
.flatpickr-calendar {
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14) !important;
    border: none !important;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    fill: #00BDBB !important;
}
.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
    fill: #1a3347 !important;
}

.flatpickr-weekday {
    color: #00BDBB !important;
    font-weight: 700 !important;
}

.flatpickr-day {
    color: #1a3347 !important;
    border: none !important;
}
.flatpickr-day:hover,
.flatpickr-day:focus {
    background: #e6fafa !important;
    color: #00BDBB !important;
    border: none !important;
    border-radius: 6px !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background: #00BDBB !important;
    border-color: #00BDBB !important;
    color: #fff !important;
}
.flatpickr-day.startRange { border-radius: 6px 0 0 6px !important; }
.flatpickr-day.endRange   { border-radius: 0 6px 6px 0 !important; }
.flatpickr-day.startRange.endRange { border-radius: 6px !important; }

.flatpickr-day.inRange {
    background: #e6fafa !important;
    border-color: #e6fafa !important;
    color: #1a3347 !important;
    border-radius: 0 !important;
    box-shadow: -5px 0 0 #e6fafa, 5px 0 0 #e6fafa !important;
}

.flatpickr-day.today {
    border-color: #00BDBB !important;
}
.flatpickr-day.today:hover {
    background: #00BDBB !important;
    color: #fff !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: rgba(26,51,71,0.2) !important;
}

@media (max-width: 480px) {
    .flatpickr-calendar {
        position: fixed !important;
        left: 16px !important;
        right: 16px !important;
        width: calc(100vw - 32px) !important;
    }
}

.traffics-input {
    width: 100%;
    box-sizing: border-box;
}

.traffics-filters-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.traffics-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-top: 28px;
}

.traffics-checkbox-label input[type="checkbox"] {
    cursor: pointer;
}

/* ── Results ────────────────────────────────── */

.traffics-spinner {
    border: 4px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: traffics-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes traffics-spin {
    to { transform: rotate(360deg); }
}

/* Load-more button: inline spinner while loading */
.traffics-btn-load-more.is-loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
    padding-left: 2.4em; /* make room for spinner */
}

.traffics-btn-load-more.is-loading::before {
    content: '';
    position: absolute;
    left: 0.8em;
    top: 50%;
    transform: translateY(-50%);
    width: 1em;
    height: 1em;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: traffics-spin 0.7s linear infinite;
}

.traffics-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.traffics-results-count {
    margin: 0;
    font-size: 14px;
    color: #555;
}

.traffics-results-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.traffics-input--sm {
    padding: 6px 10px;
    font-size: 13px;
    height: auto;
}

.traffics-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* ── Icons ──────────────────────────────────── */

.detail-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.traffics-search-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

/* ── Trip Card ──────────────────────────────── */

.traffics-trip-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.trip-image-container {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.trip-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trip-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.badge {
    display: inline-block;
}

.trip-rating {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.trip-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.trip-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.detail-info {
    display: flex;
    flex-direction: column;
}

.trip-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trip-price {
    display: flex;
    flex-direction: column;
}

.trip-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Inclusive Service Badges ───────────────── */

.trip-inclusive-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 8px 0 4px;
}

.traffics-inclusive-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #eaf4fb;
    color: #1a6e9e;
    border: 1px solid #b8d9ed;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
}

/* ── Single Trip Page ───────────────────────── */

/* Constrain page width so content is readable, not full-browser-width */
.traffics-single-trip-page > .container {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
    width: 100%;
}

/* Hero content now lives inside the left column, below the gallery */
.traffics-single-trip-page .trip-hero-content {
    margin-bottom: 1.5em;
}
.traffics-single-trip-page .breadcrumbs {
    font-size: 0.82rem;
    color: #999;
    margin-bottom: 0.75em;
}
.traffics-single-trip-page .breadcrumbs a { color: #999; text-decoration: none; }
.traffics-single-trip-page .breadcrumbs a:hover { color: #2ECCC8; }
.traffics-single-trip-page .trip-main-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: #1a3347;
    line-height: 1.2;
    margin: 0 0 0.6em;
}
.traffics-single-trip-page .trip-stars { color: #f59e0b; font-size: 1.1rem; }
.traffics-single-trip-page .trip-location-meta,
.traffics-single-trip-page .trip-rating-meta { color: #666; font-size: 0.9rem; }

/* Gallery */
.traffics-single-trip-page .trip-gallery { margin: 0 0 1.75em; }
.traffics-single-trip-page .gallery-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 6px;
}
.traffics-single-trip-page .gallery-grid.gallery-grid--single {
    grid-template-columns: 1fr;
}

/* Main image */
.traffics-single-trip-page .gallery-main img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: 12px;
}

/* Right panel: flex column that holds thumbs and/or video */
.traffics-single-trip-page .gallery-right-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 400px; /* matches main image */
}

/* Thumbs grid inside right panel */
.traffics-single-trip-page .gallery-right-panel .gallery-thumbs {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
    min-height: 0;
}
.traffics-single-trip-page .gallery-right-panel .gallery-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: 8px;
}

/* When both thumbs and video: thumbs take upper ~60%, video lower ~40% */
.traffics-single-trip-page .gallery-right-panel--has-video .gallery-thumbs {
    flex: 0 0 calc(60% - 3px);
}
.traffics-single-trip-page .gallery-video-thumb {
    flex: 1;
    min-height: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
}
.traffics-single-trip-page .gallery-video-thumb iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Video-only as full-width main panel */
.traffics-single-trip-page .gallery-video-wrapper {
    position: relative;
    padding-bottom: 40%; /* shorter than 16:9 to stay compact */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #111;
}
.traffics-single-trip-page .gallery-video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.traffics-single-trip-page .gallery-video-wrapper video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}
.traffics-single-trip-page .gallery-video-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Two-column layout */
.traffics-single-trip-page .trip-content-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2.5em;
    align-items: start;
}

/* Left column */
.traffics-single-trip-page .highlights-grid,
.traffics-single-trip-page .amenities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.traffics-single-trip-page .highlight-item,
.traffics-single-trip-page .amenity-item {
    font-size: 0.88rem;
    color: #444;
    padding: 4px 0;
}
.traffics-single-trip-page .content-block { margin-bottom: 2em; }
.traffics-single-trip-page .content-block h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a3347;
    margin: 0 0 0.75em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid #f0f0f0;
}
.traffics-single-trip-page .trip-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 1.25em;
}

/* ── Sidebar / Booking card ── */
.traffics-single-trip-page .booking-card.sticky {
    position: sticky;
    top: 20px;
}
.traffics-single-trip-page .booking-card {
    background: #fff;
    border: none;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 28px rgba(0,0,0,.10);
}

/* Price */
.traffics-single-trip-page .booking-price {
    margin-bottom: 20px;
    padding-bottom: 0;
    border-bottom: none;
    text-align: left;
}
.traffics-single-trip-page .booking-price .price-label {
    display: none; /* "From" hidden — price is self-explanatory */
}
.traffics-single-trip-page .booking-price .price-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a3347;
    display: inline;
    line-height: 1.2;
    margin: 0;
}
.traffics-single-trip-page .booking-price .price-info {
    font-size: 0.82rem;
    color: #2ECCC8;
    display: block;
    margin-top: 6px;
}

/* Detail rows — pill-shaped */
.traffics-single-trip-page .booking-details { margin-bottom: 20px; }
.traffics-single-trip-page .detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border: 1px solid #e8e8e8;
    border-radius: 50px;
    margin-bottom: 10px;
    background: #fff;
}
.traffics-single-trip-page .detail-row:last-child { margin-bottom: 0; }
.traffics-single-trip-page .detail-row > div { flex: 1; min-width: 0; }
.traffics-single-trip-page .detail-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    opacity: 0.65;
}
.traffics-single-trip-page .detail-label {
    font-size: 0.7rem;
    color: #aaa;
    margin-bottom: 1px;
    line-height: 1.2;
}
.traffics-single-trip-page .detail-value {
    font-size: 0.85rem;
    color: #1a3347;
    font-weight: 500;
    line-height: 1.3;
}

/* Book button */
.traffics-single-trip-page .btn-book-large {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: #1a3347;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
}
.traffics-single-trip-page .btn-book-large:hover { background: #142737; }
.traffics-single-trip-page .operator-info {
    text-align: center;
    font-size: 0.72rem;
    color: #bbb;
    margin-top: 6px;
}

/* ── Reviews / Bewertungen ── */
.traffics-single-trip-page .rb-header {
    display: flex;
    align-items: flex-start;
    gap: 2em;
}
.traffics-single-trip-page .rb-headline {
    flex-shrink: 0;
    text-align: center;
    min-width: 110px;
}
.traffics-single-trip-page .rb-headline-score {
    font-size: 3rem;
    font-weight: 800;
    color: #1a3347;
    line-height: 1;
}
.traffics-single-trip-page .rb-headline-unit {
    font-size: 1.4rem;
    font-weight: 600;
    vertical-align: super;
}
.traffics-single-trip-page .rb-headline-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #2ECCC8;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-top: 0.3em;
}
.traffics-single-trip-page .rb-headline-count {
    font-size: 0.72rem;
    color: #aaa;
    margin-top: 0.25em;
}
.traffics-single-trip-page .rb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1em 0.75em;
    flex: 1;
}
.traffics-single-trip-page .rb-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45em;
}
/* Donut circle via conic-gradient + inner mask */
.traffics-single-trip-page .rb-circle {
    position: relative;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: conic-gradient(#2ECCC8 var(--rb-pct), #eef0f2 0);
    display: flex;
    align-items: center;
    justify-content: center;
}
.traffics-single-trip-page .rb-circle::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 50%;
}
.traffics-single-trip-page .rb-circle-pct {
    position: relative;
    z-index: 1;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a3347;
}
.traffics-single-trip-page .rb-circle-label {
    font-size: 0.72rem;
    color: #666;
    text-align: center;
}
@media (max-width: 860px) {
    .traffics-single-trip-page .rb-header { flex-direction: column; }
    .traffics-single-trip-page .rb-headline { display: flex; gap: 1em; align-items: center; text-align: left; }
    .traffics-single-trip-page .rb-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 480px) {
    .traffics-single-trip-page .rb-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Gallery lightbox ───────────────────────── */

.traffics-single-trip-page .gallery-main { position: relative; }
.traffics-single-trip-page .gallery-more-overlay {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    pointer-events: none;
}
.traffics-single-trip-page .gallery-main a,
.traffics-single-trip-page .gallery-thumbs a {
    display: block;
    overflow: hidden;
    border-radius: inherit;
}
.traffics-single-trip-page .gallery-thumbs a img,
.traffics-single-trip-page .gallery-main a img {
    transition: transform 0.2s ease;
}
.traffics-single-trip-page .gallery-main a:hover img,
.traffics-single-trip-page .gallery-thumbs a:hover img {
    transform: scale(1.03);
}

.traffics-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lightbox-img {
    max-width: 90vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}
.lightbox-counter {
    color: rgba(255,255,255,.7);
    font-size: 0.82rem;
    margin-top: 10px;
    text-align: center;
}
.lightbox-close {
    position: fixed;
    top: 18px;
    right: 22px;
    font-size: 2.2rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    opacity: .8;
    z-index: 100000;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    opacity: .7;
    z-index: 100000;
    padding: 0 16px;
    line-height: 1;
}
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }
body.lightbox-open { overflow: hidden; }

/* ── Rating pill ─────────────────────────────── */
.traffics-single-trip-page .rating-pill {
    display: inline-block;
    background: #2ECCC8;
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 2px 9px;
    border-radius: 20px;
}

/* ── Operator logo ───────────────────────────── */
.traffics-single-trip-page .operator-logo-wrap {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}
.traffics-single-trip-page .operator-logo {
    max-height: 40px;
    max-width: 160px;
    object-fit: contain;
}

/* ── Map section ─────────────────────────────── */
.traffics-single-trip-page .trip-map-wrapper {
    position: relative;
    height: 380px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}
.traffics-single-trip-page .trip-map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.traffics-single-trip-page .trip-map-static img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}
.traffics-single-trip-page .map-coordinates {
    font-size: 0.78rem;
    color: #888;
    margin-top: 6px;
}
.traffics-single-trip-page .map-coordinates a { color: #2ECCC8; }

/* ── Other available dates ───────────────────── */
.traffics-single-trip-page .other-dates-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
}
.traffics-single-trip-page .other-dates-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.traffics-single-trip-page .other-dates-table thead th {
    background: #f7f9fb;
    color: #888;
    font-weight: 600;
    padding: 10px 14px;
    text-align: left;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
}
.traffics-single-trip-page .other-dates-table tbody td {
    padding: 10px 14px;
    border-top: 1px solid #f0f0f0;
    vertical-align: middle;
    white-space: nowrap;
}
.traffics-single-trip-page .other-dates-row--current td {
    background: #f0fffe;
}
.traffics-single-trip-page .other-dates-price {
    font-weight: 700;
    color: #1a3347;
}
.traffics-single-trip-page .other-dates-current-badge {
    display: inline-block;
    background: #2ECCC8;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}
.traffics-single-trip-page .other-dates-select {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid #2ECCC8;
    border-radius: 20px;
    color: #2ECCC8;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.traffics-single-trip-page .other-dates-select:hover {
    background: #2ECCC8;
    color: #fff;
}

/* ── Special text ────────────────────────────── */
.traffics-single-trip-page .description-text--special {
    background: #f8f9fa;
    border-left: 3px solid #2ECCC8;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 0.88rem;
    color: #555;
}

/* ── Booking Modal ──────────────────────────── */

#traffics-booking-modal {
    display: none;
}

body.booking-modal-open {
    overflow: hidden;
}

.booking-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
}

.booking-modal-wrap {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
}

.booking-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 680px;
}

.booking-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
    padding: 0;
}

.booking-modal-header {
    padding-right: 40px;
}

.booking-modal-header h2 {
    margin: 0 0 6px;
}

.booking-steps-indicator {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
}

.booking-step-indicator {
    flex: 1;
    text-align: center;
    font-size: 12px;
    padding: 6px 4px;
}

.booking-step-content {
    display: none;
}

.booking-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.booking-form-row--full {
    grid-template-columns: 1fr;
}

.booking-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.booking-form-group label {
    font-size: 13px;
}

.booking-form-group input,
.booking-form-group select,
.booking-form-group textarea {
    width: 100%;
    box-sizing: border-box;
}

.booking-form-group input.field-error,
.booking-form-group select.field-error {
    outline: 2px solid red;
}

.required { color: red; }

.optional {
    opacity: 0.6;
    font-size: 11px;
}

.booking-traveller-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
}

.booking-identity-details {
    margin-top: 12px;
}

.booking-identity-details summary {
    cursor: pointer;
    font-size: 13px;
    margin-bottom: 8px;
}

.booking-identity-fields {
    margin-top: 12px;
}

.booking-action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 24px;
}

.booking-action-buttons button {
    cursor: pointer;
}

.booking-prev-btn {
    flex: 0 0 auto;
}

.booking-next-btn,
#booking-submit-btn {
    flex: 1;
}

.booking-summary-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    margin-bottom: 20px;
}

.booking-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
}

#booking-loading {
    text-align: center;
    padding: 30px 0;
}

.booking-error-text {
    margin-bottom: 16px;
}

/* ── Responsive ─────────────────────────────── */

@media (max-width: 1024px) {
    .traffics-search-row {
        grid-template-columns: 1fr 1fr;
    }
    .traffics-form-submit {
        grid-column: span 2;
    }
    .traffics-filters-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .traffics-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .traffics-search-row {
        grid-template-columns: 1fr;
    }
    .traffics-form-submit {
        grid-column: 1;
    }
    .traffics-filters-row {
        grid-template-columns: 1fr;
    }
    .booking-form-row {
        grid-template-columns: 1fr;
    }
    .booking-modal-wrap {
        padding: 0;
        align-items: stretch;
    }
    .booking-modal-dialog {
        max-width: 100%;
    }
    .traffics-results-grid {
        grid-template-columns: 1fr;
    }
    .trip-details-grid {
        grid-template-columns: 1fr;
    }
    .trip-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .trip-actions {
        flex-direction: row;
    }
    /* Single-trip gallery: stack to single column */
    .traffics-single-trip-page .gallery-grid {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    .traffics-single-trip-page .gallery-main img {
        height: 210px;
        border-radius: 10px;
    }
    /* Right panel becomes a horizontal thumbs strip below the main image */
    .traffics-single-trip-page .gallery-right-panel {
        height: auto;
        flex-direction: row;
    }
    .traffics-single-trip-page .gallery-right-panel .gallery-thumbs {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: 1fr;
        height: 72px;
        flex: 1;
    }
    .traffics-single-trip-page .gallery-right-panel--has-video .gallery-thumbs {
        flex: 0 0 60%;
    }
    .traffics-single-trip-page .gallery-video-thumb {
        height: 72px;
        border-radius: 6px;
    }
    /* Single-trip layout: stack content + sidebar */
    .traffics-single-trip-page .trip-content-grid {
        grid-template-columns: 1fr;
        gap: 1.5em;
    }
    /* Prevent content overflow on mobile */
    .traffics-single-trip-page .trip-content-section,
    .traffics-single-trip-page .trip-main-content,
    .traffics-single-trip-page .trip-sidebar,
    .traffics-single-trip-page .booking-card {
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    .traffics-single-trip-page .detail-row {
        max-width: 100%;
        box-sizing: border-box;
    }
    .traffics-single-trip-page .detail-value {
        word-break: break-word;
    }
    .traffics-single-trip-page > .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    /* Hero content mobile fixes */
    .traffics-single-trip-page .trip-hero-content {
        max-width: 100%;
    }
    .traffics-single-trip-page .trip-main-title {
        word-break: break-word;
    }
    .traffics-single-trip-page .trip-meta {
        gap: 10px 16px;
    }
    .traffics-single-trip-page .trip-inclusive-badges {
        max-width: 100%;
    }
    /* Booking card: not sticky when stacked */
    .traffics-single-trip-page .booking-card.sticky {
        position: static;
        top: auto;
    }
    /* Show booking card before the text content on mobile */
    .traffics-single-trip-page .trip-sidebar      { order: -1; }
    .traffics-single-trip-page .trip-main-content { order:  0; }
    .traffics-single-trip-page .highlights-grid,
    .traffics-single-trip-page .amenities-grid {
        grid-template-columns: 1fr;
    }
    /* Dates table: hide Rückreise (col 2) and Zimmer (col 5) to fit mobile */
    .traffics-single-trip-page .other-dates-table th:nth-child(2),
    .traffics-single-trip-page .other-dates-table td:nth-child(2),
    .traffics-single-trip-page .other-dates-table th:nth-child(5),
    .traffics-single-trip-page .other-dates-table td:nth-child(5) {
        display: none;
    }
    /* Rating breakdown: keep 4 columns, smaller circles on mobile */
    .traffics-single-trip-page .rb-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75em 0.5em;
    }
    .traffics-single-trip-page .rb-circle {
        width: 52px;
        height: 52px;
    }
    .traffics-single-trip-page .rb-circle::after {
        width: 36px;
        height: 36px;
    }
    .traffics-single-trip-page .rb-circle-pct {
        font-size: 0.72rem;
    }
    .traffics-single-trip-page .rb-circle-label {
        font-size: 0.65rem;
    }
    .traffics-single-trip-page .rb-headline-score {
        font-size: 2.2rem;
    }
    /* Flight details: stack on mobile */
    .traffics-single-trip-page .flight-details-grid {
        display: block;
    }
    .traffics-single-trip-page .flight-leg {
        margin-bottom: 1.5em;
    }
    .traffics-single-trip-page .flight-table {
        width: 100%;
        font-size: 0.85rem;
    }
    /* Content blocks full width */
    .traffics-single-trip-page .content-block {
        max-width: 100%;
        overflow-x: hidden;
    }
    .traffics-single-trip-page .description-text {
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .trip-image-container {
        height: 200px;
    }
    /* Dates table: also hide Verpflegung (col 4) on very small screens */
    .traffics-single-trip-page .other-dates-table th:nth-child(4),
    .traffics-single-trip-page .other-dates-table td:nth-child(4) {
        display: none;
    }
    .traffics-single-trip-page .other-dates-table {
        font-size: 0.8rem;
    }
    .traffics-single-trip-page .other-dates-table tbody td {
        padding: 8px 10px;
    }
    .traffics-single-trip-page .trip-main-title {
        font-size: 1.5rem;
    }
    .traffics-single-trip-page .gallery-main img {
        height: 180px;
    }
    .traffics-single-trip-page .gallery-thumbs {
        height: 60px;
    }
    /* Smaller container padding on very small screens */
    .traffics-single-trip-page > .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    /* Rating breakdown: 3 columns on very small screens */
    .traffics-single-trip-page .rb-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .traffics-single-trip-page .rb-circle {
        width: 46px;
        height: 46px;
    }
    .traffics-single-trip-page .rb-circle::after {
        width: 32px;
        height: 32px;
    }
    .traffics-single-trip-page .rb-circle-pct {
        font-size: 0.68rem;
    }
    /* Booking card padding */
    .traffics-single-trip-page .booking-card {
        padding: 18px;
    }
    .traffics-single-trip-page .detail-row {
        padding: 10px 14px;
    }
}

