/**
 * CSS bridge for the demo simulation.
 * Floating plan-selector panel, first-visit popup, sim notice styles.
 */

:root {
  --chrome-height: 77px;  /* site nav only — no chrome bar in simulation */
}

/* ---------- Demo section override ---------- */

.demo-section {
  padding: 0;
}

/* Main page — enough padding so the title pane clears the fixed nav fully */
#demo-root #main-page {
  padding-top: 16px;
}

/* ---------- Floating panel ---------- */

.sim-panel {
  position: fixed;
  top: calc(var(--chrome-height) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;

  display: flex;
  align-items: center;
  gap: 8px;

  background: rgba(25, 30, 40, 0.95);
  border: 1px dashed rgba(140, 180, 220, 0.35);
  border-radius: 2px;
  padding: 5px 12px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  user-select: none;
  white-space: nowrap;
}

.sim-panel-dragging {
  opacity: 0.92;
  cursor: grabbing;
}

.sim-panel-label {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #c44040;
  flex-shrink: 0;
}

.sim-panel-pills {
  display: flex;
  gap: 3px;
}

.sim-panel-grip {
  cursor: grab;
  color: #c44040;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0 1px 0 4px;
  flex-shrink: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  margin-left: 2px;
}
.sim-panel-dragging .sim-panel-grip {
  cursor: grabbing;
}

/* ---------- Plan pills ---------- */

.sim-pill {
  padding: 2px 9px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  background: transparent;
  color: rgba(200, 215, 230, 0.6);
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  line-height: 1.5;
}

.sim-pill:hover {
  background: rgba(110, 168, 199, 0.10);
  border-color: rgba(110, 168, 199, 0.35);
  color: rgba(230, 237, 245, 0.85);
}

.sim-pill:focus-visible {
  outline: 2px solid var(--accent, #6ea8c7);
  outline-offset: 1px;
}

.sim-pill-active {
  background: rgba(110, 168, 199, 0.20);
  border-color: rgba(110, 168, 199, 0.55);
  color: #e6edf5;
}

/* ---------- Mobile: collapsible selector ---------- */

.sim-panel-toggle {
  display: none;
}

@media (max-width: 600px) {
  .sim-panel {
    left: 8px;
    right: 8px;
    transform: none;
    flex-wrap: wrap;
    white-space: normal;
    padding: 5px 10px;
  }

  .sim-panel-grip {
    display: none;
  }

  .sim-panel-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px dashed rgba(110, 168, 199, 0.3);
    border-radius: 2px;
    color: #e6edf5;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 2px 10px;
    cursor: pointer;
    line-height: 1.5;
  }
  .sim-panel-toggle-arrow {
    font-size: 0.55rem;
    transition: transform 0.15s;
  }
  .sim-panel-toggle-arrow.open {
    transform: rotate(180deg);
  }

  .sim-panel-pills {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 4px;
    padding-top: 6px;
  }
  .sim-panel-pills.sim-pills-open {
    display: flex;
  }
  .sim-panel-pills.sim-pills-open .sim-pill {
    text-align: left;
    border-radius: 2px;
    padding: 6px 12px;
  }
}

/* ---------- First-visit popup ---------- */

.demo-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', system-ui, sans-serif;
}

.demo-popup-card {
  background: #22262e;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  padding: 32px 40px;
  max-width: 520px;
  color: #e4e6eb;
  text-align: center;
}

.demo-popup-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: #e4e6eb;
}

.demo-popup-card p {
  font-size: 0.88rem;
  color: #8b919a;
  line-height: 1.6;
  margin: 0 0 12px;
}

.demo-popup-card p:last-of-type {
  margin-bottom: 24px;
}

.demo-popup-btn {
  background: #6699cc;
  color: #fff;
  border: none;
  border-radius: 2px;
  padding: 10px 28px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', system-ui, sans-serif;
  transition: background 0.15s;
}

.demo-popup-btn:hover {
  background: #5580aa;
}

/* ---------- Simulation notice ---------- */

.sim-notice {
  color: #6b7280;
  font-size: 0.78rem;
  font-style: italic;
  padding: 8px 12px;
  margin-top: 8px;
  border-left: 2px solid rgba(107, 114, 128, 0.3);
}

/* ---------- Demo page overrides ---------- */

/* Item 27: Hide site footer on demo page */
body[data-page="demo"] #site-footer { display: none; }

/* Item 28: Keep title pane centered on one line */
#demo-root .mp-title-pane h1 { white-space: nowrap; }

/* Item 29: Prevent background bleed — solid bg from nav edge to bottom */
#demo-root { background: #101923; min-height: 100vh; position: relative; z-index: 1; }

/* Hide any site hero/subtitle content that might show behind the simulation */
body[data-page="demo"] main { background: #101923; }

/* brand-sub subtitle is part of site branding — visible on both demo and pricing */
