/**
 * Search panel for [lmhp_search].
 *
 * One connected row of segments on desktop, stacking to full-width fields on
 * mobile. Rules set their own box-sizing and font-family so a host theme's form
 * styling cannot bleed in and flatten the layout.
 */

.lmhp-search,
.lmhp-search *,
.lmhp-search *::before,
.lmhp-search *::after {
    box-sizing: border-box;
}

.lmhp-search {
    max-width: 1140px;
    margin: 0 auto 26px;
    padding: 20px;
    border: 1px solid var(--lmhp-border, #e6edf5);
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: var(--lmhp-glow, 0 20px 50px rgba(15, 23, 42, 0.08));
    font-family: inherit;
    color: var(--lmhp-ink, #0f172a);
}

.lmhp-search__title {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--lmhp-ink, #0f172a);
}

/* --- The connected search row -------------------------------------------- */

.lmhp-search__bar {
    display: grid;
    /* The submit column needs a floor: on an "auto" track the button was squeezed
       narrower than its own label and spilled out of the rounded container. */
    grid-template-columns: 1.6fr 1fr 1fr 1fr minmax(150px, max-content);
    align-items: stretch;
    gap: 0;
    padding: 6px;
    border: 1px solid #dbe5f0;
    border-radius: 999px;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.lmhp-search__field {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    margin: 0;
    min-width: 0;
    padding: 8px 18px;
    border-right: 1px solid #eaf0f7;
    border-radius: 999px;
    transition: background 140ms ease;
}

.lmhp-search__bar .lmhp-search__field:hover {
    background: #f6faff;
}

.lmhp-search__bar .lmhp-search__field:last-of-type {
    border-right: 0;
}

.lmhp-search__field label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--lmhp-soft, #475569);
    line-height: 1.2;
}

.lmhp-search__bar .lmhp-search__field input,
.lmhp-search__bar .lmhp-search__field select {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--lmhp-ink, #0f172a);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    appearance: none;
    -webkit-appearance: none;
}

.lmhp-search__bar .lmhp-search__field input:focus,
.lmhp-search__bar .lmhp-search__field select:focus {
    outline: none;
}

.lmhp-search__bar .lmhp-search__field:focus-within {
    background: #f2f8ff;
    box-shadow: inset 0 0 0 2px rgba(var(--lmhp-accent-rgb, 17, 130, 255), 0.35);
}

.lmhp-search__field input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.lmhp-search__field--submit {
    padding: 0;
    border-right: 0;
}

/* Themes commonly style every `button` with their own colours, and hello-elementor
   wins on weight here — the button rendered transparent with a hairline border.
   Specificity plus !important on the paint properties keeps it a solid CTA. */
.lmhp-search .lmhp-search__submit,
.lmhp-search button.lmhp-search__submit {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    min-height: 54px;
    padding: 0 26px !important;
    border: 0 !important;
    border-radius: 999px !important;
    /* Solid, not a gradient: the two brand colours are independent settings and
       blending them produced a muddy pink-to-green wash. */
    background: var(--lmhp-accent, #1182ff) !important;
    background-image: none !important;
    color: var(--lmhp-on-accent, #fff) !important;
    font-family: inherit;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    text-transform: none !important;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(var(--lmhp-accent-rgb, 17, 130, 255), 0.28) !important;
    transition: filter 140ms ease, transform 140ms ease;
}

.lmhp-search .lmhp-search__submit:hover,
.lmhp-search button.lmhp-search__submit:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    background: var(--lmhp-accent, #1182ff) !important;
    color: var(--lmhp-on-accent, #fff) !important;
}

.lmhp-search .lmhp-search__submit:active {
    transform: translateY(0);
}

.lmhp-search__submit-icon {
    flex: 0 0 auto;
}

/* --- More filters -------------------------------------------------------- */

.lmhp-search__more {
    margin-top: 14px;
}

.lmhp-search__more > summary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border: 1px solid #dbe5f0;
    border-radius: 999px;
    background: #fff;
    color: var(--lmhp-accent, #1182ff);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    transition: border-color 140ms ease, background 140ms ease;
}

.lmhp-search__more > summary:hover {
    border-color: var(--lmhp-accent, #1182ff);
    background: #f5faff;
}

.lmhp-search__more > summary::-webkit-details-marker {
    display: none;
}

.lmhp-search__more > summary::marker {
    content: "";
}

.lmhp-search__more > summary::after {
    content: "\25BE";
    font-size: 11px;
    transition: transform 140ms ease;
}

.lmhp-search__more[open] > summary::after {
    transform: rotate(180deg);
}

.lmhp-search__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

/* Fields outside the connected bar are ordinary boxed inputs. */
.lmhp-search__grid .lmhp-search__field,
.lmhp-search__party .lmhp-search__field {
    padding: 0;
    border-right: 0;
    border-radius: 0;
    gap: 6px;
}

.lmhp-search__grid .lmhp-search__field:hover,
.lmhp-search__party .lmhp-search__field:hover {
    background: transparent;
}

.lmhp-search__grid input,
.lmhp-search__grid select,
.lmhp-search__party input,
.lmhp-search__party select {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid #dbe5f0;
    border-radius: 14px;
    background: #fff;
    color: var(--lmhp-ink, #0f172a);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
}

.lmhp-search__grid input:focus,
.lmhp-search__grid select:focus,
.lmhp-search__party input:focus,
.lmhp-search__party select:focus {
    outline: none;
    border-color: var(--lmhp-accent, #1182ff);
    box-shadow: 0 0 0 3px rgba(var(--lmhp-accent-rgb, 17, 130, 255), 0.15);
}

.lmhp-search__field--check {
    justify-content: flex-end;
    padding-bottom: 11px;
}

.lmhp-search__field--check label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--lmhp-ink, #0f172a);
    cursor: pointer;
}

.lmhp-search__field--check input {
    width: 18px;
    height: 18px;
    min-height: 0;
    padding: 0;
    accent-color: var(--lmhp-accent, #1182ff);
}

/* --- Trip details (carried to the enquiry, not filters) ------------------- */

.lmhp-search__party {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #e2ecf7;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.lmhp-search__party-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--lmhp-soft, #475569);
}

.lmhp-search__party-note::before {
    content: "\2708";
    font-size: 15px;
    color: var(--lmhp-accent, #1182ff);
}

/* --- Active filters ------------------------------------------------------ */

.lmhp-search__chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--lmhp-border, #e6edf5);
}

.lmhp-search__chips-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lmhp-soft, #475569);
}

.lmhp-search__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px 7px 14px;
    border: 1px solid #dbe5f0;
    border-radius: 999px;
    background: #fff;
    color: var(--lmhp-ink, #0f172a);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.lmhp-search__chip:hover {
    border-color: var(--lmhp-accent, #1182ff);
    box-shadow: 0 4px 12px rgba(var(--lmhp-accent-rgb, 17, 130, 255), 0.14);
}

.lmhp-search__chip-x {
    display: inline-grid;
    place-items: center;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #eef4fb;
    color: var(--lmhp-soft, #475569);
    font-size: 13px;
    line-height: 1;
}

.lmhp-search__chip:hover .lmhp-search__chip-x {
    background: var(--lmhp-accent, #1182ff);
    color: #fff;
}

.lmhp-search__clear {
    margin-left: 2px;
    font-size: 13px;
    font-weight: 700;
    color: var(--lmhp-accent, #1182ff);
    text-decoration: none;
}

.lmhp-search__clear:hover {
    text-decoration: underline;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 1000px) {
    .lmhp-search__bar {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        padding: 10px;
        border-radius: 20px;
    }

    .lmhp-search__bar .lmhp-search__field {
        padding: 10px 14px;
        border-right: 0;
        border-radius: 14px;
        background: #f8fbff;
    }

    .lmhp-search__field--grow,
    .lmhp-search__field--submit {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .lmhp-search {
        padding: 14px;
        border-radius: 18px;
    }

    .lmhp-search__bar {
        grid-template-columns: 1fr;
    }
}

/* iOS Safari zooms the whole page in when a focused field's text is under 16px,
   and it does not zoom back out. Every control the search panel owns clears that
   threshold on touch, so tapping a filter no longer leaves the layout enlarged
   and scrolled sideways. */
@media (max-width: 782px) {
    .lmhp-search__bar .lmhp-search__field input,
    .lmhp-search__bar .lmhp-search__field select,
    .lmhp-search__grid input,
    .lmhp-search__grid select,
    .lmhp-search__party input,
    .lmhp-search__party select {
        font-size: 16px;
    }

    /* Comfortably past the 44px minimum touch target. Checkboxes keep their own
       small square — the label beside them is the real target. */
    .lmhp-search__grid input:not([type='checkbox']),
    .lmhp-search__grid select,
    .lmhp-search__party input:not([type='checkbox']),
    .lmhp-search__party select {
        min-height: 48px;
    }

    .lmhp-search__field--check label {
        min-height: 44px;
    }

    .lmhp-search__more > summary {
        min-height: 44px;
        padding: 10px 18px;
    }

    .lmhp-search__chip {
        min-height: 40px;
    }
}
