/*
 * Excursion Booking — Search Bar CSS (rebuilt from scratch)
 * ─────────────────────────────────────────────────────────
 * Design tokens via CSS custom properties on .ebsb root.
 * Overridden per-instance by Elementor widget inline styles.
 * NO overflow:hidden near selects. Native dropdowns work.
 */

/* ── Default tokens ─────────────────────────────────────── */
.ebsb {
    --ebsb-bg:          #ffffff;
    --ebsb-radius:      12px;
    --ebsb-padding:     6px;
    --ebsb-shadow:      0 4px 24px rgba(0,0,0,.12);
    --ebsb-border:      1px solid rgba(0,0,0,.08);

    --ebsb-field-hover: rgba(0,0,0,.035);
    --ebsb-divider:     rgba(0,0,0,.09);

    --ebsb-label-size:  10px;
    --ebsb-label-color: #1a1a2e;
    --ebsb-label-weight:700;

    --ebsb-input-size:  14px;
    --ebsb-input-color: #1a1a2e;
    --ebsb-ph-color:    #9ca3af;

    --ebsb-icon-color:  #6b7280;
    --ebsb-icon-size:   17px;

    --ebsb-btn-bg:      #e8441a;
    --ebsb-btn-hover:   #c73510;
    --ebsb-btn-color:   #ffffff;
    --ebsb-btn-radius:  999px;
    --ebsb-btn-size:    14px;
    --ebsb-btn-weight:  600;

    --ebsb-min-height:  66px;
}

/* ── Wrapper ─────────────────────────────────────────────── */
.ebsb {
    display: block;
    background: var(--ebsb-bg);
    border-radius: var(--ebsb-radius);
    border: var(--ebsb-border);
    box-shadow: var(--ebsb-shadow);
    padding: var(--ebsb-padding);
    box-sizing: border-box;
    width: 100%;
}

/* ── Inner flex row ──────────────────────────────────────── */
.ebsb__form {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0;
    min-height: var(--ebsb-min-height);
    /* NO overflow:hidden — breaks native select dropdowns */
}

/* ── Individual field ────────────────────────────────────── */
.ebsb__field {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
    padding: 10px 16px 10px 44px;
    background: transparent;
    transition: background .15s;
    border-right: 1px solid var(--ebsb-divider);
    box-sizing: border-box;
}
.ebsb__field:last-of-type { border-right: none; }
.ebsb__field:hover { background: var(--ebsb-field-hover); }
.ebsb__field--keyword { flex: 1.3; }
.ebsb__field:focus-within {
    background: rgba(0,0,0,.03);
    outline: 2px solid var(--ebsb-btn-bg);
    outline-offset: -2px;
    border-radius: 8px;
    z-index: 1;
}

/* ── Icon ────────────────────────────────────────────────── */
.ebsb__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ebsb-icon-color);
    pointer-events: none;
    display: flex;
    align-items: center;
}
.ebsb__icon svg {
    width: var(--ebsb-icon-size);
    height: var(--ebsb-icon-size);
}

/* ── Label ───────────────────────────────────────────────── */
.ebsb__label {
    display: block;
    font-size: var(--ebsb-label-size);
    font-weight: var(--ebsb-label-weight);
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ebsb-label-color);
    line-height: 1;
    margin-bottom: 5px;
    pointer-events: none;
    white-space: nowrap;
}

/* ── Text input ──────────────────────────────────────────── */
.ebsb__input {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    font-size: var(--ebsb-input-size);
    font-weight: 500;
    color: var(--ebsb-input-color);
    font-family: inherit;
    line-height: 1.3;
    cursor: text;
}
.ebsb__input::placeholder { color: var(--ebsb-ph-color); font-weight: 400; }
.ebsb__input:focus { outline: none; box-shadow: none; }

/* ── Select ──────────────────────────────────────────────── */
/*
 * CRITICAL: Do NOT set appearance:none or any overlay on the select.
 * The native select must receive mouse events unobstructed.
 * We only style colour/font — the OS handles rendering.
 */
.ebsb__select {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    font-size: var(--ebsb-input-size);
    font-weight: 500;
    color: var(--ebsb-input-color);
    font-family: inherit;
    line-height: 1.3;
    cursor: pointer;
    /* NO appearance:none — keeps native arrow and native click-to-open */
}
.ebsb__select:focus { outline: none; }
.ebsb__select.ebsb--ph { color: var(--ebsb-ph-color); font-weight: 400; }

/* ── Date (text input driven by flatpickr) ───────────────── */
.ebsb__date { cursor: pointer; }

/* ── Button wrap ─────────────────────────────────────────── */
.ebsb__btn-wrap {
    display: flex;
    align-items: center;
    padding: 6px;
    flex-shrink: 0;
}

/* ── Button ──────────────────────────────────────────────── */
.ebsb__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 22px;
    width: 100%;
    height: calc(var(--ebsb-min-height) - 12px);
    min-height: 44px;
    border: none;
    border-radius: var(--ebsb-btn-radius);
    background: var(--ebsb-btn-bg);
    color: var(--ebsb-btn-color);
    font-size: var(--ebsb-btn-size);
    font-weight: var(--ebsb-btn-weight);
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background .18s;
    letter-spacing: .01em;
}
.ebsb__btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.ebsb__btn:hover { background: var(--ebsb-btn-hover); }
.ebsb__btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── Clear all link ──────────────────────────────────────── */
.ebsb__clear-all {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--ebsb-ph-color);
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.ebsb__clear-all:hover { color: var(--ebsb-btn-bg); }

/* ── Keyword × clear ─────────────────────────────────────── */
.ebsb__x {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: rgba(0,0,0,.08);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: background .15s;
    color: #555;
}
.ebsb__x:hover { background: rgba(0,0,0,.18); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 860px) {
    .ebsb__form { flex-wrap: wrap; min-height: auto; }
    .ebsb__field {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--ebsb-divider);
        min-height: 52px;
    }
    .ebsb__field:last-of-type { border-bottom: none; }
    .ebsb__btn-wrap { width: 100%; }
    .ebsb__btn { width: 100%; min-height: 48px; }
}

/* ── Flatpickr calendar skin ─────────────────────────────── */
.flatpickr-calendar {
    font-family: inherit;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
    border: 1px solid rgba(0,0,0,.08);
}
.flatpickr-months {
    background: var(--ebsb-btn-bg, #e8441a);
    border-radius: 12px 12px 0 0;
    padding: 4px 0;
}
.flatpickr-month,
.flatpickr-prev-month svg path,
.flatpickr-next-month svg path { fill: #fff; }
.flatpickr-current-month,
.flatpickr-current-month .numInputWrapper input { color: #fff; }
.flatpickr-weekday { color: rgba(0,0,0,.45); font-weight: 600; font-size: 11px; }
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--ebsb-btn-bg, #e8441a);
    border-color: var(--ebsb-btn-bg, #e8441a);
    color: #fff;
}
.flatpickr-day:hover:not(.selected) { background: rgba(0,0,0,.06); }
