/**
 * Andario Booking Engine — SEARCH-01 premium search experience
 * Presentation-only refinement. Keeps the existing booking flow, APIs,
 * field ids, validation, state transitions, pricing and tenant boundaries.
 */

:root {
  --search-card-shadow: 0 18px 55px rgba(15, 23, 42, .08);
  --search-card-border: color-mix(in srgb, var(--color-primary) 9%, var(--color-border));
  --search-muted-surface: color-mix(in srgb, var(--color-primary) 3%, #fff);
}

body {
  background:
    radial-gradient(circle at 14% 0%, color-mix(in srgb, var(--color-primary) 5%, transparent) 0, transparent 32rem),
    var(--color-background);
}

.booking-shell {
  padding-top: 20px;
}

/* Header: property-first identity without expanding the flow. */
.booking-header {
  border: 1px solid var(--search-card-border);
  border-radius: 18px;
  box-shadow: 0 10px 34px rgba(15, 23, 42, .07);
  overflow: hidden;
}

.booking-header__container {
  min-height: 86px;
  padding: 14px 20px;
}

.booking-header__identity {
  min-width: 0;
}

.booking-header__property-name {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.012em;
  color: var(--color-text);
}

.booking-header__location {
  margin: 3px 0 0;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text-light);
  font-size: .78rem;
  font-weight: 600;
}

.booking-header__secure {
  margin-top: 5px;
  font-size: .76rem;
}

.booking-header__secure-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: .68rem;
  font-weight: 900;
}

.booking-header__secure-separator {
  color: var(--color-border-dark);
}

.booking-header__info-button,
.booking-header__control-select {
  min-height: 42px;
  border-radius: 10px;
}

/* Stepper: legible future steps while keeping navigation semantics unchanged. */
.booking-stepper {
  margin: 22px 0 24px;
}

.booking-stepper__circle {
  width: 38px;
  height: 38px;
  font-size: .82rem;
  box-shadow: none;
}

.booking-stepper__item,
.booking-stepper__button {
  min-width: 86px;
}

.booking-stepper__label {
  margin-top: 7px;
  font-size: .78rem;
  font-weight: 650;
  color: color-mix(in srgb, var(--color-text) 64%, white);
}

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

.booking-stepper__separator {
  width: clamp(34px, 5vw, 68px);
  background: color-mix(in srgb, var(--color-border-dark) 65%, white);
}

/* Main search card. */
#booking-search.booking-flow--active {
  background: var(--color-surface);
  border: 1px solid var(--search-card-border);
  border-radius: 18px;
  padding: clamp(22px, 3vw, 34px);
  box-shadow: var(--search-card-shadow);
}

.booking-search__form {
  gap: 26px;
}

.booking-search__header {
  gap: 7px;
  max-width: 720px;
}

.booking-search__title {
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  line-height: 1.16;
  letter-spacing: -.032em;
}

.booking-search__description {
  max-width: 620px;
  font-size: .96rem;
  line-height: 1.5;
}

.booking-search__trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  color: var(--color-text-light);
  font-size: .78rem;
  font-weight: 650;
}

.booking-search__trust-item:first-child::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: .68rem;
  font-weight: 900;
}

.booking-search__trust-dot {
  color: var(--color-border-dark);
}

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

.booking-search__field {
  position: relative;
  gap: 7px;
}

.booking-search__label,
.booking-search__field label {
  font-size: .82rem;
  font-weight: 750;
  color: var(--color-text);
}

.booking-search__input {
  min-height: 54px;
  border-radius: 12px !important;
  border-color: var(--color-border-dark) !important;
  background: #fff !important;
  font-size: 1rem !important;
  font-weight: 550;
  color: var(--color-text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
}

.booking-search__input:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--color-primary) 48%, var(--color-border-dark)) !important;
}

.booking-search__input:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 13%, transparent) !important;
}

.booking-search__hint {
  min-height: 0;
  color: var(--color-text-light);
  font-size: .74rem;
  line-height: 1.35;
}

.booking-search__error:not(.is-visible):empty {
  display: none;
}

.booking-search__error.is-visible {
  display: block;
  min-height: 0;
  font-size: .76rem;
  line-height: 1.35;
}

.booking-search__footer {
  justify-content: stretch;
  padding-top: 2px;
}

.booking-search__submit {
  width: 100%;
  min-height: 54px;
  border-radius: 12px;
  font-size: .96rem;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--color-primary) 18%, transparent);
}

.booking-search__submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--color-primary) 22%, transparent);
}

.booking-search.is-loading .booking-search__submit::before {
  content: "";
  width: 17px;
  height: 17px;
  margin-right: 9px;
  border: 2px solid color-mix(in srgb, white 42%, transparent);
  border-top-color: white;
  border-radius: 50%;
  animation: booking-search-spin .75s linear infinite;
}

.booking-search.is-loading .booking-search__button-text {
  opacity: 1;
}

@keyframes booking-search-spin { to { transform: rotate(360deg); } }

/* Summary: progressive disclosure prevents the $0 / fake-room state. */
.booking-summary {
  border: 1px solid var(--search-card-border);
  border-radius: 18px;
  box-shadow: 0 14px 42px rgba(15, 23, 42, .07);
}

.booking-summary__header {
  padding: 20px 22px;
}

.booking-summary__title {
  font-size: 1rem;
  letter-spacing: -.012em;
}

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

.booking-summary__empty-state {
  display: none;
  padding: 14px 4px 18px;
  text-align: center;
}

.booking-summary__empty-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 1.25rem;
  font-weight: 800;
}

.booking-summary__empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--color-text);
  font-size: .94rem;
}

.booking-summary__empty-state p {
  margin: 0 auto;
  max-width: 250px;
  color: var(--color-text-light);
  font-size: .80rem;
  line-height: 1.45;
}

.booking-summary--empty .booking-summary__empty-state {
  display: block;
}

.booking-summary--empty .booking-summary__context,
.booking-summary--empty .booking-summary__next-step,
.booking-summary--empty .booking-summary__selection,
.booking-summary--empty .booking-summary__financial,
.booking-summary--empty .booking-summary__footer {
  display: none;
}

.booking-summary--context .booking-summary__empty-state,
.booking-summary--context .booking-summary__selection,
.booking-summary--context .booking-summary__financial,
.booking-summary--context .booking-summary__footer {
  display: none;
}

.booking-summary__next-step {
  display: none;
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--search-muted-surface);
  color: var(--color-text-light);
  font-size: .76rem;
  line-height: 1.4;
}

.booking-summary--context .booking-summary__next-step {
  display: block;
}

.booking-summary--ready .booking-summary__empty-state {
  display: none;
}

.booking-summary__row {
  padding: 7px 0;
}

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

.booking-summary__value {
  font-size: .84rem;
}

/* Public footer: support information stays; build version is not guest-facing. */
.booking-footer {
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
}

.booking-footer__version {
  display: none;
}

.booking-footer__powered {
  color: var(--color-text-light);
}

/* Responsive: keep the search first and avoid a dense mobile sidebar. */
@media (max-width: 1100px) {
  .booking-main {
    gap: 18px;
  }

  #booking-summary {
    order: 2;
  }
}

@media (max-width: 768px) {
  .booking-shell {
    padding: 12px;
  }

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

  .booking-header__container {
    padding: 12px;
  }

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

  .booking-header__location {
    max-width: min(60vw, 330px);
    font-size: .72rem;
  }

  .booking-header__secure {
    white-space: normal;
    flex-wrap: wrap;
    row-gap: 2px;
  }

  .booking-header__controls {
    margin-top: 2px;
  }

  .booking-stepper {
    margin: 14px 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .booking-stepper::-webkit-scrollbar { display: none; }

  .booking-stepper__container {
    min-width: 580px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 5px 4px 8px;
  }

  .booking-stepper__item {
    width: auto;
    min-width: 78px;
    flex-direction: column;
    gap: 0;
  }

  .booking-stepper__button {
    min-width: 78px;
  }

  .booking-stepper__label {
    margin-top: 6px;
    text-align: center;
    font-size: .70rem;
  }

  .booking-stepper__separator {
    width: 26px;
    height: 2px;
    margin: 0;
  }

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

  .booking-search__title {
    font-size: 1.45rem;
  }

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

  .booking-search__trust-dot,
  .booking-search__trust-item:last-child {
    display: none;
  }

  .booking-search__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .booking-search__input {
    min-height: 52px;
    font-size: 16px !important;
  }

  .booking-search__hint {
    display: none;
  }

  .booking-summary {
    margin-top: 0;
    border-radius: 16px;
  }

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

@media (max-width: 420px) {
  .booking-header__secure-separator,
  .booking-header__secure span:last-child {
    display: none;
  }

  .booking-header__info-button {
    min-height: 38px;
    padding: 0 10px;
    font-size: .78rem;
  }

  .booking-search__trust {
    font-size: .73rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .booking-search.is-loading .booking-search__submit::before {
    animation-duration: 1.4s;
  }
  .booking-search__submit,
  .booking-search__input {
    transition: none;
  }
}
