/* Homepage search bar (home/search.php, js/lus-home-search.js). Uses the tokens from lus-home.css. */
.lus-hero__search { max-width: 820px; margin: 0 auto; position: relative; z-index: 5; }
.lus-search { position: relative; text-align: left; color: var(--lus-ink); }
.lus-search *, .lus-search *::before, .lus-search *::after { box-sizing: border-box; }
.lus-search button { font-family: inherit; }
.lus-search__pill, .lus-search__head { display: none; }

/* ---- Bar ---- */
.lus-search__bar {
    position: relative; display: flex; align-items: center; gap: 0; padding: 6px;
    background: var(--lus-surface); border-radius: 999px; box-shadow: var(--lus-shadow-lift);
}
.lus-seg { flex: 1 1 0; min-width: 0; position: static; }
.lus-seg--where { flex: 1.5 1 0; }
.lus-seg + .lus-seg::before { content: ""; position: absolute; width: 1px; height: 28px; background: var(--lus-line); margin-top: 12px; margin-left: -1px; pointer-events: none; transition: opacity var(--lus-dur) var(--lus-ease); }
.lus-search.has-open .lus-seg + .lus-seg::before { opacity: 0; }
.lus-seg__field {
    display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 52px; padding: 0 18px;
    margin: 0; border: 0; border-radius: 999px; background: transparent; cursor: pointer; text-align: center;   /* margin: the place field is a <label>, and the theme gives labels a 5px bottom margin */
    font-size: 16px; font-weight: 500; color: var(--lus-muted);
    transition: background var(--lus-dur) var(--lus-ease), color var(--lus-dur) var(--lus-ease);
}
.lus-seg__field:hover { background: var(--lus-tint); }
.lus-seg.is-open > .lus-seg__field, .lus-seg.is-open > label.lus-seg__field { background: var(--lus-tint); box-shadow: inset 0 0 0 1px var(--lus-line); }
.lus-seg.has-value .lus-seg__val { color: var(--lus-ink); }
.lus-seg__val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lus-seg--where .lus-seg__field { justify-content: flex-start; cursor: text; }
.lus-seg__icon { display: grid; place-items: center; flex: none; color: var(--lus-muted); }
.lus-seg input {
    flex: 1; min-width: 0; height: 100%; border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important;
    padding: 0 !important; margin: 0 !important; font: inherit; font-size: 16px; font-weight: 500; color: var(--lus-ink); text-align: left;
}
.lus-seg input::placeholder { color: var(--lus-muted); opacity: 1; }
.lus-search__go {
    flex: none; height: 52px; padding: 0 30px; margin-left: 4px; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--lus-accent); color: #fff; font-size: 16px; font-weight: 600;
    transition: background var(--lus-dur) var(--lus-ease), transform var(--lus-dur) var(--lus-ease);
}
.lus-search__go:hover { background: var(--lus-accent-ink); transform: translateY(-1px); }
.lus-search :focus-visible { outline: 2px solid var(--lus-ink); outline-offset: 2px; }

/* ---- Popovers (desktop) ---- */
.lus-pop {
    position: absolute; top: calc(100% + 12px); z-index: 30; background: var(--lus-surface); color: var(--lus-ink);
    border-radius: var(--lus-radius); box-shadow: var(--lus-shadow-lift); padding: 12px;
    animation: lus-pop-in 180ms var(--lus-ease);
}
.lus-pop[hidden] { display: none; }
@keyframes lus-pop-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.lus-pop--where { left: 0; width: 400px; max-height: 380px; overflow-y: auto; }
.lus-pop--when { left: 50%; transform: translateX(-50%); padding: 20px; }
.lus-pop--who { right: 0; width: 360px; padding: 8px 22px; }
.lus-pop__label { margin: 8px 10px 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--lus-muted); }
.lus-pop__empty { margin: 14px 10px; color: var(--lus-muted); font-size: 15px; }
.lus-place { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px; border: 0; border-radius: 14px; background: transparent; cursor: pointer; text-align: left; color: var(--lus-ink); transition: background var(--lus-dur) var(--lus-ease); }
.lus-place:hover, .lus-place.is-active { background: var(--lus-tint); }
.lus-place__pin { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--lus-tint); color: var(--lus-muted); display: grid; place-items: center; }
.lus-place:hover .lus-place__pin, .lus-place.is-active .lus-place__pin { background: #fff; }
.lus-place__name { flex: 1; font-size: 15px; font-weight: 500; }
.lus-place__count { font-size: 13px; color: var(--lus-muted); }

/* Guests */
.lus-step { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; }
.lus-step + .lus-step { border-top: 1px solid var(--lus-line); }
.lus-step__text strong { display: block; font-size: 16px; font-weight: 600; }
.lus-step__text span { font-size: 13px; color: var(--lus-muted); }
.lus-step__ctrl { display: flex; align-items: center; gap: 4px; }
.lus-step__val { width: 32px; text-align: center; font-size: 16px; font-weight: 500; }
.lus-step__btn {
    width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; padding: 0;
    background: var(--lus-accent); color: #fff;
    transition: background var(--lus-dur) var(--lus-ease), transform var(--lus-dur) var(--lus-ease), opacity var(--lus-dur) var(--lus-ease);
}
.lus-step__btn:hover:not(:disabled) { background: var(--lus-accent-ink); transform: scale(1.06); }
.lus-step__btn:disabled { opacity: .35; cursor: default; }

/* Calendar (flatpickr) in our colours */
.lus-pop--when .flatpickr-calendar.inline { box-shadow: none; border: 0; width: auto; }
.lus-pop--when .flatpickr-months .flatpickr-month { height: 40px; }
.lus-pop--when .flatpickr-current-month { font-family: inherit; font-weight: 600; font-size: 17px; }
.lus-pop--when .flatpickr-weekday { font-weight: 500; color: var(--lus-muted); }
.lus-pop--when .flatpickr-day { border-radius: 999px; max-width: 42px; height: 42px; line-height: 42px; font-weight: 500; }
.lus-pop--when .flatpickr-day:hover { background: var(--lus-tint); border-color: transparent; }
.lus-pop--when .flatpickr-day.today:not(.selected) { border-color: var(--lus-line); }
.lus-pop--when .flatpickr-day.selected, .lus-pop--when .flatpickr-day.startRange, .lus-pop--when .flatpickr-day.endRange,
.lus-pop--when .flatpickr-day.selected:hover, .lus-pop--when .flatpickr-day.startRange:hover, .lus-pop--when .flatpickr-day.endRange:hover { background: var(--lus-ink); border-color: var(--lus-ink); color: #fff; }
.lus-pop--when .flatpickr-day.inRange { background: var(--lus-tint); border-color: var(--lus-tint); box-shadow: -5px 0 0 var(--lus-tint), 5px 0 0 var(--lus-tint); }
.lus-pop--when .flatpickr-day.flatpickr-disabled, .lus-pop--when .flatpickr-day.prevMonthDay, .lus-pop--when .flatpickr-day.nextMonthDay { color: #c9c2ba; }
.lus-pop--when .flatpickr-prev-month:hover svg, .lus-pop--when .flatpickr-next-month:hover svg { fill: var(--lus-accent); }

/* ---- Phone: pill -> full-screen sheet ---- */
@media (max-width: 766px) {
    .lus-hero__search { max-width: none; }
    .lus-search__pill {
        display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 54px; padding: 0 18px;
        border: 0; border-radius: 999px; background: var(--lus-accent); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
        box-shadow: var(--lus-shadow-lift);
    }
    .lus-search__form { display: none; }
    .lus-search.is-sheet .lus-search__form {
        display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 100000; background: var(--lus-bg);
        padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); overflow-y: auto; animation: lus-sheet-in 240ms var(--lus-ease);
    }
    @keyframes lus-sheet-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
    .lus-search__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
    .lus-search__title { font-family: inherit; font-size: 26px; }
    .lus-search__close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--lus-tint); color: var(--lus-ink); font-size: 24px; line-height: 1; cursor: pointer; }
    .lus-search__bar { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 0; background: transparent; box-shadow: none; border-radius: 0; }
    .lus-seg { flex: none; background: var(--lus-surface); border-radius: 18px; box-shadow: var(--lus-shadow); overflow: hidden; }
    .lus-seg + .lus-seg::before { display: none; }
    .lus-seg__field, .lus-seg--where .lus-seg__field { justify-content: flex-start; height: 60px; border-radius: 0; padding: 0 18px; }
    .lus-seg.is-open > .lus-seg__field, .lus-seg.is-open > label.lus-seg__field { background: transparent; box-shadow: none; }
    .lus-seg:not(.lus-seg--where) .lus-seg__field { justify-content: space-between; }
    .lus-pop { position: static; box-shadow: none; border-radius: 0; transform: none !important; width: auto !important; max-height: 50vh; padding: 4px 12px 14px; animation: none; border-top: 1px solid var(--lus-line); }
    .lus-pop--when { padding: 8px 4px 14px; max-height: none; }
    .lus-pop--who { padding: 4px 18px; }
    .lus-pop--when .flatpickr-calendar.inline { width: 100% !important; max-width: 100%; }
    .lus-pop--when .flatpickr-innerContainer, .lus-pop--when .flatpickr-rContainer, .lus-pop--when .dayContainer { width: 100% !important; min-width: 0 !important; max-width: 100% !important; }
    .lus-pop--when .flatpickr-day { max-width: none; flex-basis: 14.2857%; }
    .lus-search__go { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 1; width: auto; height: 56px; margin: 0; box-shadow: var(--lus-shadow-lift); }
}
html.lus-sheet-open, html.lus-sheet-open body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .lus-pop, .lus-search__form { animation: none !important; } }
.lus-search .lus-seg input:focus-visible { outline: 0; }

/* Calendar layout: fixed 44px cells, left-aligned rows, tidy header. */
@media (min-width: 767px) {
    .lus-pop--when .flatpickr-calendar.inline { width: auto !important; }
    .lus-pop--when .flatpickr-innerContainer, .lus-pop--when .flatpickr-rContainer { border: 0 !important; }
    .lus-pop--when .flatpickr-days, .lus-pop--when .dayContainer { width: 308px !important; min-width: 308px !important; max-width: 308px !important; border: 0 !important; justify-content: flex-start !important; }
    .lus-pop--when .flatpickr-day { flex: 0 0 44px !important; width: 44px; max-width: 44px; height: 44px; line-height: 44px; margin: 0; }
    .lus-pop--when .flatpickr-weekdaycontainer { width: 308px; }
    .lus-pop--when .flatpickr-weekday { flex: 0 0 44px; }
}
.lus-pop--when .flatpickr-current-month { display: flex; align-items: center; justify-content: center; gap: 6px; padding-top: 6px; }
.lus-pop--when .flatpickr-current-month .numInputWrapper { width: 5ch; margin-left: 0; }
.lus-pop--when .flatpickr-current-month input.cur-year, .lus-pop--when .flatpickr-current-month .flatpickr-monthDropdown-months { font-family: inherit; font-weight: 600; font-size: 17px; }
.lus-pop--when .flatpickr-rContainer { padding-top: 4px; }
@media (min-width: 767px) {
    .lus-pop--when .flatpickr-days { width: auto !important; min-width: 0 !important; max-width: none !important; }
    .lus-pop--when .flatpickr-day.inRange { border-radius: 0; box-shadow: none; }
    .lus-pop--when .flatpickr-day.startRange { border-radius: 999px 0 0 999px; }
    .lus-pop--when .flatpickr-day.endRange { border-radius: 0 999px 999px 0; }
    .lus-pop--when .flatpickr-day.startRange.endRange { border-radius: 999px; }
}

/* While the phone sheet is open, lift the whole hero above the theme's fixed header and bottom menu. */
html.lus-sheet-open .lus-hero { position: relative; z-index: 2147483000; }
html.lus-sheet-open .lus-hero__search { z-index: auto; }
html.lus-sheet-open .wp-bottom-menu { display: none !important; }
@media (max-width: 766px) {
    .lus-pop--when .flatpickr-day { height: 44px; line-height: 44px; }
    .lus-pop--when .flatpickr-day.inRange { border-radius: 0; box-shadow: none; }
    .lus-pop--when .flatpickr-day.startRange { border-radius: 999px 0 0 999px; }
    .lus-pop--when .flatpickr-day.endRange { border-radius: 0 999px 999px 0; }
    .lus-pop--when .flatpickr-day.startRange.endRange { border-radius: 999px; }
}

/* Phone: the calendar fills the card and the 7 columns are equal, whatever width flatpickr measured. */
@media (max-width: 766px) {
    .lus-pop--when .flatpickr-calendar,
    .lus-pop--when .flatpickr-calendar.inline,
    .lus-pop--when .flatpickr-innerContainer,
    .lus-pop--when .flatpickr-rContainer,
    .lus-pop--when .flatpickr-days,
    .lus-pop--when .dayContainer,
    .lus-pop--when .flatpickr-weekdays,
    .lus-pop--when .flatpickr-weekdaycontainer { width: 100% !important; min-width: 0 !important; max-width: 100% !important; box-sizing: border-box; }
    .lus-pop--when .flatpickr-calendar { box-shadow: none !important; }
    .lus-pop--when .dayContainer { justify-content: flex-start !important; padding: 0; }
    .lus-pop--when .flatpickr-weekdaycontainer { display: flex; }
    .lus-pop--when .flatpickr-weekday { flex: 1 1 0 !important; }
    .lus-pop--when .flatpickr-day { flex: 0 0 14.2857% !important; width: 14.2857% !important; max-width: 14.2857% !important; margin: 0 !important; }
}
.lus-pop--when .flatpickr-calendar::before, .lus-pop--when .flatpickr-calendar::after { display: none !important; }

/* ---- Calendar day prices ---- */
.lus-pop--when .flatpickr-day { display: flex !important; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.lus-day__n { font-size: 15px; }
.lus-day__p { margin-top: 2px; font-size: 10.5px; font-weight: 500; color: var(--lus-muted); letter-spacing: -.01em; }
.lus-pop--when .flatpickr-day.selected .lus-day__p, .lus-pop--when .flatpickr-day.startRange .lus-day__p, .lus-pop--when .flatpickr-day.endRange .lus-day__p { color: rgba(255, 255, 255, .8); }
.lus-pop--when .flatpickr-day.flatpickr-disabled .lus-day__p { display: none; }
@media (min-width: 767px) { .lus-pop--when .flatpickr-day { height: 50px !important; line-height: 1.15 !important; } }
@media (max-width: 766px) { .lus-pop--when .flatpickr-day { height: 52px !important; } .lus-day__p { font-size: 10px; } }
.lus-cal__note { margin: 6px 4px 0; font-size: 12.5px; color: var(--lus-muted); }
.lus-cal__note[hidden] { display: none; }

/* ---- Recent searches ---- */
.lus-pop__label--row { display: flex; align-items: center; justify-content: space-between; }
.lus-recent-clear { border: 0; background: transparent; padding: 0; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--lus-muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.lus-recent-clear:hover { color: var(--lus-accent); }
.lus-recent { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px; border: 0; border-radius: 14px; background: transparent; cursor: pointer; text-align: left; color: var(--lus-ink); transition: background var(--lus-dur) var(--lus-ease); }
.lus-recent:hover, .lus-recent.is-active { background: var(--lus-tint); }
.lus-recent:hover .lus-place__pin, .lus-recent.is-active .lus-place__pin { background: #fff; }
.lus-place__name small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; color: var(--lus-muted); }

/* Best-price days */
.lus-pop--when .flatpickr-day.lus-day--deal .lus-day__p { color: #1a7f4b; font-weight: 700; }
.lus-pop--when .flatpickr-day.lus-day--deal:not(.selected):not(.startRange):not(.endRange):not(.inRange) { background: rgba(26, 127, 75, .08); }
.lus-pop--when .flatpickr-day.lus-day--deal.selected .lus-day__p,
.lus-pop--when .flatpickr-day.lus-day--deal.startRange .lus-day__p,
.lus-pop--when .flatpickr-day.lus-day--deal.endRange .lus-day__p { color: #9be8bf; }
.lus-search__pill span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Clear controls: small "x" in the place field, text links under the calendar and the guests list */
.lus-seg__x { flex: none; width: 26px; height: 26px; margin-right: 6px; border: 0; border-radius: 50%; background: var(--lus-tint); color: var(--lus-ink); font-size: 18px; line-height: 1; cursor: pointer; padding: 0; transition: background var(--lus-dur) var(--lus-ease); }
.lus-seg__x:hover { background: var(--lus-line); }
.lus-seg__x[hidden] { display: none; }
.lus-cal__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 4px 0; }
.lus-cal__foot .lus-cal__note { margin: 0; }
.lus-clear { border: 0; background: transparent; padding: 8px 4px; font: 600 14px/1 inherit; color: var(--lus-ink); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; white-space: nowrap; }
.lus-clear:hover { color: var(--lus-accent); }
.lus-clear--guests { display: block; margin: 4px 0 8px auto; }
