/**
 * Andario Booking Engine — SEARCH-03 responsive polish
 * Presentation-only hardening for Search / Step 1.
 * No API, booking state, pricing, inventory or tenant contracts are changed.
 */

/* ---------- shared readability / hierarchy ---------- */
.booking-header__location,
.booking-header__secure,
.booking-stepper__label,
.booking-search__description,
.booking-search__hint,
.booking-summary__empty-state p,
.booking-footer__location,
.booking-footer__link,
.booking-footer__copyright {
  color: color-mix(in srgb, var(--color-text) 70%, #fff);
}

.booking-header__container {
  min-height: 74px;
  padding-block: 10px;
}

.booking-header__location {
  max-width: 560px;
}

.booking-header__controls {
  gap: 10px;
}

.booking-header__info-button,
.booking-header__control-select {
  min-height: 40px;
}

/* Hero: keep emotion, remove unnecessary height and improve copy rhythm. */
#booking-hero {
  margin-top: 12px;
}

.booking-hero {
  min-height: clamp(220px, 25vw, 315px);
}

.booking-hero__content {
  gap: 0;
  max-width: min(650px, 68%);
  padding: clamp(26px, 3.6vw, 46px);
}

.booking-hero__title {
  max-width: 600px;
  line-height: 1.02;
}

.booking-hero__subtitle {
  margin-top: 10px;
  max-width: 580px;
}

.booking-hero__benefits {
  margin-top: 16px;
  gap: 10px 18px;
}

.booking-hero__benefit {
  min-height: 32px;
  font-size: .86rem;
}

.booking-hero__benefit > span:first-child {
  width: 26px;
  height: 26px;
}

/* Stepper remains complete on tablet/desktop, but more legible. */
.booking-stepper {
  margin: 18px 0 20px;
}

.booking-stepper__item.is-disabled {
  opacity: .82;
}

.booking-stepper__label {
  font-size: .80rem;
  font-weight: 680;
}

.booking-stepper__separator {
  background: color-mix(in srgb, var(--color-text) 18%, #fff);
}

/* Search card: one visual surface, slightly denser while keeping touch comfort. */
#booking-search.booking-flow--active {
  padding: clamp(20px, 2.4vw, 30px);
}

.booking-search__form {
  gap: 22px;
}

.booking-search__header {
  gap: 6px;
}

.booking-search__grid {
  gap: 15px 16px;
}

.booking-search__field {
  gap: 6px;
}

.booking-search__hint {
  font-size: .76rem;
}

.booking-search__submit {
  min-height: 52px;
}

/* Summary: useful presence on desktop, compact empty state everywhere. */
.booking-summary__header {
  padding: 18px 20px;
}

.booking-summary__body {
  padding: 16px 20px 18px;
}

.booking-summary__empty-state {
  padding: 8px 2px 10px;
}

.booking-summary__empty-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
}

.booking-summary__empty-state p {
  max-width: 230px;
}

/* Desktop: balanced 70/30 content-to-summary relationship. */
@media (min-width: 980px) {
  .booking-shell {
    padding-top: 16px;
  }

  .booking-main {
    grid-template-columns: minmax(0, 7fr) minmax(300px, 3fr) !important;
    gap: clamp(22px, 2vw, 30px) !important;
  }

  #booking-summary.booking-sidebar {
    top: 82px;
  }

  .booking-header__brand {
    gap: 14px;
  }

  .booking-header__logo {
    width: 52px;
    height: 52px;
  }
}

/* Tablet: do not squeeze a desktop layout into a narrower canvas. */
@media (min-width: 640px) and (max-width: 979px) {
  .booking-header__container {
    min-height: 68px;
    padding: 10px 14px;
  }

  .booking-hero {
    min-height: 210px;
  }

  .booking-hero__content {
    max-width: 78%;
    padding: 24px;
  }

  .booking-stepper {
    margin: 14px 0 16px;
  }

  .booking-main {
    gap: 16px !important;
  }

  .booking-summary--empty .booking-summary__body {
    min-height: 120px;
  }
}

/* Phones: purpose-built layout rather than a scaled desktop. */
@media (max-width: 639px) {
  :root {
    --booking-mobile-gutter: 10px;
  }

  .booking-shell {
    padding-top: 6px;
    padding-bottom: 18px;
  }

  .booking-header {
    border-radius: 14px;
  }

  .booking-header__container {
    min-height: 0;
    gap: 6px 8px;
    padding: 8px 10px 9px;
  }

  .booking-header__brand {
    gap: 8px;
  }

  .booking-header__logo {
    width: 40px;
    height: 40px;
  }

  .booking-header__property-name {
    font-size: .92rem;
  }

  .booking-header__location {
    margin-top: 2px;
    max-width: min(58vw, 260px);
    font-size: .68rem;
  }

  .booking-header__secure {
    margin-top: 2px;
    max-width: min(62vw, 280px);
    flex-wrap: wrap;
    gap: 4px;
    font-size: .68rem;
    line-height: 1.2;
    white-space: normal;
  }

  .booking-header__secure-icon {
    width: 15px;
    height: 15px;
  }

  .booking-header__info-button {
    min-height: 38px;
    padding-inline: 10px;
  }

  .booking-header__controls {
    gap: 7px;
  }

  .booking-header__control-select {
    min-height: 42px;
    height: 42px;
    font-size: .82rem;
  }

  #booking-hero {
    margin-top: 8px;
    border-radius: 13px;
  }

  .booking-hero {
    min-height: clamp(170px, 46vw, 205px);
  }

  .booking-hero__scrim {
    background: linear-gradient(90deg, rgba(2,6,23,.84) 0%, rgba(2,6,23,.56) 58%, rgba(2,6,23,.20) 100%);
  }

  .booking-hero__content {
    justify-content: center;
    max-width: 94%;
    padding: 16px;
  }

  .booking-hero__title {
    max-width: 88vw;
    font-size: clamp(1.65rem, 8vw, 2.15rem);
    line-height: .99;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .booking-hero__subtitle {
    max-width: 86vw;
    margin-top: 7px;
    font-size: .86rem;
    line-height: 1.32;
  }

  .booking-hero__benefits {
    margin-top: 10px;
    gap: 6px 10px;
  }

  .booking-hero__benefit {
    min-height: 26px;
    font-size: .73rem;
  }

  .booking-hero__benefit > span:first-child {
    width: 22px;
    height: 22px;
  }

  /* Compact mobile progress: keep the active translated step + numeric progress. */
  .booking-stepper {
    position: relative;
    min-height: 48px;
    margin: 10px 0 12px;
    padding: 0 8px 9px;
    border-bottom: 1px solid color-mix(in srgb, var(--color-text) 10%, #fff);
  }

  .booking-stepper::after {
    content: attr(data-progress);
    position: absolute;
    top: 7px;
    right: 8px;
    color: color-mix(in srgb, var(--color-text) 66%, #fff);
    font-size: .75rem;
    font-weight: 750;
    letter-spacing: .01em;
  }

  .booking-stepper__container {
    display: block !important;
  }

  .booking-stepper__item,
  .booking-stepper__separator {
    display: none !important;
  }

  .booking-stepper__item.is-previous,
  .booking-stepper__item.is-active {
    display: inline-block !important;
    width: max-content !important;
    vertical-align: middle;
  }

  .booking-stepper__item.is-previous {
    margin-right: 10px;
  }

  .booking-stepper__item.is-previous .booking-stepper__button,
  .booking-stepper__item.is-active .booking-stepper__button {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 9px;
    width: auto !important;
  }

  .booking-stepper__item.is-previous .booking-stepper__button {
    min-height: 40px;
    padding: 0 8px 0 0;
    color: color-mix(in srgb, var(--color-text) 72%, #fff);
  }

  .booking-stepper__item.is-previous .booking-stepper__circle {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 0;
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--color-text) 20%, #fff);
    color: var(--color-text);
  }

  .booking-stepper__item.is-previous .booking-stepper__circle::before {
    content: "←";
    font-size: .95rem;
    line-height: 1;
  }

  .booking-stepper__item.is-previous .booking-stepper__label {
    font-size: .75rem;
    font-weight: 750;
  }

  .booking-stepper__circle {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    font-size: .76rem;
  }

  .booking-stepper__label {
    width: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    font-size: .84rem;
    font-weight: 800;
  }

  .booking-main {
    gap: 12px;
  }

  #booking-search.booking-flow--active {
    border-radius: 15px;
    padding: 16px 14px;
  }

  .booking-search__form {
    gap: 17px;
  }

  .booking-search__title {
    font-size: clamp(1.38rem, 6.2vw, 1.62rem);
    line-height: 1.12;
  }

  .booking-search__description {
    font-size: .86rem;
    line-height: 1.42;
  }

  .booking-search__trust {
    margin-top: 1px;
    font-size: .74rem;
  }

  .booking-search__grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .booking-search__field {
    gap: 5px;
  }

  .booking-search__label,
  .booking-search__field label {
    font-size: .84rem;
  }

  .booking-search__input {
    min-height: 50px;
  }

  /* Hints stay available on interaction/error without occupying every screen. */
  .booking-search__hint {
    display: none;
    margin-top: 1px;
    font-size: .72rem;
  }

  .booking-search__field:focus-within .booking-search__hint,
  .booking-search__field:has(.booking-search__input.is-invalid) .booking-search__hint {
    display: block;
  }

  .booking-search__submit {
    min-height: 52px;
    font-size: .94rem;
  }

  .booking-summary {
    border-radius: 15px;
  }

  .booking-summary__header {
    padding: 15px 16px;
  }

  .booking-summary__body {
    padding: 12px 16px 14px;
  }

  .booking-summary__empty-state {
    padding: 4px 0 6px;
  }

  .booking-summary__empty-icon {
    width: 34px;
    height: 34px;
    margin-bottom: 8px;
    border-radius: 11px;
    font-size: 1rem;
  }

  .booking-summary__empty-state strong {
    margin-bottom: 4px;
    font-size: .91rem;
  }

  .booking-summary__empty-state p {
    max-width: 270px;
    font-size: .78rem;
    line-height: 1.36;
  }

  .booking-footer {
    margin-top: 12px;
  }

  .booking-footer__container {
    padding: 14px 12px;
    gap: 10px;
  }

  .booking-footer__brand {
    font-size: .88rem;
  }

  .booking-footer__location {
    margin-top: 2px;
    font-size: .72rem;
    line-height: 1.3;
  }

  .booking-footer__links {
    flex-direction: row;
    justify-content: center;
    gap: 8px 16px;
  }

  .booking-footer__link,
  .booking-footer__copyright {
    font-size: .74rem;
  }

  .booking-footer__copyright {
    gap: 5px;
  }
}

/* Very narrow phones: keep booking action above decorative density. */
@media (max-width: 380px) {
  .booking-header__container {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .booking-header__location {
    max-width: 52vw;
  }

  .booking-header__controls {
    grid-template-columns: 1fr 1fr;
  }

  .booking-hero {
    min-height: 162px;
  }

  .booking-hero__content {
    padding: 14px;
  }

  .booking-hero__title {
    font-size: 1.58rem;
  }

  .booking-hero__subtitle {
    font-size: .80rem;
  }

  .booking-hero__benefits {
    margin-top: 7px;
  }

  .booking-hero__benefit:nth-child(n+3) {
    display: none;
  }

  #booking-search.booking-flow--active {
    padding-inline: 12px;
  }

  .booking-footer__links {
    gap: 7px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .booking-search__submit:hover:not(:disabled) {
    transform: none;
  }
}
