/* ====================================================
   places/styles.css — Explore India Dashboard
   ==================================================== */

:root {
  /* Core variables */
  --ring: var(--glass-line-strong);
  --card: rgba(13, 23, 42, 0.45);
  --card-solid: #0b1324;
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(99, 102, 241, 0.25);
  --card-glow: rgba(99, 102, 241, 0.15);
  --card-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  
  --base1: #030712;
  --accent: #6366f1; /* Indigo 500 */
  --accent-soft: #a5b4fc; /* Indigo 300 */
  --glass-blur: 24px;
}

html, body {
  height: 100%;
  overflow: hidden; /* map fills the viewport exactly */
  margin: 0;
  color: #f1f5f9;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body.lp-page {
  background: var(--base1);
}

/* ====================================================
   MODERN AURORA BACKGROUND
   ==================================================== */
#starfield {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0%, #1e1b4b 0%, #030712 60%);
}

.lp-aurora.modern {
  position: fixed;
  inset: -10vmax;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(120% 90% at 12% -10%, rgba(99, 102, 241, 0.15), transparent 55%),
              radial-gradient(90% 70% at 100% 0%, rgba(165, 180, 252, 0.1), transparent 50%);
  filter: blur(40px);
}

.lp-aurora.modern::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(3, 7, 18, 0.2) 0%, rgba(3, 7, 18, 0.95) 100%);
  opacity: 1;
}

/* =============================================
   HEADER OVERRIDES (Premium Feel)
   ============================================= */
.site-header {
  background: rgba(3, 7, 18, 0.65) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
}

/* =============================================
   LAYOUT SHELL
   ============================================= */
.map-page {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.map-intro {
  flex: 0 0 auto;
  padding: 16px 24px 8px;
  text-align: center;
  animation: heroReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes heroReveal {
  from { opacity: 0; transform: translateY(20px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.map-intro h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 900;
  letter-spacing: -1px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.map-intro p {
  margin: 0;
  color: #94a3b8;
  font-size: 14.5px;
  font-weight: 500;
}

.map-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  overflow: hidden;
  animation: heroReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.map-sidebar {
  flex: 0 0 320px;
  padding: 16px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

/* =============================================
   SEARCH INPUT & SUGGESTIONS
   ============================================= */
.search-wrap {
  position: relative;
  width: 100%;
}

.input-premium {
  width: 100%;
  padding: 14px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
  backdrop-filter: blur(12px);
  box-sizing: border-box;
}

.input-premium::placeholder { color: #64748b; }

.input-premium:focus {
  border-color: var(--accent);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2), 0 0 0 4px rgba(99, 102, 241, 0.15);
  background: rgba(15, 23, 42, 0.85);
}

.suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 45;
  list-style: none;
  margin: 0;
  padding: 8px;
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  display: none;
  max-height: 40vh;
  overflow: auto;
  box-shadow: var(--card-shadow);
}

.suggestions.show { display: block; }

.suggestions li {
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #f8fafc;
  font-weight: 500;
  transition: background 0.2s ease;
}

.suggestions li:hover {
  background: rgba(255, 255, 255, 0.05);
}

.suggestions .enter-hint {
  font-size: 12px;
  color: #94a3b8;
}

/* =============================================
   GLASS PANELS (Cart Callout, Legend, Preview)
   ============================================= */
.cart-callout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: var(--card-shadow);
}
.cart-callout[hidden] { display: none; }
.cart-callout .btn-ghost { align-self: stretch; text-align: center; color: var(--accent-soft); }

.legend-toggle {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 40;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: var(--accent-soft);
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--card-shadow);
  transition: all 0.2s ease;
}
.legend-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.legend-panel {
  position: fixed;
  left: 24px;
  bottom: 84px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--card-border);
  border-radius: 16px;
  font-size: 13.5px;
  color: #cbd5e1;
  box-shadow: var(--card-shadow);
  animation: legendIn 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.legend-panel[hidden] { display: none; }
@keyframes legendIn {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.legend-item { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.swatch {
  width: 14px; height: 14px; border-radius: 4px; display: inline-block;
  border: 1px solid rgba(255,255,255,0.1);
}
.swatch-default { background: rgba(13, 23, 42, 0.6); }
.swatch-hover { background: rgba(99, 102, 241, 0.4); border-color: rgba(99, 102, 241, 0.8); }
.swatch-match { background: rgba(99, 102, 241, 0.7); border-color: #a5b4fc; }
.swatch-trip { background: #ef4444; }

/* =============================================
   MAP & SVG STYLING
   ============================================= */
#svj-cover {
  flex: 1 1 auto;
  min-width: 0; min-height: 0;
  display: grid; place-items: center;
  padding: 0 24px 24px 0;
  overflow: hidden;
}

#svg-map {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto; display: block;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
}

.state {
  fill: #0f172a;
  stroke: rgba(165, 180, 252, 0.35);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  transition: all 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
  cursor: pointer;
}

.state:hover, .state.list-hover {
  fill: rgba(99, 102, 241, 0.3);
  stroke: rgba(165, 180, 252, 0.8);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 16px rgba(99, 102, 241, 0.6));
}

.state.match {
  fill: rgba(99, 102, 241, 0.6);
  stroke: #c7d2fe;
  stroke-width: 2;
  filter: drop-shadow(0 0 24px rgba(99, 102, 241, 0.8));
}

.state.has-trip {
  stroke: #ef4444;
  stroke-width: 2;
  filter: drop-shadow(0 0 16px rgba(239, 68, 68, 0.5));
}
.trip-badge {
  fill: #ef4444; stroke: #fff; stroke-width: 1.5;
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.8));
}

/* Hover label */
.hover-label {
  position: fixed; z-index: 35; display: none; pointer-events: none;
  padding: 8px 14px; border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  color: #fff; font-weight: 600; font-size: 14px;
}

/* =============================================
   STATE PREVIEW (Option B)
   ============================================= */
.state-preview {
  position: fixed; left: 50%; bottom: 32px;
  transform: translateX(-50%); z-index: 36;
  width: min(440px, 92vw); padding: 24px; display: grid; gap: 16px;
  background: var(--card);
  backdrop-filter: blur(32px) saturate(140%);
  -webkit-backdrop-filter: blur(32px) saturate(140%);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: legendIn 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.state-preview[hidden] { display: none; }

.state-preview h3 {
  margin: 0; padding-right: 32px; font-weight: 800; font-size: 22px; color: #fff;
}
.state-preview-close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); color: #94a3b8; cursor: pointer;
  display: grid; place-items: center; transition: all 0.2s ease;
}
.state-preview-close:hover {
  background: rgba(255,255,255,0.1); color: #fff;
}

.state-preview-body { display: grid; gap: 8px; }
.state-preview-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-size: 14.5px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #f1f5f9; font-weight: 500;
}
.state-preview-price {
  color: var(--accent-soft); font-weight: 700;
}
.state-preview-loading, .state-preview-empty {
  margin: 0; font-size: 14px; color: #94a3b8; text-align: center; padding: 16px 0;
}

@media (max-width: 760px) {
  .map-body { flex-direction: column; }
  .map-sidebar { flex: 0 0 auto; width: 100%; padding: 16px; box-sizing: border-box; }
  #svj-cover { padding: 0 16px 16px; }
}
