/* ═══════════════════════════════════════════
   FOLLOWER — explore.css
   Pantalla de exploración: care strip, mapa,
   bottom bar sólida, style selector
   ═══════════════════════════════════════════ */

/* ── PANTALLA EXPLORACIÓN ── */

#screen-explore {
  background: var(--color-night);
  /* position: fixed; inset: 0 viene de .screen en main.css — no sobreescribir */
}

/* ── CARE STRIP — contexto siempre visible arriba ── */

.care-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-notch);
  background: var(--color-night);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-lg);
  height: 32px;
  gap: 0;
  transition: opacity 0.3s ease;
}

/* Care strip se oculta cuando la care card ocupa su lugar */
.care-strip.care-active {
  opacity: 0;
  pointer-events: none;
}

/* ── BIENVENIDA DE CIUDAD — texto sobre el mapa ── */

.city-welcome {
  position: absolute;
  top: 50%;
  left: var(--space-xl);
  right: var(--space-xl);
  transform: translateY(-50%);
  z-index: var(--z-card);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--color-ice);
  text-align: center;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.city-welcome.visible {
  opacity: 1;
  pointer-events: auto;
}

.city-welcome.hidden {
  display: none !important;
}

.cs-item {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.cs-icon {
  font-size: 11px;
  line-height: 1;
}

.cs-val {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: var(--weight-regular);
  color: var(--color-smoke-2);
  letter-spacing: 0.04em;
  transition: color var(--transition-base);
}

.cs-val.alert {
  color: var(--color-gold);
}

.cs-sep {
  width: 1px;
  height: 12px;
  background: var(--color-border);
  flex-shrink: 0;
}

/* ── MAPA ── */

#map {
  position: absolute;
  inset: 0;
  z-index: var(--z-map);
  width: 100%;
  height: 100%;
}

/* ── USUARIO EN EL MAPA — punto azul sístole ── */

.user-marker {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-systole);
  border: 3px solid var(--color-ice);
  position: relative;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(26, 82, 118, 0.5);
}

.user-pulse {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(26, 82, 118, 0.5);
  animation: user-pulse 2s ease-out infinite;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.user-pulse:nth-child(2) { animation-delay: 0.5s; }

@keyframes user-pulse {
  0%   { width: 16px; height: 16px; opacity: 0.8; }
  100% { width: 60px; height: 60px; opacity: 0; }
}

/* ── HISTORIA MARKERS (ex POI markers) ── */

.poi-marker-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  animation: poi-float 3s ease-in-out infinite;
}

@keyframes poi-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-3px); }
}

.poi-pin {
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all var(--transition-fast);
}

.poi-pin-inner {
  transform: rotate(45deg);
  font-size: 13px;
  line-height: 1;
}

.poi-pin.active {
  background: var(--color-diastole);
  width: 38px;
  height: 38px;
  box-shadow: 0 3px 12px rgba(192, 57, 43, 0.5);
}

.poi-pin.nearby { background: var(--color-systole); }
.poi-pin.far    { background: var(--color-border); }

.poi-pin.active .poi-pin-inner { font-size: 16px; }

.poi-pin-label {
  margin-top: var(--space-xs);
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: var(--weight-regular);
  color: var(--color-ice);
  background: rgba(10, 16, 24, 0.75);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.poi-pin-label.active {
  color: #fff;
  background: rgba(192, 57, 43, 0.85);
}

/* ── COLUMNA DERECHA — zoom + brújula ── */

.map-zoom-controls {
  position: absolute;
  right: 14px;
  bottom: 110px;
  z-index: var(--z-ui);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.map-zoom-btn {
  width: 34px;
  height: 34px;
  background: rgba(10, 16, 24, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--color-ice);
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.map-zoom-btn:active {
  background: rgba(26, 82, 118, 0.4);
  transform: scale(0.93);
}

/* ── BOTÓN BRÚJULA ── */

.map-compass-btn {
  width: 34px;
  height: 34px;
  background: rgba(10, 16, 24, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: visible;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

/* Estado activo — borde rojo */
.map-compass-btn.active {
  background: rgba(192, 57, 43, 0.12);
  border-color: rgba(192, 57, 43, 0.5);
}

/* Estado latiendo — corazón más visible */
.map-compass-btn.beating .compass-heart {
  fill: rgba(192, 57, 43, 0.28);
  stroke: rgba(192, 57, 43, 0.6);
  animation: heart-pulse 0.45s ease-in-out;
}

.compass-svg {
  width: 22px;
  height: 22px;
}

/* Ring de pulso exterior al latir */
.compass-pulse-ring {
  position: absolute;
  inset: -3px;
  border-radius: 10px;
  border: 1.5px solid rgba(192, 57, 43, 0.55);
  pointer-events: none;
  animation: pulse-ring-anim 0.45s ease-out forwards;
}

/* ── ANIMACIONES BRÚJULA ── */

@keyframes heart-pulse {
  0%   { fill: rgba(192,57,43,.10); stroke: rgba(192,57,43,.28); }
  35%  { fill: rgba(192,57,43,.35); stroke: rgba(192,57,43,.75); }
  65%  { fill: rgba(192,57,43,.18); stroke: rgba(192,57,43,.45); }
  85%  { fill: rgba(192,57,43,.28); stroke: rgba(192,57,43,.60); }
  100% { fill: rgba(192,57,43,.10); stroke: rgba(192,57,43,.28); }
}

@keyframes pulse-ring-anim {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* Aguja — transición suave cuando empieza a rotar */
#compassNeedle {
  transition: transform 0.15s ease-out;
}

/* ── BOTTOM BAR SÓLIDA — sin gradiente, sin blur ── */

.bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-ui);
  background: var(--color-night);
  border-top: 1px solid var(--color-border);
}

/* ── ESTADO SÍSTOLE — dos pills + corazón centro ── */

.bar-systole {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--space-xl) 24px;
  gap: var(--space-sm);
}

/* ── PILLS SIMÉTRICOS ── */

.bar-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-pill);
  padding: 6px 11px;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex: 1;
  min-width: 0;
  max-width: 120px;
}

.bar-pill-left {
  background: rgba(26, 82, 118, 0.12);
  border: 1px solid rgba(26, 82, 118, 0.35);
  justify-content: flex-start;
}

.bar-pill-right {
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.25);
  justify-content: flex-end;
}

.bar-pill:active {
  transform: scale(0.96);
  opacity: 0.85;
}

.bar-pill-icon {
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
}

.bar-pill-name {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: var(--weight-regular);
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.bar-pill-left  .bar-pill-name { color: #5dade2; }
.bar-pill-right .bar-pill-name { color: var(--color-ice); }

.bar-pill-right .bar-pill-name.muted { color: var(--color-smoke-2); }

.bar-pill-chevron {
  color: var(--color-smoke-2);
  flex-shrink: 0;
}

/* ── CORAZÓN-BRÚJULA ── */

.bar-heart-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.heart-compass {
  width: 52px;
  height: 52px;
  transition: transform 0.6s ease;
  filter: drop-shadow(0 0 4px rgba(192, 57, 43, 0.15));
}

body.phase-diastole .heart-compass {
  filter: drop-shadow(0 0 6px rgba(192, 57, 43, 0.35));
}

/* ── ESTADO DIÁSTOLE — mini-player ── */

.bar-diastole {
  padding: 10px var(--space-xl) 28px;
}

.bar-poi-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: var(--space-sm);
}

.bar-poi-name {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--color-ice);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  cursor: pointer;
}

.bar-poi-name:active { opacity: 0.75; }

.bar-poi-dist {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: var(--weight-light);
  color: var(--color-smoke-2);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.bar-progress {
  height: 2px;
  background: var(--color-border-2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}

.bar-progress-fill,
#audioProgressFill {
  height: 100%;
  width: 0%;
  background: var(--color-diastole);
  border-radius: 2px;
  transition: width 1s linear;
}

.bar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bar-ctrl-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.bar-style-lbl {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: var(--weight-light);
  color: var(--color-smoke-2);
  letter-spacing: 0.08em;
}

.bar-ctrl-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.btn-narr-pause,
.btn-narr-stop {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.btn-narr-pause {
  background: rgba(26, 82, 118, 0.2);
  border: 1px solid rgba(26, 82, 118, 0.45);
}

.btn-narr-stop {
  background: rgba(192, 57, 43, 0.12);
  border: 1px solid rgba(192, 57, 43, 0.4);
}

.btn-narr-pause:active,
.btn-narr-stop:active {
  opacity: 0.7;
  transform: scale(0.93);
}

/* ── STYLE SELECTOR — bottom sheet sobre el mapa ── */

.style-selector {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-card);
  background: var(--color-navy);
  border-top: 0.5px solid var(--color-border);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  padding: var(--space-md) var(--space-xl) 48px;
  animation: card-rise 0.38s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

.style-selector.hidden {
  display: none !important;
}

@keyframes card-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.style-handle {
  width: 34px;
  height: 3px;
  background: var(--color-border);
  border-radius: 3px;
  margin: 0 auto var(--space-lg);
}

.style-title {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: var(--weight-medium);
  color: var(--color-smoke-3);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.style-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.style-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.style-card:active {
  background: rgba(26, 82, 118, 0.08);
  transform: scale(0.99);
}

.style-card.active {
  border-color: var(--color-systole);
  background: rgba(26, 82, 118, 0.1);
}

.style-emoji {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
}

.style-name {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: var(--weight-regular);
  color: var(--color-ice);
  margin-bottom: 2px;
}

.style-desc {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: var(--weight-light);
  color: var(--color-smoke-2);
  letter-spacing: 0.02em;
}

/* ── MODO RECORRIDO ── */

.route-path {
  stroke: var(--color-gold);
  stroke-width: 2;
  stroke-dasharray: 5, 4;
  fill: none;
  opacity: 0.7;
}

.route-indicator {
  position: absolute;
  top: 42px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-ui);
  background: rgba(10, 16, 24, 0.82);
  border: 0.5px solid var(--color-gold);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.route-indicator.hidden { display: none !important; }

.route-indicator-name {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: var(--weight-light);
  color: var(--color-gold);
  letter-spacing: 0.06em;
}

.route-indicator-progress {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: var(--weight-light);
  color: var(--color-smoke-3);
}
