/**
 * [globerides_search] — full-page map with a floating search/booking panel.
 * Scoped under .grb-search.
 */
.grb-search {
  --gold: #C9A84C;
  --ink: #0E1624;
  --line: #e3e6ea;
  --muted: #6B7A8D;
  position: relative;
  /* Break out of the page container so the map is full-bleed even inside
     the standard page template. */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: calc(100vh - 80px);   /* fill viewport under a typical header */
  min-height: 560px;
  overflow: hidden;
}
.grb-search *, .grb-search *::before, .grb-search *::after { box-sizing: border-box; }

/* Full-bleed map */
.grb-search__map { position: absolute; inset: 0; background: var(--ink); }
.grb-search__nokey {
  position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 24px; color: #cdd6e0; background: var(--ink);
}

/* Floating panel */
.grb-search__panel {
  position: absolute; z-index: 5; top: 20px; left: 20px;
  width: 380px; max-width: calc(100% - 40px); max-height: calc(100% - 40px);
  display: flex; flex-direction: column;
  background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(14,22,36,.28);
  overflow: hidden;
}
.grb-panel__head { padding: 18px 20px 12px; }
.grb-panel__head h2 { margin: 0 0 2px; font-size: 19px; color: var(--ink); }
.grb-panel__head p { margin: 0; font-size: 13px; color: var(--muted); }
.grb-panel__body { padding: 0 20px 18px; overflow-y: auto; }

/* Location rows with a leading dot */
.grb-loc { position: relative; display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.grb-loc__dot {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
}
.grb-loc__dot--a { background: var(--gold); }
.grb-loc__dot--b { background: var(--ink); }
.grb-loc__dot--stop { width: 12px; height: 12px; background: var(--muted); margin: 0 5px; }
.grb-loc__remove { flex: 0 0 auto; width: 24px; height: 24px; border: 0; border-radius: 50%; background: #f0f0f2; color: var(--muted); font-size: 16px; cursor: pointer; }
.grb-loc__remove:hover { background: #d64545; color: #fff; }

/* Autocomplete input + panel */
.grb-ac { position: relative; flex: 1 1 auto; }
.grb-ac__input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; background: #fbfbfc;
}
.grb-ac__input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,.18); }
.grb-ac__panel {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(14,22,36,.16);
  max-height: 260px; overflow-y: auto;
}
.grb-ac__panel [role="option"] { padding: 9px 10px; border-radius: 7px; cursor: pointer; font-size: 14px; color: var(--ink); }
.grb-ac__panel [role="option"]:hover { background: #f5f2e8; }
.grb-ac__sub { color: var(--muted); font-size: 12px; }
.grb-ac__empty { padding: 9px 10px; color: var(--muted); font-size: 13px; }

/* Controls */
.grb-panel__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 12px; }
.grb-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.grb-toggle label { cursor: pointer; }
.grb-toggle input { position: absolute; opacity: 0; }
.grb-toggle span { display: block; padding: 7px 13px; font-size: 13px; font-weight: 600; color: var(--muted); }
.grb-toggle input:checked + span { background: var(--ink); color: #fff; }
.grb-check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.grb-check input { width: 16px; height: 16px; accent-color: var(--gold); }

/* Buttons */
.grb-btn { cursor: pointer; border: 0; border-radius: 10px; font-size: 14px; font-weight: 700; padding: 10px 18px; }
.grb-btn--primary { background: var(--gold); color: var(--ink); }
.grb-btn--primary:hover { background: #d8ba63; }
.grb-btn--primary:disabled { background: #e7e2d2; color: #a79f88; cursor: not-allowed; }
.grb-btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.grb-btn--ghost:hover { border-color: var(--gold); }
.grb-btn--block { width: 100%; margin-top: 8px; padding: 13px; }

/* Trip stats */
.grb-stats { display: flex; gap: 10px; margin: 0 0 12px; }
.grb-stat { flex: 1; text-align: center; padding: 8px; background: #f6f7f9; border-radius: 10px; font-size: 13px; color: var(--muted); }
.grb-stat span { display: block; font-size: 19px; font-weight: 800; color: var(--gold); }

/* Fleet cards */
.grb-panel__note { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.vehicle-card {
  display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 10px;
  padding: 9px 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer;
}
.vehicle-card:hover { border-color: var(--gold); }
.vehicle-card.is-selected { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,.2); }
.vehicle-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.vehicle-card__img { width: 54px; height: 40px; object-fit: cover; border-radius: 8px; }
.vehicle-card__name { display: block; font-size: 14px; font-weight: 700; color: var(--ink); }
.vehicle-card__meta { font-size: 12px; color: var(--muted); }
.vehicle-card__price { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.vehicle-card__amount { font-size: 16px; font-weight: 800; color: var(--ink); }
.card-original-price { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.vehicle-card .book-btn { padding: 6px 12px; font-size: 13px; }

/* Modal (shared look with the route page) */
.grb-modal { position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(14,22,36,.62); }
.grb-modal.is-open { display: flex; }
.grb-modal__box { position: relative; width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto; background: #fff; border-radius: 16px; padding: 26px; }
.grb-modal__box h2 { margin: 0 0 14px; font-size: 20px; color: var(--ink); }
.grb-modal__close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #f0f0f2; font-size: 20px; cursor: pointer; color: var(--muted); }
.grb-modal__close:hover { background: var(--ink); color: #fff; }
.grb-modal__details { border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px; margin-bottom: 16px; }
.grb-modal__row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid #f0f1f3; font-size: 14px; }
.grb-modal__row:last-child { border-bottom: 0; }
.grb-modal__row span:first-child { color: var(--muted); }
.grb-modal__row span:last-child { color: var(--ink); font-weight: 600; text-align: right; }
.grb-modal__row--total span { font-size: 17px; font-weight: 800; color: var(--ink); }
.grb-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.grb-field label { font-size: 12px; font-weight: 600; color: var(--ink); }
.grb-field input { padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; background: #fbfbfc; }
.grb-field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,.18); }
.grb-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grb-modal__hint { font-size: 12px; color: var(--muted); text-align: center; margin: 12px 0 0; }
.grb-optional { text-transform: none; font-weight: 400; opacity: .55; }

/* Mobile: panel becomes a bottom sheet */
@media (max-width: 640px) {
  .grb-search { height: calc(100vh - 60px); }
  .grb-search__panel {
    top: auto; bottom: 0; left: 0; right: 0; width: 100%; max-width: 100%;
    max-height: 72%; border-radius: 16px 16px 0 0;
  }
  .grb-field-row { grid-template-columns: 1fr; }
}
