/* -----------------------------------------------------------------
   location-map.css — header location orb + "trips near me" 3D map modal
   (markup: includes/header.php orb; modal built by js/map/location-map.js)
   ----------------------------------------------------------------- */

:root {
  --ft-coral: #ff5a5f;
  --ft-coral-dark: #e14e50;
  --ft-ink: #1f2937;
  --ft-muted: #6b7280;
}

/* ---------- Header orb ---------- */
.location-orb {
  position: absolute;
  top: 50%;
  right: 10%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.75) 0 7%, rgba(255,255,255,0) 32%),
    radial-gradient(circle at 50% 55%, #ff7a7e 0%, var(--ft-coral) 55%, #c9393e 100%);
  box-shadow:
    0 6px 16px rgba(225,78,80,.35),
    inset 0 -4px 8px rgba(0,0,0,.18);
  transition: transform .2s ease, box-shadow .2s ease;
  z-index: 5;
  -webkit-tap-highlight-color: transparent;
}
.location-orb svg { width: 46%; height: 46%; position: relative; z-index: 1; }
.location-orb:hover { transform: translateY(-50%) scale(1.06); box-shadow: 0 10px 22px rgba(225,78,80,.45), inset 0 -4px 8px rgba(0,0,0,.18); }
.location-orb:active { transform: translateY(-50%) scale(.96); }
.location-orb:focus-visible { outline: 3px solid rgba(255,90,95,.45); outline-offset: 3px; }

/* soft radar ring */
.location-orb__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--ft-coral);
  animation: ft-orb-pulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes ft-orb-pulse {
  0%   { transform: scale(1);   opacity: .7; }
  100% { transform: scale(1.7); opacity: 0; }
}

@media (max-width: 768px) {
  .location-orb { right: 5%; width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .location-orb__pulse { animation: none; opacity: 0; }
}

/* ---------- Modal shell ---------- */
.ftmap-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(17, 24, 39, .55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity .2s ease;
}
.ftmap-backdrop[hidden] { display: none; }
.ftmap-backdrop.is-open { opacity: 1; }

.ftmap-dialog {
  position: relative;
  width: min(1100px, 100%);
  height: min(780px, calc(100vh - 32px));
  height: min(780px, calc(100dvh - 32px));
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  font-family: 'Nunito Sans', 'Quicksand', system-ui, sans-serif;
  transform: translateY(12px) scale(.98);
  transition: transform .25s ease;
}
.ftmap-backdrop.is-open .ftmap-dialog { transform: none; }

@media (max-width: 768px) {
  .ftmap-backdrop { padding: 0; }
  .ftmap-dialog { width: 100%; height: 100vh; height: 100dvh; border-radius: 0; }
}

.ftmap-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 18px;
  border-bottom: 1px solid #f1f1f1;
  background: #fff;
  z-index: 2;
}
.ftmap-head__text { flex: 1; min-width: 0; }
.ftmap-title {
  margin: 0;
  font: 700 18px/1.2 'Quicksand', 'Nunito Sans', sans-serif;
  color: var(--ft-ink);
}
.ftmap-status {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ft-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ftmap-close {
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #f5f5f5;
  color: var(--ft-ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.ftmap-close:hover { background: #ffe9ea; color: var(--ft-coral-dark); }

.ftmap-body { position: relative; flex: 1; min-height: 0; background: #e9eef2; }
/* extra specificity: MapLibre adds .maplibregl-map { position: relative }
   to the container, which would otherwise collapse it to 0px tall */
.ftmap-body .ftmap-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* loading / error veil */
.ftmap-veil {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  background: rgba(255,255,255,.85);
  color: var(--ft-ink);
  font-size: 15px;
  text-align: center;
  padding: 24px;
  z-index: 3;
}
.ftmap-veil[hidden] { display: none; }
.ftmap-spinner {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid #ffd6d7;
  border-top-color: var(--ft-coral);
  animation: ft-spin .8s linear infinite;
}
@keyframes ft-spin { to { transform: rotate(360deg); } }

/* ---------- Floating controls ---------- */
.ftmap-dock {
  position: absolute;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: calc(100% - 32px);
  max-width: 440px;
  z-index: 2;
  pointer-events: none;
}
.ftmap-dock > * { pointer-events: auto; }

.ftmap-notice {
  background: #fff;
  color: var(--ft-ink);
  font-size: 14px;
  line-height: 1.35;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  text-align: center;
}
.ftmap-notice[hidden] { display: none; }

.ftmap-actions { display: flex; gap: 10px; }
.ftmap-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  font: 700 15px/1 'Nunito Sans', sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
  transition: transform .15s ease, background-color .15s ease;
}
.ftmap-btn svg { width: 18px; height: 18px; flex: none; }
.ftmap-btn:active { transform: scale(.97); }
.ftmap-btn:disabled { opacity: .5; cursor: default; }
.ftmap-btn--primary { background: var(--ft-coral); color: #fff; }
.ftmap-btn--primary:hover:not(:disabled) { background: var(--ft-coral-dark); }
.ftmap-btn--ghost { background: #fff; color: var(--ft-ink); }
.ftmap-btn--ghost:hover:not(:disabled) { background: #f7f7f7; }
.ftmap-btn.is-nudging { animation: ft-nudge 1.6s ease-in-out 2; }
@keyframes ft-nudge {
  0%, 100% { box-shadow: 0 6px 18px rgba(0,0,0,.2), 0 0 0 0 rgba(255,90,95,.55); }
  50%      { box-shadow: 0 6px 18px rgba(0,0,0,.2), 0 0 0 12px rgba(255,90,95,0); }
}

/* ---------- Markers ---------- */
.ftmap-pin {
  position: relative;
  width: 44px;
  height: 54px;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: none;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.3));
}
.ftmap-pin__body {
  position: absolute;
  left: 2px; top: 0;
  width: 40px; height: 40px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--ft-coral);
  border: 3px solid #fff;
  box-sizing: border-box;
  transition: transform .15s ease;
}
.ftmap-pin--featured .ftmap-pin__body { background: #f59e0b; }
/* not featured and not bookable today */
.ftmap-pin--later .ftmap-pin__body { background: #9ca3af; }
.ftmap-pin--later { filter: drop-shadow(0 3px 4px rgba(0,0,0,.2)); }
.ftmap-pin__icon {
  position: absolute;
  left: 2px; top: 0;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  color: #fff;
}
.ftmap-pin__icon svg { width: 22px; height: 22px; }
.ftmap-pin__icon i { font-size: 17px; line-height: 1; color: #fff; }
.ftmap-pin:hover .ftmap-pin__body,
.ftmap-pin:focus-visible .ftmap-pin__body { transform: rotate(-45deg) scale(1.1); }
.ftmap-pin:focus-visible { outline: none; }
.ftmap-pin__count {
  position: absolute;
  top: -6px; right: -4px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--ft-ink);
  color: #fff;
  font: 700 11px/20px 'Nunito Sans', sans-serif;
  text-align: center;
  border: 2px solid #fff;
}

/* the person's own location */
.ftmap-me {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #2563eb;
  border: 3px solid #fff;
  box-shadow: 0 0 0 0 rgba(37,99,235,.5), 0 2px 6px rgba(0,0,0,.3);
  animation: ft-me 2s ease-out infinite;
}
@keyframes ft-me {
  0%   { box-shadow: 0 0 0 0 rgba(37,99,235,.45), 0 2px 6px rgba(0,0,0,.3); }
  100% { box-shadow: 0 0 0 18px rgba(37,99,235,0), 0 2px 6px rgba(0,0,0,.3); }
}

/* ---------- Popup ---------- */
.ftmap-popup .maplibregl-popup-content {
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  font-family: 'Nunito Sans', sans-serif;
}
.ftmap-popup .maplibregl-popup-close-button {
  width: 28px; height: 28px;
  top: 6px; right: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  font-size: 18px;
  z-index: 1;
}
.ftmap-card { display: block; width: 250px; color: inherit; text-decoration: none; }
.ftmap-card + .ftmap-card { border-top: 1px solid #f0f0f0; }
.ftmap-card__img { display: block; width: 100%; height: 120px; object-fit: cover; background: #f3f4f6; }
.ftmap-card__body { display: block; padding: 10px 12px 12px; }
.ftmap-card__type, .ftmap-card__meta { display: block; }
.ftmap-card__type {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ft-coral-dark);
}
.ftmap-card__title { margin: 2px 0 4px; font-size: 15px; font-weight: 700; line-height: 1.25; color: var(--ft-ink); }
.ftmap-card__meta { font-size: 12px; color: var(--ft-muted); }
.ftmap-card__cta { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--ft-coral); }
.ftmap-card:hover .ftmap-card__cta { text-decoration: underline; }
/* compact rows when several trips share one meeting point */
.ftmap-list { max-height: 300px; overflow-y: auto; }
.ftmap-list .ftmap-card { display: flex; gap: 10px; align-items: center; padding: 10px 12px; width: 270px; box-sizing: border-box; }
.ftmap-list .ftmap-card__img { width: 56px; height: 56px; border-radius: 8px; flex: none; }
.ftmap-list .ftmap-card__body { padding: 0; min-width: 0; }
.ftmap-list .ftmap-card__cta { display: none; }
.ftmap-list-head { padding: 10px 40px 6px 12px; font-size: 13px; font-weight: 700; color: var(--ft-ink); }

body.ftmap-lock { overflow: hidden; }