/* oPivots Demo Site — extends styles.css variables */

/* ── Demo banner ──────────────────────────────────────────────────── */
.demo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 100;
  position: relative;
}
.demo-banner-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8rem;
}
.demo-banner-link:hover {
  text-decoration: underline;
}

/* ── Landing page ─────────────────────────────────────────────────── */
.demo-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
}

.demo-brand {
  text-align: center;
  margin-top: 60px;
  margin-bottom: 12px;
}
.demo-brand h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #d8dbe2;
  letter-spacing: 0.04em;
  margin: 0;
}
.demo-tagline {
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
  margin: 8px 0 0;
  letter-spacing: 0.02em;
}

/* ── Navigation tabs ──────────────────────────────────────────────── */
.demo-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 24px 0;
}
.demo-nav-btn {
  display: inline-block;
  padding: 8px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--speed), border-color var(--speed);
}
.demo-nav-btn:hover {
  background: var(--line);
}
.demo-nav-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Info zone ────────────────────────────────────────────────────── */
.demo-info-zone {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 32px;
}
.demo-info-zone .panel {
  padding: 20px 24px;
}
.demo-info-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius) var(--radius) 0 0;
  letter-spacing: 0.03em;
}
.demo-info-body {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 20px 24px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.7;
}
.demo-info-body p {
  margin: 0 0 12px;
}
.demo-info-body p:last-child {
  margin-bottom: 0;
}

/* ── Case cards ───────────────────────────────────────────────────── */
.demo-cases {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 48px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.demo-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--speed);
}
.demo-card:hover {
  border-color: var(--accent);
}
.demo-card-seed-type {
  min-width: 100px;
  padding: 7px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.03em;
}
.demo-card-case-name {
  min-width: 130px;
  padding: 7px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-card-seed-value {
  flex: 1;
  padding: 7px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-card-start {
  padding: 7px 18px;
  text-decoration: none;
  font-size: 0.82rem;
  white-space: nowrap;
}
/* Grouped case — visually distinct */
.demo-card-grouped {
  border-left: 3px solid var(--accent);
}
.demo-card-grouped .demo-card-seed-type {
  background: rgba(34, 197, 94, 0.12);
  color: var(--accent);
  border-color: rgba(34, 197, 94, 0.3);
}
.demo-card-grouped .demo-card-seed-value {
  font-family: monospace;
}

/* ── ACCESS page ──────────────────────────────────────────────────── */
.demo-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 48px;
}
.demo-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.demo-section h2 {
  font-size: 1.1rem;
  margin: 0 0 12px;
  color: var(--text);
}
.demo-section p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 0 10px;
}
.demo-section a {
  color: var(--accent);
}
.demo-contact {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 8px;
  transition: opacity var(--speed);
}
.demo-contact:hover {
  opacity: 0.85;
}

/* ── Competitor comparison table ──────────────────────────────────── */
.demo-comparison {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 16px;
}
.demo-comparison th {
  background: var(--bg);
  padding: 8px 12px;
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.demo-comparison td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  white-space: nowrap;
}
.demo-comparison tr:last-child td {
  border-bottom: none;
}
.demo-comparison .check {
  color: #4caf50;
  font-weight: 700;
}
.demo-comparison .cross {
  color: var(--muted);
}
.demo-comparison .highlight-col {
  background: rgba(91, 141, 239, 0.06);
}

/* ── FAQ accordion ────────────────────────────────────────────────── */
.demo-faq details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}
.demo-faq summary {
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.demo-faq summary::before {
  content: "+";
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 400;
  min-width: 16px;
}
.demo-faq details[open] summary::before {
  content: "\2212";
}
.demo-faq .faq-body {
  padding: 0 18px 16px 44px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* ── Stats highlight ──────────────────────────────────────────────── */
.demo-stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.demo-stat {
  flex: 1;
  min-width: 150px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.demo-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}
.demo-stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Dotted underline tooltip (competitor table) ──────────────────── */
.demo-comparison .dotted {
  border-bottom: 1px dotted var(--muted);
  cursor: help;
}

/* ── Mobile warning overlay ───────────────────────────────────────── */
.demo-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.demo-mobile-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  max-width: 400px;
  text-align: center;
}
.demo-mobile-box h2 {
  font-size: 1.1rem;
  color: var(--text);
  margin: 0 0 14px;
}
.demo-mobile-box p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0 0 18px;
}
.demo-mobile-dismiss {
  padding: 8px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
}

/* ── Case viewer side panels ──────────────────────────────────────── */
.demo-side-panel {
  position: absolute;
  top: 48px;
  width: 340px;
  z-index: 50;
  background: #161920;
  border: 1px dashed rgba(91, 141, 239, 0.3);
  border-radius: var(--radius);
  font-size: 0.82rem;
  line-height: 1.55;
  overflow: hidden;
}
.demo-side-left {
  left: max(12px, calc((100vw - 1680px) / 4));
}
.demo-side-right {
  right: max(12px, calc((100vw - 1680px) / 4));
}
.demo-side-header {
  padding: 8px 14px;
  background: rgba(91, 141, 239, 0.1);
  border-bottom: 1px dashed rgba(91, 141, 239, 0.3);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.demo-side-body {
  padding: 12px 14px;
  color: var(--muted);
}
.demo-side-body p {
  margin: 0 0 10px;
}
.demo-side-body ul {
  margin: 0 0 10px;
  padding-left: 16px;
}
.demo-side-body li {
  margin-bottom: 6px;
}
.demo-side-body strong {
  color: var(--text);
}
.demo-interest-list li {
  cursor: default;
}

/* Walkthrough button */
.demo-walkthrough-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  margin-top: 12px;
  background: rgba(91, 141, 239, 0.12);
  border: 1px solid rgba(91, 141, 239, 0.3);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--speed);
}
.demo-walkthrough-btn:hover {
  background: rgba(91, 141, 239, 0.22);
}

/* ── Walkthrough overlay ─────────────────────────────────────────── */
/* Empty overlay: click-catcher only, no dim. The dim comes from a huge
   outward box-shadow on .wt-highlight itself, which works regardless of
   nested stacking contexts that would otherwise block a z-index trick. */
.wt-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: transparent;
  pointer-events: auto;
}
.wt-highlight {
  position: relative;
  z-index: 10000;
  border-radius: var(--radius, 12px);
  /* ring + outward shadow that dims EVERYTHING else on screen. Fallbacks
     on var() are required because --accent isn't defined in :root — without
     the fallback the entire box-shadow becomes invalid and no dim appears. */
  box-shadow:
    0 0 0 4px var(--accent, #5b8def),
    0 0 24px rgba(91, 141, 239, 0.55),
    0 0 0 10000px rgba(0, 0, 0, 0.62) !important;
  transition: box-shadow 180ms ease-out;
}
.wt-tooltip {
  /* Anchored to the bottom-right corner of the viewport, not the target.
     Targets expand into large panels; pinning to corner keeps tooltip
     always visible without covering the highlighted content. */
  position: fixed;
  z-index: 10002;
  right: 24px;
  bottom: 24px;
  width: 360px;
  max-width: calc(100vw - 48px);
  background: #1a1d23;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  padding: 16px;
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.55;
}
@media (max-width: 720px) {
  /* On narrow screens the tooltip moves to the top-center so it doesn't
     cover mobile UI chrome at the bottom. */
  .wt-tooltip { right: 12px; left: 12px; width: auto; bottom: auto; top: 12px; }
}
.wt-tooltip-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--accent);
}
.wt-tooltip-body {
  color: var(--muted);
  margin-bottom: 14px;
}
.wt-tooltip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wt-tooltip-step {
  font-size: 0.75rem;
  color: var(--muted);
}
.wt-tooltip-actions {
  display: flex;
  gap: 6px;
}
.wt-btn {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  transition: background var(--speed);
}
.wt-btn:hover {
  background: var(--line);
}
.wt-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.wt-btn-primary:hover {
  opacity: 0.85;
}

/* Hide side panels on narrow screens */
@media (max-width: 1600px) {
  .demo-side-left { display: none; }
  .demo-side-right { display: none; }
}

/* ── Footer ───────────────────────────────────────────────────────── */
.demo-footer {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.75rem;
  border-top: 1px solid var(--line);
  margin-top: auto;
  width: 100%;
}
