/* Shared site search bar (Booking.com-style pill/segment bar).
   Used on: home.php, details.php (via frontend/views/search_bar.php),
   and search2.php (existing markup/JS kept, restyled with these classes).
   No wrapper background by design - the pill sits directly on whatever
   background the host page already has. */
.site-search-bar-wrap {
  display: flex;
  justify-content: center;
  padding: 14px 24px;
  position: relative;
}
.site-search-bar {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 1100px;
  background: #fff;
  border: 2px solid #701B42;
  border-radius: 100px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.site-search-segment {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 22px;
  min-width: 0;
}
.site-search-segment > i {
  color: #701B42;
  font-size: 17px;
}
.site-search-segment-text { min-width: 0; flex: 1 1 auto; }
.site-search-segment-text label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #1F1418;
  margin-bottom: 1px;
}
.site-search-segment-text select,
.site-search-segment-text input {
  width: 100%;
  border: none;
  outline: none;
  padding: 0;
  font-size: 16px;
  color: #6B6355;
  background: transparent;
  text-overflow: ellipsis;
}
.site-search-divider {
  width: 1px;
  margin: 10px 0;
  background: #E9E4D8;
  flex: 0 0 1px;
}
.site-search-submit {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  padding: 0 32px;
  background: #701B42;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}
.site-search-submit:hover { filter: brightness(1.05); }
.site-search-more-btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  border: none;
  border-left: 1px solid #E9E4D8;
  background: #fff;
  color: #701B42;
  font-size: 17px;
}
.site-search-more-btn.is-active { background: #F7EFE9; }
.site-search-more-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1100px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  padding: 12px 28px 20px;
  z-index: 20;
}
.site-search-more-panel.is-open { display: block; }

/* Mobile (<992px): the pill/row layout doesn't fit a narrow screen, so the
   form stacks into a card. On top of that, if the guest arrived with
   fields already filled (e.g. from a search results click-through), we
   don't want a full form eating the top of the screen - show a one-line
   summary + Edit button instead, and reveal the full form only on tap. */
.site-search-summary {
  display: none;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: #fff;
  border: 2px solid #701B42;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  padding: 14px 16px;
}
.site-search-summary-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  color: #1F1418;
  line-height: 1.35;
}
.site-search-summary-text strong { color: #701B42; }
.site-search-summary-edit {
  flex: 0 0 auto;
  border: none;
  background: #701B42;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 18px;
  border-radius: 100px;
}
/* Always-stacked variant: same segment look (icon + label + value, bordered
   rows) as the responsive bar's mobile layout, but forced at every viewport
   width - for contexts like a narrow sidebar widget where there's never
   room for the horizontal pill regardless of screen size. */
.site-search-bar.site-search-bar--stacked {
  flex-direction: column;
  align-items: stretch;
  border-radius: 16px;
  max-width: 100%;
  box-shadow: none;
}
.site-search-bar--stacked .site-search-segment {
  padding: 12px 16px;
  border-bottom: 1px solid #E9E4D8;
}
.site-search-bar--stacked .site-search-segment:last-child { border-bottom: none; }

@media (max-width: 991.98px) {
  /* Summary/edit toggle only applies below the desktop breakpoint - the
     pill bar on desktop always shows the full form regardless of whether
     fields are pre-filled. */
  .site-search-bar-wrap.is-summary-mode .site-search-summary { display: flex; }
  .site-search-bar-wrap.is-summary-mode .site-search-bar { display: none; }

  .site-search-bar-wrap { padding: 20px 10px 28px; }
  .site-search-bar {
    flex-direction: column;
    align-items: stretch;
    border-radius: 20px;
    max-width: 100%;
  }
  /* Taller rows + a min-height so each field is a comfortable tap target
     (the desktop pill's compact padding measures well under the ~44px
     touch target both Apple and Google recommend) instead of just the
     text's own line height. */
  .site-search-segment {
    padding: 16px 18px;
    min-height: 56px;
    gap: 14px;
    border-bottom: 1px solid #E9E4D8;
  }
  .site-search-segment > i { font-size: 19px; }
  .site-search-divider { display: none; }
  .site-search-more-btn {
    width: 100%;
    height: auto;
    min-height: 52px;
    border-left: none;
    border-bottom: 1px solid #E9E4D8;
    padding: 14px;
  }
  .site-search-submit {
    padding: 18px;
    font-size: 17px;
    justify-content: center;
    border-radius: 0 0 18px 18px;
  }
  .site-search-more-panel {
    position: static;
    transform: none;
    max-width: 100%;
    box-shadow: none;
    border-top: 1px solid #E9E4D8;
    border-radius: 0;
    margin-top: 0;
  }
}
