/* Package list (Experiences + Suggested itineraries), timeline bar and Next button on index.html.
   Style-only refresh: same markup, names and behaviour as the legacy page. */
:root {
    --xp-ocean: #0F3D4C;
    --xp-terracotta: #C4532F;
    --xp-terracotta-ink: #A8432A;
    --xp-sun: #F2B33D;
    --xp-sand: #F5EEE3;
    --xp-ink: #1D2A33;
    --xp-muted: #5B6770;
    --xp-line: #E4DCCD;
    --xp-ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- section headings ---------- */
#experiencesTitle .title-exp,
#modelPanel .itinerary .title-exp {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin: 28px 0 14px;
    padding: 0 0 12px;
    border: 0;
    border-bottom: 1px solid var(--xp-line);
}
#experiencesTitle .title-exp h4,
#modelPanel .itinerary .title-exp h4 {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    color: var(--xp-ocean);
}
#experiencesTitle .title-exp h4 *,
#modelPanel .itinerary .title-exp h4 * { text-transform: none; }
#experiencesTitle.row,
#modelPanel .itinerary > .row { margin-left: 0; margin-right: 0; }
#modelPanel .itinerary .title-exp > .pull-right { margin-left: auto; float: none !important; }
#jsSelectedInterests {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #EEF5F4;
    color: var(--xp-ocean);
    font: 700 13px "DM Sans", -apple-system, "Segoe UI", sans-serif;
}
#orderByNoDays, #orderByTitle {
    padding: 6px 14px;
    border: 1px solid var(--xp-line);
    border-radius: 999px;
    background: #fff;
    color: var(--xp-ocean);
    font: 700 13px "DM Sans", -apple-system, "Segoe UI", sans-serif;
    text-decoration: none;
    transition: border-color .2s, background .2s;
}
#orderByNoDays:hover, #orderByTitle:hover { border-color: var(--xp-ocean); background: #F7FAF9; }

/* ---------- list container ---------- */
#modelPanel.panel { border: 0; box-shadow: none; background: transparent; }
#modelPanel .panel-body { padding: 0; }
#modelPanel .models .dd-list { list-style: none; margin: 0; padding: 0; border: 0; }

/* ---------- destination rows ---------- */
#modelPanel .models li.modelCityDataLI {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 6px;
    margin: 0 0 10px;
    padding: 14px 18px;
    border: 1px solid var(--xp-line);
    border-radius: 16px;
    background: #fff;
    font-family: "DM Sans", -apple-system, "Segoe UI", sans-serif;
    transition: border-color .2s, box-shadow .25s, background .2s;
    animation: xp-rise .45s var(--xp-ease) both;
}
#modelPanel .models li.modelCityDataLI:hover {
    border-color: #C9D9DC;
    box-shadow: 0 8px 22px rgba(15, 61, 76, .08);
}
@keyframes xp-rise {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: none; }
}

#modelPanel .models .modelCityData {
    flex: 1 1 260px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
}
#modelPanel .models .modelCityData h4 {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--xp-ocean);
}
#modelPanel .models .modelInterestDots { margin: 0; float: none !important; }
#modelPanel .models .modelInterestDots td { padding: 0 2px; font-size: 10px; }

/* Suggested itineraries: route name + its package title underneath */
#itineraryContent .modelCityData { padding-top: 0 !important; }
#itineraryContent .jsCityNames { display: block; padding-left: 0 !important; }
#itineraryContent .jsSugItineraryName {
    display: block;
    margin-top: 3px;
    padding-left: 0 !important;
    font-family: "DM Sans", -apple-system, "Segoe UI", sans-serif;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--xp-muted);
}
#itineraryContent .jsSugItineraryName br { display: none; }

/* ---------- nights: checkbox + label become pill buttons ---------- */
#modelPanel .models .chkDayDiv {
    width: auto !important;
    margin: 0;
    position: relative;
}
#modelPanel .models .chkDayDiv strong { font-weight: inherit; }
#modelPanel .models .chkDayDiv input.chkDay {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
#modelPanel .models .chkDayDiv label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 40px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--xp-line);
    border-radius: 999px;
    background: #fff;
    color: var(--xp-ink);
    font: 700 15px "DM Sans", -apple-system, "Segoe UI", sans-serif;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, transform .15s;
}
#modelPanel .models .chkDayDiv label:hover { border-color: var(--xp-ocean); }
#modelPanel .models .chkDayDiv label:active { transform: scale(.95); }
#modelPanel .models .chkDayDiv input.chkDay:checked + label {
    background: var(--xp-ocean);
    border-color: var(--xp-ocean);
    color: var(--xp-sand);
}
#modelPanel .models .chkDayDiv input.chkDay:focus-visible + label {
    outline: 3px solid var(--xp-sun);
    outline-offset: 2px;
}
#modelPanel .models .labelNight {
    margin: 0 0 0 4px;
    font: 500 14px "DM Sans", -apple-system, "Segoe UI", sans-serif;
    text-transform: lowercase;
    color: var(--xp-muted);
}

/* Destination already added to the trip */
#modelPanel .models .orangeSelected { border: 0 !important; background: none !important; }
#modelPanel .models li.modelCityDataLI:has(.orangeSelected) {
    border-color: var(--xp-terracotta);
    background: #FFF9F3;
}
#modelPanel .models .orangeSelected h4::after {
    content: "✓ In your trip";
    display: inline-block;
    margin-left: 10px;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--xp-terracotta-ink);
    color: #fff;
    font: 700 11px "DM Sans", -apple-system, "Segoe UI", sans-serif;
    vertical-align: middle;
}

/* ---------- package card that opens under a destination ---------- */
#modelPanel .models .sketchRadios { flex: 1 1 100%; margin-top: 6px; }
#modelPanel .models .modelSketchItem {
    margin: 8px 0 0;
    padding: 18px;
    border: 1px solid var(--xp-line);
    border-radius: 14px;
    background: #FBF8F2;
    transition: box-shadow .25s;
}
#modelPanel .models .modelSketchItem:hover,
#modelPanel .models .modelSketchItem.itemSelected {
    background: #FBF8F2;
    box-shadow: 0 8px 22px rgba(15, 61, 76, .08);
}
#modelPanel .models .modelSketchItem img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
}
#modelPanel .models .itemSketchTitle {
    font-family: "Fraunces", Georgia, serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--xp-ocean);
    padding-bottom: 6px !important;
}
#modelPanel .models .itemTimePeriod,
#modelPanel .models .itemSubtitle,
#modelPanel .models .itemNoNights {
    font-family: "DM Sans", -apple-system, "Segoe UI", sans-serif;
    font-size: 14px;
    color: var(--xp-muted);
}
#modelPanel .models .minPrice {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--xp-line);
    font: 700 14px "DM Sans", -apple-system, "Segoe UI", sans-serif;
    color: var(--xp-terracotta-ink);
}
#modelPanel .models .programTitleInModelBox h5 {
    margin: 0;
    display: inline-flex; /* keep the arrow next to the text, not on its own line */
    align-items: center;
    gap: 6px;
    font: 700 14px "DM Sans", -apple-system, "Segoe UI", sans-serif;
    color: var(--xp-ocean);
    cursor: pointer;
}
#modelPanel .models .programTitleInModelBox h5 .fa-chevron-down { flex: none; font-size: 11px; transition: transform .2s; }
#modelPanel .models .programTitleInModelBox h5:hover { color: var(--xp-terracotta-ink); }

/* ---------- buttons ---------- */
#modelPanel .addToTimeline.btn,
#modelPanel .nextSigleView.btn,
.addToTimelineRightSide.btn,
#modelNext.btn {
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--xp-terracotta-ink) !important;
    color: #fff !important;
    font: 700 14px "DM Sans", -apple-system, "Segoe UI", sans-serif !important;
    text-shadow: none !important;
    box-shadow: 0 6px 16px rgba(168, 67, 42, .25);
    transition: background .2s, box-shadow .2s, translate .2s var(--xp-ease);
}
#modelPanel .addToTimeline.btn { padding: 9px 16px; white-space: nowrap; }
#modelPanel .addToTimeline.btn a, .addToTimelineRightSide.btn a { color: #fff !important; text-decoration: none; }
#modelNext.btn { padding: 11px 26px; }
#modelPanel .addToTimeline.btn:hover, #modelNext.btn:hover, .addToTimelineRightSide.btn:hover {
    background: #8F3822 !important;
    translate: 0 -1px;
}
#modelNext.btn.disabled {
    background: #E9E3D8 !important;
    color: #8A8F93 !important;
    box-shadow: none;
    opacity: 1;
}

/* ---------- timeline bar ---------- */
#up-timeline .tl-info {
    border: 2px dashed #D6CCBA;
    border-radius: 12px;
    background: var(--xp-sand);
    color: var(--xp-muted);
    font-family: "DM Sans", -apple-system, "Segoe UI", sans-serif;
    font-weight: 500;
}
#timelineSketch li.cityTimeline {
    border-radius: 10px;
    background: var(--xp-ocean);
    color: var(--xp-sand);
    font-family: "DM Sans", -apple-system, "Segoe UI", sans-serif;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(15, 61, 76, .2);
}
#timelineSketch li.cityTimeline:nth-child(even) { background: var(--xp-terracotta-ink); }
#timelineSketch li.cityTimeline .close { color: var(--xp-sand); opacity: .85; text-shadow: none; }
/* trip chip: name on one line (full name on hover), room for the remove button, vertically centred */
#timelineSketch li.cityTimeline { display: inline-flex; align-items: center; padding: 0 24px 0 10px; text-align: left; }
#timelineSketch li.cityTimeline .tl-item-title { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#timelineSketch li.cityTimeline .close { top: 50%; right: 8px; margin: 0; transform: translateY(-50%); line-height: 1; }
#timelineSketch li.cityTimeline .close:hover { opacity: 1; }
#up-timeline { overflow-x: clip; }
#up-timeline .tl-timeaxis-tick-text { font-family: "DM Sans", -apple-system, "Segoe UI", sans-serif; color: var(--xp-muted); }

/* ---------- small screens ---------- */
@media (max-width: 767px) {
    #modelPanel .models li.modelCityDataLI { padding: 12px 14px; }
    #modelPanel .models .modelCityData { flex-basis: 100%; }
    #experiencesTitle .title-exp h4, #modelPanel .itinerary .title-exp h4 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    #modelPanel .models li.modelCityDataLI { animation: none; }
    #modelPanel .models li.modelCityDataLI, #modelPanel .models .chkDayDiv label,
    #modelPanel .addToTimeline.btn, #modelNext.btn { transition: none; }
}

/* "Added to trip" pop-up: centred on every screen (main.css put it 38% from the left, off-screen on phones) */
#gritter-notice-wrapper { left: 50% !important; right: auto !important; transform: translateX(-50%); max-width: calc(100vw - 32px); }

/* Top bar language and currency menus: same pill + card look as the Local Heroes page */
#navbar .select2-container--default .select2-selection--single {
    height: 34px; border: 1px solid #E4DCCD; border-radius: 999px; background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
#navbar .select2-container--default .select2-selection--single:hover,
#navbar .select2-container--default.select2-container--open .select2-selection--single {
    border-color: #0F3D4C; border-radius: 999px; box-shadow: 0 2px 10px rgba(15, 61, 76, .08);
}
#navbar .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 14px; padding-right: 30px; color: #0F3D4C;
    font: 500 13px/32px "DM Sans", -apple-system, "Segoe UI", sans-serif;
}
#navbar .select2-container--default .select2-selection--single .select2-selection__arrow { height: 32px; right: 10px; }
#navbar .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border: 0; width: 10px; height: 6px; margin: -3px 0 0 -5px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%230F3D4C' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center;
    transition: transform .2s;
}
#navbar .select2-container--open .select2-selection--single .select2-selection__arrow b { transform: rotate(180deg); }
#navbar .select2-selection--single:focus { outline: none; }
#navbar .select2-selection--single:focus-visible { outline: 2px solid #C4532F; outline-offset: 2px; }
#navbar-container { padding-left: 16px; }
#navbar-container > .pull-right { display: flex; align-items: center; gap: 8px; }
@media (max-width: 480px) {
    /* phones: the two menus share one row, inside the page margins */
    #navbar-container { padding-right: 16px; }
    #navbar-container > .pull-right { float: none !important; padding: 8px 0 !important; }
    #navbar-container > .pull-right > .select2-container { width: auto !important; min-width: 0; }
    #navbar-container > .pull-right > #ddCurrency + .select2-container { flex: 1 1 auto; }
    #navbar-container > .pull-right > #ddLanguage + .select2-container { flex: 0 0 124px; }
}
.select2-container--open .ip-topbar-dropdown.select2-dropdown,
.select2-container--open .ip-topbar-dropdown.select2-dropdown--below,
.select2-container--open .ip-topbar-dropdown.select2-dropdown--above {
    border: 1px solid #E4DCCD; border-radius: 14px; padding: 6px; overflow: hidden;
    box-shadow: 0 12px 32px rgba(15, 61, 76, .16);
    font-family: "DM Sans", -apple-system, "Segoe UI", sans-serif;
}
.select2-container--open .ip-topbar-dropdown.select2-dropdown--below { margin-top: 8px; }
.select2-container--open .ip-topbar-dropdown.select2-dropdown--above { margin-top: -8px; }
.ip-topbar-dropdown .select2-results__option {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 8px 12px; border-radius: 9px; font-size: 14px; color: #1D2A33;
}
.select2-container--default .ip-topbar-dropdown .select2-results__option--selected { background: transparent; color: #0F3D4C; font-weight: 700; }
.select2-container--default .ip-topbar-dropdown .select2-results__option--highlighted.select2-results__option--selectable { background: #F5EEE3; color: #1D2A33; }
.ip-topbar-dropdown .select2-results__option--selected::after {
    content: ""; flex: none; width: 14px; height: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23C4532F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}

/* Timeline stays in view while the visitor scrolls the packages (Christian, 14 Oct). Only position and look change. */
#up-timeline { position: sticky; top: var(--tl-sticky-top, 0px); z-index: 40; }
/* white card; the first shadow fills the 12px above the bar so nothing shows through when pinned */
/* the white card reaches 18px past the bar on every side (a spread shadow, so the timeline's own width and maths stay the same) */
#up-timeline { background: #fff; border-radius: 12px; box-shadow: 0 0 0 18px #fff, 0 0 0 19px #E4DCCD; transition: box-shadow .25s; }
#up-timeline.is-stuck { box-shadow: 0 0 0 18px #fff, 0 0 0 19px #E4DCCD, 0 22px 34px rgba(15, 61, 76, .18); }
@media (max-width: 767px) {
    #up-timeline { box-shadow: 0 0 0 12px #fff, 0 0 0 13px #E4DCCD; }
    #up-timeline.is-stuck { box-shadow: 0 0 0 12px #fff, 0 0 0 13px #E4DCCD, 0 18px 28px rgba(15, 61, 76, .18); }
}
#up-timeline .tl-info { border-color: #CFC3AC; color: var(--xp-ocean); font-weight: 600; }
#up-timeline .tl-timeaxis-tick-text { color: var(--xp-ocean); font-weight: 600; }
#up-timeline .tl-timeaxis-major .tl-timeaxis-tick:before { background: #B9AE99; }
#timelineSketch li.cityTimeline { box-shadow: 0 6px 16px rgba(15, 61, 76, .25); }
@media (prefers-reduced-motion: reduce) { #up-timeline { transition: none; } }
/* keep the frame clear of "Filter Packages" above and the rental car / Next buttons below */
#up-timeline { margin-top: 26px; margin-bottom: 30px; }
@media (max-width: 767px) { #up-timeline { margin-top: 18px; margin-bottom: 22px; } }
/* Next pinned under the timeline while scrolling (position set in timeline.js) */
#modelNext.btn.is-pinned { position: fixed; z-index: 41; float: none; box-shadow: 0 8px 22px rgba(15, 61, 76, .22); }
