/* ============================================================
   RankVision v2 — Platform & Intelligence Features CSS
   Uses #019cd4 as primary accent throughout
   ============================================================ */

/* ── Platform Module Bar ──────────────────────────────────── */
.platform-bar {
  background: var(--bg-0);
  border-bottom: 1px solid var(--border);
  padding: 0.28rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.platform-bar::-webkit-scrollbar { display: none; }
.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.2rem 0.7rem;
  border-radius: var(--r-full);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
  cursor: pointer;
}
.platform-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.platform-pill.coming {
  opacity: 0.35;
  cursor: not-allowed;
}
.platform-pill:not(.coming):not(.active):hover {
  color: var(--text);
  background: var(--bg-3);
}

/* ── Advanced Filters Chip Group ──────────────────────────── */
.adv-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.28rem 0.75rem;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.14s;
  user-select: none;
}
.adv-chip:hover { border-color: var(--primary-border); color: var(--text); }
.adv-chip.active {
  background: var(--primary-glass);
  border-color: var(--primary-border);
  color: var(--primary);
  font-weight: 700;
}

/* ── Advanced Filters Panel ───────────────────────────────── */
#adv-filter-panel {
  position: fixed;
  top: 0; right: -420px;
  width: min(420px,100vw);
  height: 100vh;
  z-index: 150;
  background: var(--bg-2);
  border-left: 1px solid var(--border-2);
  overflow-y: auto;
  transition: right 0.3s var(--ease);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
}
#adv-filter-panel.open { right: 0; }

/* ── Demand Heatmap Enhancement ───────────────────────────── */
.demand-heatmap-wrap { max-width: 960px; margin: 0 auto; }

/* ── Analysis Steps Loader ────────────────────────────────── */
#analysis-steps { animation: fadeInUp 0.3s var(--ease); }
@keyframes fadeInUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
@keyframes pulse2  { 0%,100% { transform:scale(1); } 50% { transform:scale(1.08); } }
.analysis-step-icon { animation: pulse2 1s ease-in-out infinite; }

/* ── Intelligence Feature Cards ───────────────────────────── */
.intelligence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px,100%),1fr));
  gap: 0.75rem;
}
.intel-card {
  background: var(--glass-medium);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: 0.875rem;
  backdrop-filter: blur(10px);
}
.intel-card-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}
.intel-card-value {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--text);
}
.intel-card-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Seat Stability ───────────────────────────────────────── */
.stability-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: var(--r-full);
  font-size: 0.62rem;
  font-weight: 700;
}
.stability-badge.stable   { background:rgba(34,197,94,0.12); color:#22c55e; border:1px solid rgba(34,197,94,0.25); }
.stability-badge.moderate { background:rgba(245,158,11,0.12);color:#f59e0b; border:1px solid rgba(245,158,11,0.25); }
.stability-badge.volatile { background:rgba(239,68,68,0.12); color:#ef4444; border:1px solid rgba(239,68,68,0.25); }

/* ── Confidence Score ─────────────────────────────────────── */
.confidence-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
}
.confidence-dot.high   { background: #22c55e; box-shadow: 0 0 5px rgba(34,197,94,0.5); }
.confidence-dot.medium { background: #f59e0b; }
.confidence-dot.low    { background: #ef4444; }

/* ── Scenario Sim Modal ───────────────────────────────────── */
.scenario-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary) var(--val,50%), var(--bg-5) var(--val,50%));
  outline: none;
  cursor: pointer;
}
.scenario-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
  border: 2px solid var(--bg-0);
}

/* ── Risk Tolerance Tabs ────────────────────────────────────  */
.risk-tab-group { display: flex; gap: 0.4rem; }
.risk-tab {
  flex: 1;
  padding: 0.45rem 0.5rem;
  border-radius: var(--r-sm);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  border: 1px solid var(--border-2);
  background: var(--bg-3);
  color: var(--text-muted);
  transition: all 0.15s;
}
.risk-tab.active-conservative { background: var(--safe-glass);  border-color: rgba(34,197,94,0.3);  color: #22c55e; }
.risk-tab.active-balanced     { background: var(--primary-glass);border-color: var(--primary-border); color: var(--primary); }
.risk-tab.active-aggressive   { background: var(--dream-glass); border-color: rgba(239,68,68,0.3);  color: #ef4444; }

/* ── Mobile responsive for platform features ──────────────── */
@media (max-width: 767px) {
  #adv-filter-panel { width: 100vw; }
  .intelligence-grid { grid-template-columns: 1fr 1fr; }
  .risk-tab-group { flex-direction: column; }
}
@media (max-width: 400px) {
  .intelligence-grid { grid-template-columns: 1fr; }
}
