/* ============================================================================
 * Property Search — Search Hero (SHX)
 * Single-bar Vacational search with eyebrow + 5 fields + orange CTA.
 * Tokens copied from SH_TOKENS in the design template (acec3779.js):
 *   surface #fff · cream #f0eee9 · sand #FAF7EF · ink #15161C · mute #6A6B73
 *   faint #A8A6A0 · line #ECE9E0 · orange #EE6B2D · orange2 #c8521f
 * ============================================================================ */

/* ----------------------------------------------------------------------------
 * Hero row background — keep the dark teal painted on the WPBakery row that
 * holds the homepage [property_search] shortcode. This is the one rule we
 * carry forward from the legacy CSS; the new card sits inside it.
 * ---------------------------------------------------------------------------- */
body .vc_row.vc_custom_1761823258588 {
    background-color: var(--porto-secondary-color) !important;
}

/* ============================================================================
 * Wrapper + eyebrow
 * ============================================================================ */
.shx-wrap {
    font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #15161C;
    box-sizing: border-box;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0;
}
.shx-wrap *, .shx-wrap *::before, .shx-wrap *::after { box-sizing: border-box; }

.shx-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);   /* light variant — hero sits on dark teal */
    margin-bottom: 14px;
}
.shx-eyebrow-ico {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

/* ============================================================================
 * Card / form layout (desktop ≥ 769px)
 * ============================================================================ */
.shx-form {
    background: #fff;
    border: 1px solid #ECE9E0;
    border-radius: 16px;
    box-shadow: 0 24px 56px -32px rgba(20, 22, 30, 0.18);
    padding: 10px;
    display: flex;
    align-items: stretch;
    gap: 0;
    position: relative;
    /* Tame stray inline-block whitespace from <label>/<button> defaults */
    line-height: 1.4;
}

.shx-field {
    flex: 0 1 auto;
    min-width: 0;
    padding: 14px 18px;
    border-right: 1px solid #ECE9E0;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
}

/* Per-field width assignment — Destination flexes, the rest are fixed. */
.shx-field--dest     { flex: 1 1 auto; min-width: 0; }
.shx-field--checkin,
.shx-field--checkout { flex: 0 0 168px; }
.shx-field--checkout { border-right: 1px solid #ECE9E0; }
.shx-field--guests   { flex: 0 0 172px; }
.shx-field--type     { flex: 0 0 168px; border-right: none; }

/* Date-card wrapper — anchors the Litepicker calendar via parentEl, same
 * pattern as the rentz-header search modal (.bpr-rform__date-card) and
 * the property reservation form. Both date cells sit side-by-side inside. */
.shx-date-card {
    flex: 0 0 336px;
    display: flex;
    align-items: stretch;
    position: relative;
    min-width: 0;
}

.shx-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #6A6B73;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.shx-req { color: #EE6B2D; }

/* ============================================================================
 * Destination input
 * ============================================================================ */
.shx-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.shx-ico {
    color: #A8A6A0;
    display: inline-flex;
    flex: 0 0 auto;
}
.shx-input {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #15161C !important;
    width: 100%;
    padding: 0 !important;
    letter-spacing: -.005em;
    box-shadow: none !important;
    height: auto !important;
    line-height: 1.3 !important;
}
.shx-input::placeholder {
    color: #A8A6A0;
    font-weight: 500;
    opacity: 1;
}

/* ============================================================================
 * Date cells (Litepicker-driven)
 * ============================================================================ */
.shx-date-cell {
    appearance: none;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: auto;
}
.shx-date-cell:hover,
.shx-date-cell:focus { background: transparent !important; }

.shx-date-value {
    font-size: 15px;
    font-weight: 600;
    color: #A8A6A0;
    line-height: 1.2;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.shx-date-value.is-filled { color: #15161C; }
.shx-date-day {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #6A6B73;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.shx-cell-ico {
    color: #A8A6A0;
    flex: 0 0 auto;
    margin-left: auto;
}

/* Calendar is portaled into .shx-date-card (parentEl), exactly like the
 * rentz-header search modal does with .bpr-rform__date-card. The picker
 * absolute-positions itself just below the date card and stretches the
 * full width of it (check-in left edge → check-out right edge). */
.shx-date-card > .litepicker,
.shx-date-card .litepicker {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    margin: 0 !important;
    z-index: 50;
    pointer-events: auto;
}
.shx-date-card .litepicker .container__main,
.shx-date-card .litepicker .container__months,
.shx-date-card .litepicker .container__months .month-item {
    width: 100% !important;
    box-sizing: border-box;
}
.shx-date-card .litepicker .container__main {
    border-radius: 14px;
    box-shadow: 0 24px 56px -16px rgba(20, 22, 30, 0.22);
    border: 1px solid #ECE9E0;
    padding: 8px;
}
.shx-date-card .litepicker .container__days {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
}
.shx-date-card .litepicker .container__days > .day-item,
.shx-date-card .litepicker .container__days > div {
    width: auto !important;
}
.shx-range {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* ============================================================================
 * Guests trigger + popover
 * ============================================================================ */
.shx-guests-trigger {
    appearance: none;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: auto;
}
.shx-guests-trigger:hover,
.shx-guests-trigger:focus { background: transparent !important; }

.shx-guests-value {
    font-size: 15px;
    font-weight: 600;
    color: #15161C;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shx-guests-pop {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: #fff;
    border: 1px solid #ECE9E0;
    border-radius: 14px;
    box-shadow: 0 24px 56px -16px rgba(20, 22, 30, 0.22);
    z-index: 30;
    padding: 4px 0;
}
.shx-guests-pop[hidden] { display: none; }

.shx-guests-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
}
.shx-guests-meta { min-width: 0; }
.shx-guests-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #15161C;
    letter-spacing: -.005em;
    line-height: 1.25;
}
.shx-guests-sub {
    font-size: 12.5px;
    color: #6A6B73;
    margin-top: 1px;
}
.shx-guests-sep {
    height: 1px;
    background: #ECE9E0;
    margin: 0 18px;
}
.shx-guests-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px 14px;
    border-top: 1px solid #ECE9E0;
    margin-top: 4px;
}
.shx-guests-reset {
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    color: #6A6B73 !important;
    font-family: inherit;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: underline;
    padding: 0 !important;
    box-shadow: none !important;
    height: auto !important;
}
.shx-guests-reset:hover { color: #15161C !important; }
.shx-guests-done {
    background: #15161C !important;
    border: none !important;
    cursor: pointer;
    color: #fff !important;
    font-family: inherit;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    padding: 9px 18px !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    line-height: 1.2 !important;
    height: auto !important;
}
.shx-guests-done:hover { background: #000 !important; }

/* Stepper (+/-) */
.shx-stepper {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}
.shx-step-btn {
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50% !important;
    border: 1px solid #d6d2c4 !important;
    background: #fff !important;
    cursor: pointer;
    color: #15161C !important;
    font-family: inherit;
    font-size: 18px !important;
    font-weight: 600;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    box-shadow: none !important;
}
.shx-step-btn:hover:not(:disabled) {
    border-color: #15161C !important;
}
.shx-step-btn:disabled {
    cursor: not-allowed;
    color: #A8A6A0 !important;
    border-color: #ECE9E0 !important;
}
.shx-step-val {
    min-width: 18px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    color: #15161C;
    line-height: 1;
}

/* ============================================================================
 * Property type — custom dropdown (matches Guests popover pattern)
 * ============================================================================ */
.shx-field--type { position: relative; }

.shx-type-trigger {
    appearance: none;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: auto;
}
.shx-type-trigger:hover,
.shx-type-trigger:focus { background: transparent !important; }

.shx-type-value {
    font-size: 15px;
    font-weight: 600;
    color: #15161C;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shx-type-pop {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ECE9E0;
    border-radius: 14px;
    box-shadow: 0 24px 56px -16px rgba(20, 22, 30, 0.22);
    z-index: 30;
    padding: 6px;
    max-height: 320px;
    overflow-y: auto;
}
.shx-type-pop[hidden] { display: none; }

.shx-type-opt {
    appearance: none;
    background: transparent !important;
    border: none !important;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: 14.5px !important;
    font-weight: 500 !important;
    color: #15161C !important;
    padding: 10px 14px !important;
    margin: 0 !important;
    border-radius: 8px;
    box-shadow: none !important;
    line-height: 1.3 !important;
    display: block;
    transition: background 120ms ease;
}
.shx-type-opt:hover,
.shx-type-opt:focus {
    background: #FFF8F2 !important;
    color: #15161C !important;
}
.shx-type-opt.is-selected {
    background: rgba(238, 107, 45, 0.10) !important;
    color: #EE6B2D !important;
    font-weight: 700 !important;
}

/* ============================================================================
 * Submit CTA (orange)
 * ============================================================================ */
.shx-cta-cell {
    display: flex;
    align-items: center;
    padding-left: 10px;
    flex: 0 0 auto;
}
/* Flat brand orange — identical to the rentz-header search modal submit
 * (no gradient, no inset highlight). Single canonical site CTA color. */
.shx-submit {
    appearance: none;
    border: 0 !important;
    cursor: pointer;
    background: #EE6B2D !important;
    color: #fff !important;
    font-family: "DM Sans", inherit;
    font-weight: 700 !important;
    font-size: 15px !important;
    letter-spacing: -.01em;
    height: 56px !important;
    padding: 0 28px !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center;
    gap: 9px;
    box-shadow: 0 6px 16px -8px rgba(238, 107, 45, 0.45) !important;
    line-height: 1 !important;
    text-transform: none !important;
    transition: background 140ms ease, transform 80ms ease, box-shadow 140ms ease;
}
.shx-submit:hover {
    background: #C04C12 !important;
    color: #fff !important;
    box-shadow: 0 10px 24px -10px rgba(192, 76, 18, 0.55) !important;
}
.shx-submit:active { transform: translateY(1px); }
.shx-submit:disabled {
    background: #ECE9E0 !important;
    color: #A8A6A0 !important;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none;
}

/* ============================================================================
 * AJAX suggest dropdown (Destination) — mirrors the .rh-search-suggest pattern
 * from rentz-header, namespaced under .shx-*.
 * ============================================================================ */
.shx-suggest {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: auto;
    min-width: 440px;
    max-width: 540px;
    max-height: 360px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ECE9E0;
    border-radius: 14px;
    box-shadow: 0 24px 56px -16px rgba(20, 22, 30, 0.22);
    z-index: 25;
    padding: 6px;
}
.shx-suggest[hidden] { display: none; }

.shx-suggest-group + .shx-suggest-group { border-top: 1px solid #ECE9E0; margin-top: 4px; padding-top: 4px; }
.shx-suggest-group-title {
    padding: 8px 12px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #A8A6A0;
}
.shx-sug-item {
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    background: transparent;
    transition: background-color .12s ease;
}
.shx-sug-item:hover,
.shx-sug-item.is-focus { background: #FFF8F2; }
.shx-sug-title {
    font-size: 14px;
    font-weight: 700;
    color: #15161C;
    letter-spacing: -.005em;
    line-height: 1.25;
}
.shx-sug-trail {
    font-size: 12px;
    color: #6A6B73;
    margin-top: 2px;
    line-height: 1.3;
}

/* ============================================================================
 * Litepicker theming — identical to the rentz-header search modal:
 *   tooltip ink-black, hover = cream wash + orange ring, today = orange ring,
 *   selected endpoints = solid brand orange, in-range = soft orange tint.
 * ============================================================================ */

/* Tooltip ("X nights") — black pill, white text. */
.shx-date-card .litepicker .container__tooltip {
    background-color: #15161C !important;
    color: #fff !important;
    box-shadow: 0 6px 16px -4px rgba(0, 0, 0, 0.32) !important;
}
.shx-date-card .litepicker .container__tooltip:before { border-top-color: rgba(0, 0, 0, 0.2) !important; }
.shx-date-card .litepicker .container__tooltip:after  { border-top-color: #15161C !important; }

/* Hover on an available day — cream wash with orange ring. */
.shx-date-card .litepicker .container__days .day-item:hover:not(.is-locked):not(.is-start-date):not(.is-end-date):not(.is-in-range) {
    background: #FFF0E7 !important;
    color: #15161C !important;
    box-shadow: inset 0 0 0 1px #EE6B2D !important;
    border-radius: 8px;
}

/* Today — orange ring only. */
.shx-date-card .litepicker .container__days .day-item.is-today {
    color: #15161C !important;
    box-shadow: inset 0 0 0 1px #EE6B2D !important;
    border-radius: 8px;
}

/* Selected endpoints — solid brand orange. */
.shx-date-card .litepicker .container__days .day-item.is-start-date,
.shx-date-card .litepicker .container__days .day-item.is-end-date,
.shx-date-card .litepicker .container__days .day-item.is-start-date:hover,
.shx-date-card .litepicker .container__days .day-item.is-end-date:hover {
    background: #EE6B2D !important;
    color: #fff !important;
    border-radius: 8px !important;
}

/* In-range days — soft orange tint, ink text. */
.shx-date-card .litepicker .container__days .day-item.is-in-range,
.shx-date-card .litepicker .container__days .day-item.is-in-range:hover {
    background: rgba(238, 107, 45, 0.16) !important;
    color: #15161C !important;
}

/* ============================================================================
 * Mobile — stacked layout (matches SearchHeroMobile from the template)
 * Shared hairlines, no gutters between cells. CTA goes full-width below.
 * ============================================================================ */
@media (max-width: 768px) {
    .shx-wrap {
        padding: 0;
    }
    .shx-eyebrow { margin-bottom: 12px; }

    .shx-form {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        border-radius: 14px;
        box-shadow: 0 16px 36px -24px rgba(20, 22, 30, 0.25);
        overflow: visible;
    }

    /* Destination — full-width row on top */
    .shx-field--dest {
        flex: 1 1 auto;
        border-right: none;
        border-bottom: 1px solid #ECE9E0;
        padding: 12px 16px;
    }

    /* Date card spans the full width on its own row, with the two cells
     * inside split 50/50. */
    .shx-date-card {
        flex: 1 1 100%;
        width: 100%;
        border-bottom: 1px solid #ECE9E0;
    }
    .shx-field--checkin {
        flex: 1 1 50%;
        border-right: 1px solid #ECE9E0;
        border-bottom: none;
        padding: 12px 16px;
    }
    .shx-field--checkout {
        flex: 1 1 50%;
        border-right: none;
        border-bottom: none;
        padding: 12px 16px;
    }

    /* Guests / Type — each on its own full-width row */
    .shx-field--guests {
        flex: 1 1 100%;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ECE9E0;
        padding: 12px 16px;
    }
    .shx-field--type {
        flex: 1 1 100%;
        width: 100%;
        border-right: none;
        border-bottom: none;
        padding: 12px 16px;
    }

    /* Layout the rows: dest spans full width, then the two 50/50 rows. */
    .shx-form > .shx-field--dest      { order: 1; width: 100%; }
    .shx-form > .shx-date-card        { order: 2; width: 100%; }
    .shx-form > .shx-field--guests    { order: 3; width: 100%; }
    .shx-form > .shx-field--type      { order: 4; width: 100%; }
    .shx-form > .shx-cta-cell         { order: 5; width: 100%; padding: 12px 16px 14px 16px; }

    /* CTA stretches full-width on mobile */
    .shx-cta-cell .shx-submit {
        width: 100%;
        height: 52px !important;
        justify-content: center;
        padding: 0 16px !important;
    }

    /* Wrap the row pair using flex-wrap on the form */
    .shx-form { flex-wrap: wrap; }

    /* Guests popover full-width below */
    .shx-guests-pop {
        left: 16px;
        right: 16px;
        width: auto;
    }

    /* Suggest dropdown full-width within the card on mobile */
    .shx-suggest {
        left: 8px;
        right: 8px;
        min-width: 0;
        max-width: none;
        width: auto;
    }
}

/* ============================================================================
 * Reset stray theme styles that might bleed in (Porto often skins buttons
 * site-wide). Keep our search bar visually isolated.
 * ============================================================================ */
.shx-wrap button,
.shx-wrap input,
.shx-wrap select {
    font-family: inherit;
}
.shx-wrap button:focus { outline: none; }
.shx-wrap button:focus-visible { outline: 2px solid rgba(238, 107, 45, 0.45); outline-offset: 2px; }
