/* ==========================================================================
   theme.css — Modern UI refresh (blue primary + orange accent)
   Layered on top of existing styles. Remove the <link> in _Layout to revert.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --js-blue: #0a66c2;
    --js-blue-dark: #074a8c;
    --js-blue-soft: #eaf3fb;
    --js-orange: #ff8a00;
    --js-orange-dark: #e67a00;
    --js-ink: #1c2733;
    --js-muted: #5b6b7a;
    --js-radius: 14px;
    --js-shadow: 0 10px 30px rgba(16, 42, 67, .10);
}

/* ---------- Base typography ---------- */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    color: var(--js-ink);
}
h1, h2, h3, h4, h5, .navbar-brand, .card-title {
    font-family: 'Poppins', system-ui, sans-serif !important;
    letter-spacing: -.01em;
}

/* ---------- Navbar (keep original orange header — only polish links) ---------- */
.navbar-nav .nav-link {
    font-weight: 500;
    border-radius: 8px;
    transition: background .2s, transform .2s;
}
.navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, .15);
    transform: translateY(-1px);
}

/* ---------- Buttons ---------- */
.btn-warning {
    background: var(--js-orange) !important;
    border-color: var(--js-orange) !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(255, 138, 0, .30);
    transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-warning:hover {
    background: var(--js-orange-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(255, 138, 0, .40);
}
.btn-outline-warning {
    border-radius: 10px;
    font-weight: 600;
    border-color: var(--js-orange) !important;
    color: var(--js-orange-dark) !important;
}
.btn-outline-warning:hover {
    background: var(--js-orange) !important;
    color: #fff !important;
}

/* ---------- Hero carousel ---------- */
/* Darkening filter removed per request — images should show at full brightness, no tint. */
#heroCarousel .carousel-caption h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    text-shadow: 0 2px 16px rgba(0, 0, 0, .45);
}
#heroCarousel .carousel-caption p {
    font-size: 1.1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}

/* ---------- Search box ---------- */
.searchFormTitle {
    color: #fff;
    font-weight: 700;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .4);
}
form.searchForm {
    background: rgba(255, 255, 255, .96) !important;
    backdrop-filter: blur(6px);
    border: none !important;
    border-radius: var(--js-radius) !important;
    box-shadow: var(--js-shadow) !important;
    padding: 1.25rem 1.25rem !important;
}
form.searchForm .form-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
    color: var(--js-muted);
}
form.searchForm .form-control,
form.searchForm .form-select,
form.searchForm .dropdown-toggle {
    border-radius: 10px !important;
    border: 1px solid #dde5ec !important;
    padding: .55rem .8rem;
}
#searchBtn {
    border-radius: 10px;
    width: 100%;
}

/* ---- Modern search bar (search-bar-modern) overrides ---- */
.search-bar-modern #searchBtn,
.search-bar-modern .sb-search-btn {
    width: auto !important;
    border-radius: 0 12px 12px 0 !important;
    flex-shrink: 0 !important;
}
.search-bar-modern .sb-wrapper {
    background: rgba(255,255,255,0.97) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
}
.search-bar-modern .sb-fields {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
}
/* bootstrap-select buttons inside the search bar — transparent background */
.search-bar-modern .bootstrap-select > .dropdown-toggle,
.search-bar-modern .bootstrap-select > button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    font-size: .97em !important;
    font-weight: 500 !important;
    color: #111 !important;
}
.search-bar-modern .bootstrap-select {
    width: 100% !important;
}

/* ---- Sidebar (vertical-container) overrides — must come AFTER the row overrides above ---- */
.vertical-container .search-bar-modern .sb-wrapper {
    flex-direction: column !important;
}
.vertical-container .search-bar-modern .sb-fields {
    flex-direction: column !important;
    flex-wrap: wrap !important;
}
.vertical-container .search-bar-modern #searchBtn,
.vertical-container .search-bar-modern .sb-search-btn {
    width: 100% !important;
    border-radius: 0 0 12px 12px !important;
}

/* ---- Mobile: stack the search bar fields instead of the desktop row layout ---- */
@media (max-width: 767px) {
    .search-bar-modern .sb-wrapper {
        flex-direction: column !important;
    }
    .search-bar-modern .sb-fields {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        height: auto !important;
        width: 100% !important;
    }
    .search-bar-modern .sb-field,
    .search-bar-modern .sb-field-sm,
    .search-bar-modern .sb-field-guests {
        flex: unset !important;
        flex-shrink: 0 !important;
        width: 100% !important;
        min-width: unset !important;
        padding: 16px 20px !important;
    }
    .search-bar-modern .sb-label {
        font-size: .78em !important;
        margin-bottom: 6px !important;
    }
    .search-bar-modern .sb-select,
    .search-bar-modern .sb-input,
    .search-bar-modern .sb-date-btn,
    .search-bar-modern .sb-guests-btn,
    .search-bar-modern .bootstrap-select > .dropdown-toggle,
    .search-bar-modern .bootstrap-select > button {
        font-size: 1.05em !important;
    }
    .search-bar-modern .sb-divider {
        width: 100% !important;
        height: 1px !important;
        margin: 0 !important;
        background: #e5e5e5 !important;
    }
    .search-bar-modern #searchBtn,
    .search-bar-modern .sb-search-btn {
        width: 100% !important;
        border-radius: 0 0 16px 16px !important;
        padding: 18px !important;
        font-size: 1.1em !important;
    }
    /* Inset the tabs + card from the screen edges (like a floating card over the
       photo) instead of running edge-to-edge, and round its corners since it's no
       longer flush with the viewport. .jsh-hero__search also carries Bootstrap's
       .container class, which sets its own width:100% - that fights the
       left/right positioning below and pushes the card off-screen, so it has to
       be overridden here too. */
    .jsh-hero__search { left: 16px !important; right: 16px !important; width: auto !important; max-width: none !important; padding-left: 0 !important; padding-right: 0 !important; }
    .search-tabs { border-radius: 16px 16px 0 0 !important; overflow: hidden; }
    .sb-wrapper { border-radius: 0 0 16px 16px !important; }
}

/* ---------- Section headings ---------- */
section h2, section h3 {
    font-weight: 700;
}
section h3.text-center::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    background: var(--js-orange);
    border-radius: 4px;
    margin: .6rem auto 0;
}

/* ---------- Sunshine special cards ---------- */
.special-card {
    border: none !important;
    border-radius: var(--js-radius) !important;
    overflow: hidden;
    box-shadow: var(--js-shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}
.special-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(16, 42, 67, .18);
}
.special-card .card-img-top {
    transition: transform .5s ease;
}
.special-card:hover .card-img-top {
    transform: scale(1.06);
}
.price-badge {
    background: var(--js-orange);
    color: #fff;
    font-weight: 600;
    padding: .35rem .7rem;
    border-radius: 999px;
    position: absolute;
    top: 12px;
    right: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    font-size: .85rem;
}

/* ---------- Footer polish ---------- */
.footer-col-link { transition: color .15s; }
.footer-col-link:hover { color: var(--js-orange) !important; }

/* ---------- News & offers section bg ---------- */
.bg-gradient {
    background: var(--js-blue-soft) !important;
}

/* ==========================================================================
   GLOBAL POLISH — applies to all inner pages (About, Contact, Destination…)
   ========================================================================== */

/* Breathing room for page content */
main { min-height: 50vh; }
.page-content-area { padding-top: 2.5rem; padding-bottom: 3rem; }

/* Headings rhythm */
.page-content-area h1 { font-weight: 700; margin-bottom: .75rem; }
.page-content-area h2 { font-weight: 700; margin-top: 2rem; margin-bottom: 1rem; }
.page-content-area h3 { font-weight: 600; margin-top: 1.5rem; }

/* Content links (orange, not buttons/nav/footer) */
.page-content-area a:not(.btn) {
    color: var(--js-blue);
    text-decoration: none;
    font-weight: 500;
}
.page-content-area a:not(.btn):hover {
    color: var(--js-orange-dark);
    text-decoration: underline;
}

/* Generic cards everywhere */
.card {
    border: none;
    border-radius: var(--js-radius);
    box-shadow: 0 6px 20px rgba(16, 42, 67, .08);
}

/* Form controls everywhere */
.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid #dde5ec;
    padding: .55rem .8rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--js-orange);
    box-shadow: 0 0 0 .2rem rgba(255, 138, 0, .15);
}

/* Tables (e.g. admin-style data on inner pages) */
.table thead th {
    background: var(--js-blue-soft);
    color: var(--js-ink);
    border: none;
    font-weight: 600;
}

/* Primary buttons that aren't warning -> brand them */
.btn-primary {
    background: var(--js-blue) !important;
    border-color: var(--js-blue) !important;
    border-radius: 10px;
    font-weight: 600;
}
.btn-primary:hover { background: var(--js-blue-dark) !important; }

/* Banner area on offer/info pages */
.Sunshine-Special-banner {
    background: linear-gradient(120deg, var(--js-blue-soft), #fff);
    border-radius: var(--js-radius);
}

/* Hero captions readability (extra) */
/* Height intentionally not set here — .jsh-hero__img in site.css controls
   the fixed height (620/530/470px) across breakpoints; a vh-based override
   here previously fought that rule and caused viewport-height-dependent gaps. */

/* ==========================================================================
   SEARCH RESULTS — hotel cards + booking summary sidebar
   Shared across the package (flight+hotel) and hotels-only results pages so
   both flows read as one design system. See _BookingSummarySidebarPartial.cshtml,
   HotelResult.cshtml and HotelSearch.cshtml.
   ========================================================================== */

.hotel-result-card {
    border: 1px solid #f0e0c0;
    border-radius: var(--js-radius);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.hotel-result-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--js-shadow);
}

.price-tag {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--js-orange);
    line-height: 1.1;
}
.price-tag-unit {
    font-size: .75rem;
    font-weight: 700;
}

/* Compact flight summary shown above the hotel list on the package results page */
.flight-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff8f0;
    border: 1px solid #f0e0c0;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: .85rem;
    color: var(--js-ink);
}
.flight-chip strong { color: var(--js-ink); }

.booking-summary-card {
    border-radius: var(--js-radius);
}

/* #hotel_offer_summary (Options/RoomSelection steps) is an AJAX-swap target
   wrapping the sticky sidebar - as a plain block div it only takes the height
   of its own content, one level shorter than the actually-stretched col-lg-4
   next to it. That leaves the sticky card's real containing block (this div)
   exactly as tall as the card itself, so there's no room to stick - it just
   scrolls away immediately. Stretching this wrapper to the full column height
   restores the room position:sticky needs. */
#hotel_offer_summary {
    height: 100%;
}
.booking-summary-header {
    background: var(--js-orange);
}

.quote-ref-badge {
    background: rgba(255, 255, 255, .22);
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
    padding: 3px 9px;
    border-radius: 999px;
}

.session-countdown {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff3e0;
    color: var(--js-orange-dark);
    font-size: .78rem;
    font-weight: 500;
    padding: 8px 16px;
    border-bottom: 1px solid #f0e0c0;
}
.session-countdown.session-countdown-expired {
    background: #fdecea;
    color: #c0392b;
}

.summary-divider {
    border-color: #f0e0c0;
    margin: 16px 0;
}

.booking-summary-hint {
    background: #fff8f0;
    border: 1px solid #f0e0c0;
    font-size: .85rem;
    color: var(--js-muted);
}

.trust-badge {
    font-size: .78rem;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 5px 12px;
    font-weight: 500;
}

/* !important needed on colour/decoration: this is used as both a <button> and an
   <a>, and the global ".page-content-area a:not(.btn)" link-colour rule
   otherwise outranks a single class selector and turns the <a> variant blue. */
.change-flight-link {
    background: none;
    border: none;
    padding: 0;
    font-size: .82rem;
    color: var(--js-orange) !important;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
}
.change-flight-link:hover { color: var(--js-orange-dark) !important; text-decoration: underline !important; }

.flight-picker-list {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #f0e0c0;
    border-radius: 10px;
    padding: 6px;
}
.flight-picker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
}
.flight-picker-row:not(:last-child) { border-bottom: 1px dashed #f0e0c0; }
.flight-picker-row-selected { background: #fff3e0; }
.flight-picker-info { display: flex; align-items: center; gap: 8px; min-width: 0; }
.flight-picker-price { color: var(--js-orange); font-size: .9rem; }
.flight-picker-selected-tag { color: #166534; font-size: .78rem; font-weight: 600; }
.flight-picker-select-btn {
    background: var(--js-orange);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
}
.flight-picker-select-btn:hover { background: var(--js-orange-dark); }

/* Quick-edit search fields shown next to the hotel results (HotelResult.cshtml) */
.refine-search-card {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    background: #fff8f0;
    border: 1px solid #f0e0c0;
    border-radius: var(--js-radius);
    padding: 14px 18px;
}
.refine-search-field { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.refine-search-label { font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #8a7a63; }
.refine-search-select {
    border: 1px solid #e0d0b0;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: .88rem;
    background: #fff;
}
.refine-search-counter { display: flex; align-items: center; gap: 10px; font-size: .88rem; font-weight: 600; color: #333; }
.refine-search-counter-btn {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 2px solid #e0d0b0;
    background: #fff;
    font-weight: 700;
    color: #555;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.refine-search-counter-btn:hover { border-color: var(--js-orange); color: var(--js-orange); }

.continue-btn {
    background: var(--js-orange);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    letter-spacing: .02em;
}
.continue-btn:hover { background: var(--js-orange-dark); color: #fff; }

/* ==========================================================================
   FLIGHT BROWSER — filter sidebar + large flight cards
   (_FlightBrowserPanelPartial.cshtml, wwwroot/js/flightBrowserFilters.js)
   ========================================================================== */

.flight-browser {
    background: #fff;
    border: 1px solid #f0e0c0;
    border-radius: var(--js-radius);
    padding: 20px;
}

.flight-filter-sidebar {
    background: #fff8f0;
    border: 1px solid #f0e0c0;
    border-radius: 12px;
    padding: 16px;
    position: sticky;
    top: 16px;
}
.flight-filter-clear {
    background: none;
    border: none;
    padding: 0;
    color: var(--js-orange);
    font-weight: 600;
    font-size: .78rem;
    cursor: pointer;
}
.flight-filter-clear:hover { color: var(--js-orange-dark); text-decoration: underline; }

.flight-filter-group {
    padding: 12px 0;
    border-bottom: 1px solid #f0e0c0;
}
.flight-filter-group:last-of-type { border-bottom: none; }
.flight-filter-group-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--js-muted);
    margin-bottom: 8px;
}
.flight-filter-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: var(--js-ink);
    padding: 4px 0;
    cursor: pointer;
}
.flight-filter-check input[type="checkbox"] {
    accent-color: var(--js-orange);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}
.flight-filter-check-airline img {
    height: 16px;
    max-width: 40px;
    object-fit: contain;
}
.duration-slider { accent-color: var(--js-orange); width: 100%; }

.flight-card-list { display: flex; flex-direction: column; gap: 12px; }

.flight-result-card-lg {
    border: 1px solid #ece4d6;
    border-radius: 14px;
    background: #fff;
    transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
/* No transform here - it would create a CSS containing block for the .popup fare-info
   modal's position:fixed, confining it to this card instead of the full viewport. */
.flight-result-card-lg:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.flight-result-card-lg-selected { border-color: var(--js-orange); background: #fff8f0; box-shadow: 0 0 0 1px var(--js-orange) inset; }
.flight-result-card-lg-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    flex-wrap: wrap;
}
.flight-result-card-lg-legs { flex: 1 1 360px; display: flex; flex-direction: column; }
.flight-leg-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 8px 0; }
.flight-leg-row:first-child { padding-top: 0; }
.flight-leg-row:last-child { padding-bottom: 0; }
.flight-leg-row:not(:last-child) { border-bottom: 1px dashed #ece4d6; }
.flight-leg-direction {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #b09a72;
    width: 62px;
    flex-shrink: 0;
}
.flight-leg-row img { height: 20px; max-width: 60px; object-fit: contain; flex-shrink: 0; }
.flight-leg-airline-name { font-size: .78rem; color: var(--js-muted); white-space: nowrap; margin-right: 4px; }
.flight-leg-route { display: flex; flex-direction: column; min-width: 0; }
.flight-leg-time { font-weight: 700; font-size: .95rem; color: var(--js-ink); }
.flight-leg-airports { font-size: .8rem; color: var(--js-muted); }
.flight-leg-duration { margin-left: auto; font-size: .8rem; color: var(--js-muted); white-space: nowrap; }
.fare-chip {
    display: inline-block; padding: 2px 10px; border-radius: 999px;
    border: 1px solid; font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em; line-height: 1.6;
}
/* Chip + its plain-English summary + "Click for extra info" stacked vertically
   instead of crowding the horizontal flight-leg-row. */
.fare-chip-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.fare-chip-stack .fare-chip { align-self: flex-start; }
.flight-result-card-lg-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 575px) {
    /* .flight-leg-direction (fixed 62px), the airline logo, the nowrap airline
       name and the nowrap duration text can't shrink below their own content
       width, so on a 375px phone their combined min-width forced this row
       past its container - the container itself was clipped (no horizontal
       scrollbar, no visible error) so the fare chip/duration just got cut off
       silently. Trim the fixed-size pieces and let the duration wrap onto its
       own line instead of fighting for space on the main row. */
    .flight-leg-row { gap: 8px; flex-wrap: wrap; }
    .flight-leg-direction { width: 52px; font-size: .6rem; }
    .flight-leg-row img { max-width: 42px; }
    .flight-leg-airline-name { display: none; }
    .flight-leg-duration { flex-basis: 100%; margin-left: 62px; text-align: left; }
    .flight-result-card-lg-body { padding: 14px 16px; gap: 12px; }
}
