/* =============================================================================
   HOME-DEMO-LAPTOP.CSS — ENIBUSINESS Homepage: Laptop Demo Widget
   Scope   : home page only (/index.html)
   Covers  : laptop frame, app chrome, tab nav, TTS player, opportunity graph,
             profile match cards, meeting summary accordion
   Version : 6
   ============================================================================= */


/* ═══════════════════════════════════════════════════════════
   AI MATCHMAKING — Interactive Laptop Frame Demo
   ═══════════════════════════════════════════════════════════ */
.demo-laptop {
  display: block;
  width: min(100%, 1080px);
  margin: 2rem auto 1.5rem;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.22));
}
@media (min-width: 769px) {
  .demo-laptop { width: min(100%, 1160px); }
}

/* ── Laptop physical frame ── */
.demo-laptop__lid {
  background: #191919;
  border-radius: 33px 33px 0 0;
  border: 2px solid #464646;
  border-bottom: none;
  padding: 16px 14px 10px;
  position: relative;
}
.demo-laptop__cam {
  width: 7px;
  height: 7px;
  background: #2e2e2e;
  border-radius: 50%;
  margin: 0 auto 10px;
  border: 1px solid #3a3a3a;
}
.demo-laptop__display {
  background: #000;
  border-radius: 4px;
  overflow: clip;
  height: 600px;
}
.demo-laptop__hinge {
  height: 5px;
  background: #141414;
  border-left: 2px solid #464646;
  border-right: 2px solid #464646;
}
.demo-laptop__base {
  background: linear-gradient(180deg, #1c1c1c 0%, #161616 100%);
  border-radius: 0 0 33px 33px;
  border: 2px solid #464646;
  border-top: none;
  padding: 8px 16px 12px;
  display: flex;
  justify-content: center;
}
.demo-laptop__trackpad {
  width: 17%;
  height: 10px;
  background: #242424;
  border-radius: 5px;
  border: 1px solid #303030;
}


/* ═══════════════════════════════════════════════════════════
   App chrome — exact app fonts, colors, spacing
   font-family: Arial matches AppStyles.css body font
   --text-color: #d3d3d3, --bg-color: #000000
   ═══════════════════════════════════════════════════════════ */
.demo-split-chrome {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #000;
  color: #d3d3d3;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

/* Top bar */
.demo-split-topbar {
  display: flex;
  align-items: center;
  padding: 9px 16px;
  border-bottom: 1px solid #1c1c1c;
  flex-shrink: 0;
  position: relative;
}
.demo-split-back {
  font-size: 14px;
  color: #245AF6;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: default;
}
.demo-split-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 600;
  color: #d3d3d3;
  white-space: nowrap;
}

/* ── Stacked single-column body — scrollable ── */
.demo-split-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  gap: 12px;
  padding: 12px;
  scrollbar-width: none;
}
.demo-split-body::-webkit-scrollbar { display: none; }

/* Panel — full width, auto height */
.demo-split-panel {
  flex: 0 0 auto;
  border: 1px solid #606060;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
}

/* AI Matching & Meetings Summary panels — exact app #matching-container:
   max-width: 425px; width: 100%; margin: 0 auto; border: none */
#dlap-ai,
#dlap-meetings {
  border: none;
  border-radius: 0;
  max-width: 425px;
  width: 100%;
  margin: 0 auto;
}

/* Panel header — exact PlannerSplitView.panelHeader */
.demo-split-panel-header {
  padding: 10px;
  font-size: 14px;
  font-weight: bold;
  color: #d3d3d3;
  background-color: #222;
  border-bottom: 1px solid #353535;
  text-align: center;
  flex-shrink: 0;
}

/* ── Tab nav — exact DoubleTabNav ── */
.demo-tabnav-wrap {
  display: flex;
  justify-content: center;
  /* matches tab_navigation margin: 20px auto; margin-top: 35px */
  margin: 14px auto 8px;
  padding: 0 8px;
  width: 100%;
  box-sizing: border-box;
}
.demo-tabnav {
  display: flex;
  gap: 0;
  background: transparent;
  border-radius: 33px;
  border: 1px solid #424242;
  /* NO overflow:hidden — that clips the active blue border */
  width: 100%;
  max-width: 95%;
}
/* tab_button — exact: transparent bg, border:none, fills container */
.demo-split-tab {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 33px;
  color: #888;
  font-size: 13px;
  font-family: Arial, Helvetica, sans-serif;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
  justify-content: center;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.demo-split-tab:hover { color: #aaa; }
/* tab_active — border: 2px solid accent, color: --text-color */
.demo-split-tab.active {
  color: #d3d3d3;
  border: 2px solid #245AF6;
}
.demo-split-tab svg { width: 13px; height: 13px; flex-shrink: 0; }

/* Tab content — flows to natural height (parent panel is auto-height) */
.demo-tab-content {
  overflow: visible;
}
.demo-tab-pane        { display: none; }
.demo-tab-pane.active { display: block; }
.demo-pane-inner      { padding: 10px; }

/* ── TTSPlayer — exact TTSPlayer.module.css ── */
.demo-tts-player {
  width: 100%;
  background: #000;
  border-radius: 33px;
  padding: 8px 14px;
  border: 1px solid #555;
  box-sizing: border-box;
  margin-bottom: 8px;
}
.demo-tts-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.demo-tts-play {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: #245AF6;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(36,90,246,0.3);
}
.demo-tts-play:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(36,90,246,0.5);
}
.demo-tts-time {
  font-size: 12px;
  min-width: 80px;
  text-align: center;
  color: #aaa;
  font-weight: 500;
  flex-shrink: 0;
}
.demo-tts-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.demo-tts-vol-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.demo-tts-vol-icon { color: #aaa; display: flex; align-items: center; }
.demo-tts-vol-icon svg { width: 13px; height: 13px; fill: #aaa; }
.demo-tts-vol-track {
  flex: 1;
  max-width: 120px;
  height: 5px;
  background: linear-gradient(to right, #245AF6 70%, #1a1a1a 70%);
  border: 1px solid #555;
  border-radius: 3px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.demo-tts-progress-bar {
  width: 100%;
  height: 6px;
  background: #000;
  border: 1px solid #555;
  border-radius: 3px;
  overflow: hidden;
}
.demo-tts-progress-fill {
  height: 100%;
  width: 24%;
  background: #245AF6;
  border-radius: 3px;
}
.demo-tts-caption {
  font-size: 12px;
  color: #888;
  text-align: center;
  margin: 6px 0 10px;
  line-height: 1.4;
}

/* ── Opportunity Graph — exact OpportunityGraph.jsx container style ── */
.demo-mindmap-wrap {
  touch-action: none;
  width: 100%;
  height: 350px;
  position: relative;
  border: 1px solid #606060;
  border-radius: 33px;
  overflow: hidden;
}
.demo-mindmap-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Profile match cards — exact MatchingOpportunity.css match-box-center + opp-node-circle ── */
.demo-match-card {
  display: flex;
  align-items: flex-start;
  padding: 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.2s ease;
  margin-bottom: 8px;
}
.demo-match-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}
/* match-node-circle — exact MatchingOpportunity.css */
.demo-match-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #000;
  border: 2px solid #555;
  color: #aaa;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
}
.demo-match-body  { flex: 1; padding: 0 15px; min-width: 0; }
/* match-name */
.demo-match-name  {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
/* match-reason */
.demo-match-reason {
  color: #c1c1c1;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 10px;
}
/* tag-badge — exact MatchingOpportunity.css */
.demo-match-score {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  background: #245AF6;
  color: #fff;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  white-space: nowrap;
}
/* action-button */
.demo-match-btn {
  background: transparent;
  color: #245AF6;
  border: 1px solid #245AF6;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  font-family: Arial, Helvetica, sans-serif;
  transition: all 0.2s ease;
}
.demo-match-btn:hover { background: #245AF6; color: #000; transform: translateY(-1px); }

/* ── Meeting summary — exact MeetingsSummary.module.css ── */
.demo-summary-content {
  padding: 10px;
  padding-top: 15px;
  border-top: 1px solid #1d1d1d;
  color: #d3d3d3;
  line-height: 1.2;
}
/* sectionHeader — exact MeetingsSummary.module.css */
.demo-summary-section {
  color: #d3d3d3;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 30px;
  margin-bottom: 10px;
  display: block;
}
.demo-summary-section:first-child { margin-top: 0; }
/* summaryNumber */
.demo-summary-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background-color: #2c2c2e;
  border: 1px solid #404040;
  color: #d3d3d3;
  font-size: 16px;
  font-weight: 900;
  margin-right: 10px;
  flex-shrink: 0;
}
.demo-summary-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 0;
}
/* summaryHighlight / text */
.demo-summary-text {
  color: #d3d3d3;
  font-size: 13px;
  line-height: 1.5;
  padding-top: 6px;
}
.demo-summary-accent { color: #245AF6; }
/* itemSpacer */
.demo-summary-spacer { height: 8px; display: block; }

/* ── Meeting accordion — exact MeetingsSummary.jsx inline styles ── */
.demo-meeting-list { padding: 12px; }
.demo-meeting-card {
  margin-bottom: 10px;
  border: 1px solid #262626;
  border-radius: 15px;
  overflow: hidden;
}
.demo-meeting-card.expanded { border-top-color: #245AF6; }
.demo-meeting-header {
  background: #000;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.demo-meeting-title {
  font-size: 16px;
  color: #d3d3d3;
  font-weight: bold;
  line-height: 1.8;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
}
.demo-meeting-date {
  color: #888;
  font-size: 12px;
  line-height: 1.2;
  font-family: Arial, Helvetica, sans-serif;
}
.demo-meeting-toggle {
  color: #245AF6;
  font-size: 20px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1;
}
/* summaryContent */
.demo-meeting-body {
  padding: 10px;
  padding-top: 15px;
  border-top: 1px solid #1d1d1d;
  color: #d3d3d3;
  line-height: 1.2;
  padding-bottom: 20px;
}

/* ── Summary markdown — exact summaryMarkdown + sectionHeader classes ── */
.demo-sum-header {
  color: #d3d3d3;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 28px;
  margin-bottom: 10px;
  display: block;
  font-family: Arial, Helvetica, sans-serif;
}
.demo-sum-header:first-child { margin-top: 10px; }
.demo-sum-list {
  padding-left: 20px;
  margin: 0 0 8px 0;
}
.demo-sum-list.ordered { list-style: decimal; }
.demo-sum-list.bullets { list-style: disc; }
.demo-sum-list li {
  color: #d3d3d3;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
  font-family: Arial, Helvetica, sans-serif;
}
.demo-sum-list li strong {
  display: block;
  width: 100%;
  margin-bottom: 4px;
  font-weight: 700;
  color: #d3d3d3;
}

/* ── Tap guard — desktop: hidden; mobile: transparent overlay over the lid ── */
.demo-tap-guard {
  display: none;
}

@media (max-width: 768px) {
  .demo-tap-guard {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 20;
    border-radius: 12px 12px 4px 4px;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease;
  }

  /* Hinted state: dim the demo and show the pill */
  .demo-tap-guard.hinted {
    background: rgba(0, 0, 0, 0.38);
  }

  .demo-tap-guard.hinted::after {
    content: 'Tap again to interact';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.88);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 8px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    white-space: nowrap;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  }

  /* Gone state: guard dismissed after second tap */
  .demo-tap-guard.gone {
    display: none;
  }
}


/* ── Mobile overrides for demo laptop frames ── */
@media (max-width: 768px) {
  /* Lock both demos to identical height — min+max prevents flex children
     from stretching the display beyond the intended value */
  .demo-laptop__display {
    height: 560px;
    min-height: 560px;
    max-height: 560px;
    overflow: hidden;
  }

  /* Contain the chrome strictly inside the locked display */
  .demo-split-chrome {
    height: 100%;
    max-height: 560px;
    overflow: hidden;
  }

  /* Clip content — touch-action intentionally omitted so page scroll
     is never blocked; the tap-guard JS handles interaction gating */
  .demo-split-body {
    overflow: hidden;
  }

  /* Smaller graph so all circles fit without clipping */
  .demo-mindmap-wrap {
    height: 260px;
  }

  /* TTS player — clamp everything inside, no overflow */
  .demo-tts-player {
    overflow: hidden;
    padding: 8px 10px;
  }

  /* Time label shorter on narrow screens */
  .demo-tts-time {
    min-width: 60px;
    font-size: 11px;
  }

  /* Volume track capped so it can't push outside */
  .demo-tts-vol-track {
    max-width: 80px;
    min-width: 0;
    flex-shrink: 1;
  }

  /* Extra breathing room below caption before the opportunity graph */
  .demo-tts-caption {
    margin-bottom: 28px;
  }

  /* Shrink tab nav so both tabs fit inside the frame */
  .demo-split-tab {
    font-size: 11px;
    padding: 7px 6px;
    gap: 4px;
  }
  .demo-split-tab svg { width: 11px; height: 11px; }
}
