/* ═══════════════════════════════════════════════════════════
   VibraZones v1.0 — Zone Engine Panel Styles
   El corazón dinámico de la ciudad: barrios que laten.
   ═══════════════════════════════════════════════════════════ */

/* ─── Panel base ─────────────────────────────────────────── */
.vz-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #06040f;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 64px);
}

/* ─── Header ─────────────────────────────────────────────── */
.vz-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.75rem;
  background: rgba(6, 4, 15, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 196, 0, 0.2);
}

.vz-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vz-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffc400;
  animation: vz-blink 1.5s ease-in-out infinite;
  box-shadow: 0 0 8px #ffc400;
}

@keyframes vz-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.75); }
}

.vz-title {
  font-family: var(--sans, 'Syne', sans-serif);
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffc400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vz-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #888; cursor: pointer;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.vz-close:active { background: rgba(255,255,255,0.12); }

/* ─── City Pulse Bar ─────────────────────────────────────── */
.vz-city-pulse {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Energy Ring */
.vz-pulse-ring {
  position: relative;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 50%;
  background: conic-gradient(
    var(--ring-color, #ffc400) 0% var(--ring-pct, 50%),
    rgba(255,255,255,0.06) var(--ring-pct, 50%) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  animation: vz-ring-breathe 3s ease-in-out infinite;
  transition: --ring-pct 1s ease, --ring-color 1s ease;
}

.vz-pulse-ring::before {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #06040f;
}

@keyframes vz-ring-breathe {
  0%, 100% { box-shadow: 0 0 0   var(--ring-color, #ffc400); }
  50%       { box-shadow: 0 0 20px color-mix(in srgb, var(--ring-color, #ffc400) 40%, transparent); }
}

.vz-ring-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.vz-ring-val {
  font-family: var(--sans, 'Syne', sans-serif);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}

.vz-ring-label {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: 0.36rem;
  color: #555;
  letter-spacing: 0.06em;
  margin-top: 2px;
  text-transform: uppercase;
}

/* KPI Grid */
.vz-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
  flex: 1;
}

.vz-kpi {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 0.5rem 0.4rem;
  text-align: center;
}

.vz-kpi-val {
  font-family: var(--sans, 'Syne', sans-serif);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}

.vz-kpi-label {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: 0.4rem;
  color: #555;
  margin-top: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ─── Section labels ─────────────────────────────────────── */
.vz-section-label {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: 0.58rem;
  color: #444;
  letter-spacing: 0.12em;
  padding: 0.9rem 1rem 0.4rem;
  text-transform: uppercase;
}

/* ─── Zones list ─────────────────────────────────────────── */
.vz-zones-list {
  padding: 0 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.vz-zone-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 0.75rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.vz-zone-card:active {
  background: rgba(255,255,255,0.07);
  transform: scale(0.99);
}

.vz-zone-card.vz-zone-surge {
  border-color: rgba(255, 0, 85, 0.4);
  background: rgba(255, 0, 85, 0.05);
  animation: vz-surge-pulse 2s ease-in-out infinite;
}

.vz-zone-card.vz-zone-hot {
  border-color: rgba(255, 107, 53, 0.35);
  background: rgba(255, 107, 53, 0.04);
}

@keyframes vz-surge-pulse {
  0%, 100% { box-shadow: 0 0 0   rgba(255, 0, 85, 0); }
  50%       { box-shadow: 0 0 14px rgba(255, 0, 85, 0.25); }
}

.vz-zone-emoji {
  font-size: 1.45rem;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
  line-height: 1;
}

.vz-zone-info {
  flex: 1;
  min-width: 0;
}

.vz-zone-name {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-family: var(--sans, 'Syne', sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(240, 235, 255, 0.9);
  line-height: 1.2;
  margin-bottom: 2px;
}

.vz-zone-status {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: 0.46rem;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.vz-zone-dept {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.vz-zone-bar-wrap {
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 5px;
}

.vz-zone-bar {
  height: 3px;
  border-radius: 2px;
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
  min-width: 3px;
}

.vz-zone-meta {
  display: flex;
  gap: 0.65rem;
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: 0.5rem;
  color: #555;
  flex-wrap: wrap;
}

.vz-zone-spark {
  flex-shrink: 0;
  opacity: 0.8;
}

/* ─── Intel section ──────────────────────────────────────── */
.vz-intel {
  padding: 0 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.vz-intel-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: 0.6rem;
  color: rgba(240,235,255,0.6);
  line-height: 1.5;
}

.vz-intel-surge {
  border-color: rgba(255, 0, 85, 0.3);
  background: rgba(255, 0, 85, 0.05);
  color: #ff6699;
}

.vz-intel-hot {
  border-color: rgba(255, 107, 53, 0.3);
  background: rgba(255, 107, 53, 0.05);
  color: #ff9966;
}

.vz-intel-rising {
  border-color: rgba(0, 255, 136, 0.2);
  background: rgba(0, 255, 136, 0.04);
  color: #66ddaa;
}

.vz-intel-muni {
  border-color: rgba(0, 212, 255, 0.2);
  background: rgba(0, 212, 255, 0.04);
  color: #44bbcc;
}

.vz-intel-icon {
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1.4;
}

/* ─── Municipality CTA ───────────────────────────────────── */
.vz-muni-cta {
  margin: 0 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(0,212,255,0.03));
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.vz-muni-text {
  flex: 1;
}

.vz-muni-title {
  font-family: var(--sans, 'Syne', sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  color: #00d4ff;
  margin-bottom: 3px;
}

.vz-muni-sub {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: 0.5rem;
  color: #446677;
  line-height: 1.4;
}

.vz-muni-badge {
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* ─── Footer ─────────────────────────────────────────────── */
.vz-footer {
  padding: 0.75rem 1rem 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.04);
  text-align: center;
}

.vz-footer-stat {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: 0.5rem;
  color: #333;
  letter-spacing: 0.06em;
}

/* ─── Rank badge on zone card ────────────────────────────── */
.vz-rank-badge {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: 0.55rem;
  font-weight: 700;
  color: #888;
  flex-shrink: 0;
  width: 18px;
  text-align: right;
}

/* ─── Decay indicator ────────────────────────────────────── */
.vz-decay-dot {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #333;
  margin-right: 3px;
  vertical-align: middle;
}
.vz-decay-dot.decaying { background: #554400; }
.vz-decay-dot.stable   { background: #224422; }
.vz-decay-dot.rising   { background: #004422; }
