/* TRAVELXPRESS booking - search.css
   15/11/2026 owner request "move booking to /" (Find & book page search.php + extra filters of list.php)
   Loaded by inc/view.php on search.php and list.php only. ASCII only (static files may be served with a non UTF-8 charset).
   Mobile first ; breakpoints 640 / 768 / 1024 like site.css ; no inline styles (CSP). */

/* ---------- Find & book form (search.php) ---------- */
.sform { display: grid; gap: 20px; margin: 14px 0 32px; padding: 16px; border: 1px solid var(--line-200); border-radius: var(--r-lg); background: var(--surface-2); }
.sform fieldset, .filters fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.sform legend { padding: 0; margin-bottom: 8px; }
.schips { display: flex; flex-wrap: wrap; gap: 8px; }
/* 21/11/2026 ผู้ใช้ขอ "1 แถว มีปุ่มเลื่อนซ้ายขวา" (BK102) : แถวเดียว เลื่อนแนวนอน (ซ่อนแถบเลื่อน) + ปุ่มลูกศรซ้าย/ขวาเมื่อเกินความกว้าง */
/* 22/11/2026 BK116 (owner "1 row with left/right scroll buttons" on the list / hotels pages too): .srail and .srail-btn moved to site.css (hotels.php does not load this file) */
.srail .schips { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; padding: 2px; }
.srail .schips::-webkit-scrollbar { display: none; }
.srail .schip { flex: 0 0 auto; }
.schip { position: relative; display: inline-flex; }
.schip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.schip .chip { cursor: pointer; }
.schip input:checked + .chip { border-color: var(--ink); background: var(--ink); color: var(--ink-on); }
.schip input:focus-visible + .chip { outline: 2px solid var(--ink); outline-offset: 2px; }
.schip:hover .chip { border-color: var(--ink); }
.sform-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.sform-grid .field { min-width: 0; }
.sf-range { display: flex; align-items: center; gap: 8px; }
.sf-range .input { flex: 1 1 0; min-width: 0; }
.sf-range span { color: var(--ink-500); }
.sf-price .field-hint { display: block; margin-top: 6px; }
.sform-act { display: flex; flex-wrap: wrap; gap: 10px; }
.sform-act .btn { flex: 1 1 160px; }

/* quick links under the form */
.qlinks { display: grid; gap: 12px; }
.qlinks-h { font-size: 18px; line-height: 26px; margin-top: 8px; }
.chip-n { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-700); font: 600 12px/22px var(--font); }

/* ---------- list.php : more filters ---------- */
.filters-x .fmore { grid-column: 1 / -1; }
.fmore > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; list-style: none; font: 500 14px/20px var(--font); color: var(--accent-text); }
.fmore > summary::-webkit-details-marker { display: none; }
.fmore-chev { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.fmore[open] .fmore-chev { transform: rotate(90deg); }
.fmore-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); padding-top: 4px; }
.fmore-grid .field { min-width: 0; }
/* phone / small tablet : the search button comes after the more filters */
@media (max-width: 767px) { .filters-x .fmore { order: 1; } .filters-x > .btn { order: 2; } }

@media (min-width: 640px) {
  .sform { padding: 24px; }
  .sform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-q, .sf-price { grid-column: 1 / -1; }
  .sform-act .btn { flex: 0 0 auto; min-width: 180px; }
  .fmore-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fmore-grid > .field:first-child { grid-column: 1 / -1; }
}
@media (min-width: 768px) {
  .filters.filters-x .fmore { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .sform { padding: 28px; }
  .sform-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
  .sf-q { grid-column: span 2; }
  .sf-price { grid-column: span 2; }
  .fmore-grid { grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); align-items: start; }
  .fmore-grid > .field:first-child { grid-column: auto; }
}
/* review fix 15/11/2026 : edit-search link of list.php ; per person price of group products on a price-filtered list */
.sedit { margin: 0 0 12px; }
.sedit a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font: 500 14px/20px var(--font); color: var(--accent-text); }
.sedit .ico { width: 16px; height: 16px; }
.price .price-pp { display: block; margin-top: 2px; font: 400 13px/18px var(--font); color: var(--ink-500); letter-spacing: 0; }
@media (prefers-reduced-motion: reduce) { .fmore-chev { transition: none; } }

/* ---------- Search line (list.php), 20/11/2026 owner request "same as travelconnext" (BK85) ----------
   Copy of TravelConnext .search-context: dot . place . day date . people ... "edit" ; the summary of a <details>, the full
   filter form opens under it (no JavaScript). Under 640px two lines (place + edit / date + people), from 640px one pill. */
.sctx-wrap { margin: 14px 0 24px; }
.sctx-wrap > summary { list-style: none; }
.sctx-wrap > summary::-webkit-details-marker { display: none; }
.search-context { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 2px; min-height: 48px; padding: 8px 16px; border: 1px solid var(--line-200); border-radius: var(--r-lg); background: var(--surface); font: 500 14px/20px var(--font); color: var(--ink); cursor: pointer; overflow: hidden; }
.search-context:hover { border-color: var(--line-400); }
.search-context:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.search-context .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.search-context .seg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.search-context .seg-loc { flex: 1 1 auto; }
.search-context .seg-when { flex: 1 1 100%; order: 10; padding-left: 18px; font-weight: 400; color: var(--ink-700); }
.search-context .sep { display: none; color: var(--ink-500); }
.search-context .edit { flex: none; margin-left: auto; text-decoration: underline; text-underline-offset: 3px; }
.sctx-wrap .e-close, .sctx-wrap[open] .e-open { display: none; }
.sctx-wrap[open] .e-close { display: inline; }
.sctx-wrap > .filters { margin: 12px 0 0; }
@media (min-width: 640px) {
  .search-context { flex-wrap: nowrap; height: 48px; padding: 0 16px; border-radius: var(--r-pill); }
  .search-context .seg-loc { flex: 0 1 auto; }
  .search-context .seg-when { flex: 0 1 auto; order: 0; padding-left: 0; font-weight: 500; color: inherit; }
  .search-context .sep { display: inline; }
}

/* ---------- Search page head (search.php), 20/11/2026 owner sketch (BK86) ----------
   "request a quotation" button to the right of the title and lead, after a vertical line ; under 768px the button sits under
   the text with no line. */
.ph-row { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.ph-main { min-width: 0; }
@media (min-width: 768px) {
  .ph-row { flex-direction: row; align-items: center; gap: 48px; }
  .ph-main { flex: 0 1 auto; }
  .ph-side { flex: none; align-self: stretch; display: flex; align-items: center; margin-left: auto; padding-left: 48px; border-left: 1px solid var(--line-400); } /* BK87 owner "align right": line + button at the right edge */
}
