/* location-picker.css — native styling for SalatiPal's manual location search.
 *
 * Pairs with location-picker.js, which tags the bundle's live suggestion
 * dropdown (.sp-locpick-dd + .sp-locpick-row), the GPS block (.sp-locpick-gps),
 * the "or" divider (.sp-locpick-or) and renders a Recent panel
 * (.sp-locpick-recent). Platform is carried on each element's own
 * data-sp-platform attribute so the rules are self-contained (no route dep).
 *
 * Goal: iOS grouped-inset list / Android Material list, two clean lines per row
 * (bold city / muted country), a pinned "Use current location" row, and Recent.
 */

/* ── Results dropdown: flow in-line, drop the floating emerald-bordered card ── */
.sp-locpick-dd {
  position: relative !important;
  top: auto !important; left: auto !important; right: auto !important;
  margin-top: 8px !important;
  z-index: auto !important;
  border: 0 !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  background: rgba(120, 120, 128, 0.06) !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  overflow: hidden !important;
  max-height: 320px !important;
  overflow-y: auto !important;
}
html.dark .sp-locpick-dd { background: rgba(255, 255, 255, 0.05) !important; }

.sp-locpick-dd > div { padding: 0 !important; }

/* ── Row (shared by suggestions + recent): two-line, large tap target ──────── */
.sp-locpick-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  min-height: 56px !important;
  padding: 9px 14px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  text-align: left !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 120ms ease;
}
.sp-locpick-row + .sp-locpick-row,
.sp-locpick-row + .sp-locpick-recent-row { box-shadow: inset 0 0.5px 0 rgba(60, 60, 67, 0.12); }
html.dark .sp-locpick-row + .sp-locpick-row,
html.dark .sp-locpick-row + .sp-locpick-recent-row { box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.09); }

.sp-locpick-row > .sp-locpick-flex,
.sp-locpick-row > div.flex { display: contents !important; }

/* Leading pin tile */
.sp-locpick-ic {
  flex: 0 0 auto !important;
  width: 34px !important; height: 34px !important;
  display: inline-flex !important; align-items: center; justify-content: center;
  border-radius: 9px !important;
  background: rgba(16, 185, 129, 0.12) !important;
  color: #10b981 !important;
}
.sp-locpick-ic svg { width: 18px !important; height: 18px !important; }
html.dark .sp-locpick-ic { background: rgba(16, 185, 129, 0.18) !important; color: #34d399 !important; }

/* Two text lines */
.sp-locpick-txt { display: flex !important; flex-direction: column !important; min-width: 0 !important; gap: 1px !important; }
.sp-locpick-city {
  font-size: 15px !important; font-weight: 600 !important; line-height: 1.25 !important;
  color: #1c1c1e !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.sp-locpick-country {
  font-size: 13px !important; font-weight: 400 !important; line-height: 1.2 !important;
  color: rgba(60, 60, 67, 0.6) !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
html.dark .sp-locpick-city { color: #f2f2f7 !important; }
html.dark .sp-locpick-country { color: rgba(235, 235, 245, 0.6) !important; }

/* Empty / no-results */
.sp-locpick-empty {
  padding: 18px 16px !important;
  font-size: 14px !important;
  text-align: center !important;
  color: rgba(60, 60, 67, 0.5) !important;
}
html.dark .sp-locpick-empty { color: rgba(235, 235, 245, 0.5) !important; }

/* ── Recent panel (our own element) ─────────────────────────────────────────── */
.sp-locpick-recent {
  display: none;
  margin-top: 8px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(120, 120, 128, 0.06);
}
.sp-locpick-recent.sp-show { display: block; }
html.dark .sp-locpick-recent { background: rgba(255, 255, 255, 0.05); }
.sp-locpick-recent-head {
  padding: 10px 14px 4px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: rgba(60, 60, 67, 0.5);
}
html.dark .sp-locpick-recent-head { color: rgba(235, 235, 245, 0.45); }

/* ── "Use current location" row (restyled GPS block) ────────────────────────── */
.sp-locpick-gps {
  margin-top: 8px !important;
  padding: 12px 14px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: rgba(16, 185, 129, 0.10) !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}
html.dark .sp-locpick-gps { background: rgba(16, 185, 129, 0.14) !important; }
.sp-locpick-gps h3 { font-size: 15px !important; font-weight: 600 !important; color: #047857 !important; margin: 0 !important; }
.sp-locpick-gps p { font-size: 12.5px !important; }
html.dark .sp-locpick-gps h3 { color: #34d399 !important; }
.sp-locpick-gps button {
  flex: 0 0 auto !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  -webkit-tap-highlight-color: transparent;
}

/* Hide the redundant "— or —" divider */
.sp-locpick-or { display: none !important; }

/* ═══ iOS: grouped-inset, hairline separators, system feel ═══════════════════ */
.sp-locpick-dd[data-sp-platform="ios"],
.sp-locpick-recent[data-sp-platform="ios"] {
  background: #ffffff !important;
  border: 0.5px solid rgba(60, 60, 67, 0.13) !important;
  border-radius: 12px !important;
}
html.dark .sp-locpick-dd[data-sp-platform="ios"],
html.dark .sp-locpick-recent[data-sp-platform="ios"] {
  background: #1c1c1e !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}
.sp-locpick-dd[data-sp-platform="ios"] .sp-locpick-row:active,
.sp-locpick-recent[data-sp-platform="ios"] .sp-locpick-row:active { background: rgba(60, 60, 67, 0.08) !important; }
html.dark .sp-locpick-dd[data-sp-platform="ios"] .sp-locpick-row:active,
html.dark .sp-locpick-recent[data-sp-platform="ios"] .sp-locpick-row:active { background: rgba(255, 255, 255, 0.08) !important; }
.sp-locpick-gps[data-sp-platform="ios"] { border-radius: 12px !important; }

/* ═══ Android: Material list, ripple-ish press, slim elevation ═══════════════ */
.sp-locpick-dd[data-sp-platform="android"],
.sp-locpick-recent[data-sp-platform="android"] {
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}
html.dark .sp-locpick-dd[data-sp-platform="android"],
html.dark .sp-locpick-recent[data-sp-platform="android"] {
  background: #2a2a2e !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.30) !important;
}
.sp-locpick-dd[data-sp-platform="android"] .sp-locpick-row,
.sp-locpick-recent[data-sp-platform="android"] .sp-locpick-row { min-height: 60px !important; }
.sp-locpick-dd[data-sp-platform="android"] .sp-locpick-row:active,
.sp-locpick-recent[data-sp-platform="android"] .sp-locpick-row:active { background: rgba(16, 185, 129, 0.10) !important; }
.sp-locpick-dd[data-sp-platform="android"] .sp-locpick-ic,
.sp-locpick-recent[data-sp-platform="android"] .sp-locpick-ic { border-radius: 50% !important; }
.sp-locpick-gps[data-sp-platform="android"] { border-radius: 16px !important; }
