/* 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: 1280px;
    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: 8px;
    padding: 8px 12px;
    min-width: 0;
  }
  .site-search-segment--destination { flex: 1.25 1 0; }
  .site-search-segment--property { flex: 1.7 1 0; }
  .site-search-segment--dates { flex: 1.45 1 0; }
  .site-search-segment--guests { flex: 0.8 1 0; }
  .site-search-segment--beds { flex: 0.8 1 0; }
  .site-search-segment > i {
    color: #701B42;
    font-size: 14px;
    flex: 0 0 auto;
  }
  .site-search-segment-text {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }
  .site-search-segment-text label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: #1F1418;
    margin-bottom: 2px;
    white-space: nowrap;
  }
  .site-search-segment-text select,
  .site-search-segment-text input {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
    height: 21px;
    min-height: 21px;
    font-size: 14px;
    font-weight: 600;
    line-height: 21px;
    color: #6B6355;
    background: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .site-search-segment-text select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%236B6355' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1px center;
    background-size: 10px 6px;
    cursor: pointer;
  }
  .site-search-segment-text select::-ms-expand {
    display: none;
  }
  .site-search-segment-text select option {
    padding: 6px 12px 6px 16px;
  }
  .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 22px;
    background: #701B42;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
  }
  .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 (min-width: 992px) and (max-width: 1199.98px) {
    .site-search-segment { padding: 8px 8px; gap: 6px; }
    .site-search-segment > i { display: none; }
    .site-search-segment-text select,
    .site-search-segment-text input { font-size: 13px; }
  }
  
  @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; display: inline-block; }
    .site-search-segment-text label { font-size: 13px; }
    .site-search-segment-text select,
    .site-search-segment-text input { font-size: 16px; height: 24px; min-height: 24px; line-height: 24px; }
    .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;
    }
  }
  