/* Date picker in the hero (picker arm only, see assets/js/picker-test.js). */
:root {
  --date-search-height: 228px;                 /* measured height of form + WhatsApp line on a phone: no jump when the JS builds it */
  --date-search-control-h: 48px;               /* ONE height for every field and the button */
  --date-search-radius: var(--radius-img, 10px); /* same corners as the site's buttons */
  --date-search-label: #fff;
  --date-search-guests-w: 5rem;                /* guests holds 1 to 4: narrow, the room goes to the button */
  --date-search-btn-bg: var(--color-accent);   /* same sand as the header Book Now: the one coloured action */
  --date-search-btn-text: var(--color-text-main);
}
[data-date-search] { display: none; }
html[data-picker="picker"] [data-date-search] { display: block; min-height: var(--date-search-height); margin: 1.4rem 0 .2rem; }
/* The form replaces the hero Book button for the picker arm (one action, not two).
   picker-test.js sets data-picker-failed if the form never builds, and the button comes back. */
html[data-picker="picker"]:not([data-picker-failed]) .hero-content [data-cta-location="home_hero"] { display: none; }

/* Inner pages cap their hero at 66vh (style.css): too short on a phone once the form is in.
   With the form, the hero takes the height of its content instead. */
html[data-picker="picker"]:not([data-picker-failed]) .parallax-section.has-date-search { height: auto; min-height: 66vh; padding: 1.5rem 0 3rem; }

/* align-items:end puts every control on the same baseline, label or not */
.date-search { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem .6rem; align-items: end; text-align: left; }
.date-search label {
  display: flex; flex-direction: column; gap: .35rem; min-width: 0;
  font-size: .9rem; font-weight: 500; letter-spacing: .02em; color: var(--date-search-label);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55);   /* readable on any part of the photo */
}
.date-search input, .date-search select, .date-search .btn {
  box-sizing: border-box; width: 100%; height: var(--date-search-control-h); margin: 0;
  border-radius: var(--date-search-radius);
}
.date-search input, .date-search select {
  font: inherit; font-size: 16px; line-height: 1.2;  /* 16px: iOS does not zoom on focus */
  color: var(--color-text-main); background: #fff; padding: 0 .8rem; border: 1px solid transparent;
}
/* The button inherits .btn/.hero-btn (margin-top 2rem, 2px tracking, 10px 38px padding, white): neutralised here */
.date-search .btn {
  display: flex; align-items: center; justify-content: center;
  padding: 0 1.4rem; font-size: .9rem; font-weight: 700; letter-spacing: 1.5px; line-height: 1; white-space: nowrap;
  background: var(--date-search-btn-bg); border: 1px solid var(--date-search-btn-bg); color: var(--date-search-btn-text) !important;
}
.date-search .btn:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff !important; }
.date-search input:focus-visible, .date-search select:focus-visible, .date-search .btn:focus-visible {
  outline: 3px solid var(--color-accent); outline-offset: 2px;
}
.date-search-group { margin: .9rem 0 0; font-size: .85rem; line-height: 1.5; color: #fff; text-wrap: balance; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.date-search-group a { color: var(--color-accent); text-decoration: underline; white-space: nowrap; }

/* Phone: the two dates side by side, then a narrow guests field beside the button */
@media (max-width: 768px) {
  .date-search { display: flex; flex-wrap: wrap; align-items: flex-end; }
  .date-search label { flex: 1 1 calc(50% - .3rem); }
  .date-search label:nth-of-type(3) { flex: 0 0 var(--date-search-guests-w); }
  .date-search .btn { flex: 1 1 0; min-width: 0; padding: 0 .8rem; font-size: .85rem; letter-spacing: 1px; }
}
/* Very small phones (320 px): the button label no longer fits beside guests, it takes its own row */
@media (max-width: 359px) {
  :root { --date-search-height: 288px; }
  .date-search .btn { flex-basis: 100%; }
}
/* Desktop: one row, the button sized to its text */
@media (min-width: 769px) {
  :root { --date-search-height: 114px; }   /* measured, desktop */
  .date-search { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) var(--date-search-guests-w) auto; }
  .date-search .btn { width: auto; }
}
