/* TinoCall demo console (rounds 232-233, Emre 29 Oct 2026).
   Row 1: player (blue orb kept) + call picker with topic tabs. Row 2: custom demo request + 3D sphere.
   The console must fit one screen at 100% zoom. Scoped to #your-demo; it stays dark in both page themes. */

#your-demo {
  --cl-bg: #090d16;
  --cl-panel: #0e1422;
  --cl-raise: #151e31;
  --cl-ink: #f8fafc;
  --cl-muted: #a7b3c6;
  --cl-quiet: #7f8ca2;
  --cl-orange: #f97316;
  --cl-orange-ink: #fdba74;
  --cl-orange-soft: rgba(249, 115, 22, 0.12);
  --cl-blue: #38bdf8;
  --cl-blue-ink: #93dcfd;
  --cl-green: #4ade80;
  --cl-amber: #fbbf24;
  --cl-edge: rgba(255, 255, 255, 0.08);
  --cl-ease: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ---------- console frame ---------- */
#your-demo .demo-hub-top-row.cl-row,
#your-demo .demo-hub-bottom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 14px 14px 0;
  margin: 0;
}

#your-demo .demo-hub-bottom-row { padding: 14px; }

#your-demo .cl-row .demo-col-browser,
#your-demo .cl-log,
#your-demo .demo-hub-bottom-row .demo-lead-panel,
#your-demo .demo-hub-bottom-row .demo-col-sphere {
  background: var(--cl-bg);
  border: 1px solid var(--cl-edge);
  border-radius: 18px;
  box-shadow: none;
  margin: 0;
}

#your-demo .cl-row .demo-col-browser {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  padding: 20px 22px;
}

#your-demo [data-call-mode="sample"] .cl-mode-pill { display: none; }
#your-demo [data-call-mode="live"] .cl-sample-only,
#your-demo .cl-row:has(#demo-col-a[data-call-mode="live"]) .cl-log { display: none; }

/* ---------- orb + now playing ---------- */
#your-demo .cl-row .demo-orb-layout {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  margin: 0;
}

#your-demo .cl-row .demo-orb-btn { width: 132px !important; height: 132px !important; }
#your-demo .cl-row .demo-orb-text { font-size: 13px; }
#your-demo .cl-row .demo-orb-icon { width: 24px; height: 24px; }

#your-demo .cl-now { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

#your-demo .cl-now-title {
  margin: 0;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--cl-ink);
  text-wrap: balance;
}

#your-demo .cl-now-people { margin: 0; font-size: 15px; line-height: 1.4; color: var(--cl-muted); }
#your-demo .cl-who { font-weight: 750; }
#your-demo .cl-who-agent { color: var(--cl-orange-ink); }
#your-demo .cl-who-caller { color: var(--cl-blue-ink); }

#your-demo .cl-now-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 2px; }

/* language switch: two segments, one sliding thumb */
#your-demo .cl-lang {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border-radius: 999px;
  background: var(--cl-raise);
  isolation: isolate;
}

#your-demo .cl-lang-thumb {
  position: absolute;
  z-index: -1;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: #0b46f6;
  transition: transform 320ms var(--cl-ease), width 320ms var(--cl-ease);
}

#your-demo .cl-lang[data-lang="es"] .cl-lang-thumb { transform: translateX(100%); }

#your-demo .cl-lang button {
  appearance: none;
  border: 0;
  background: none;
  min-height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  font: 700 13.5px/1 Manrope, "Segoe UI", sans-serif;
  color: var(--cl-muted);
  cursor: pointer;
  transition: color 200ms ease;
}

#your-demo .cl-lang button[aria-checked="true"] { color: #fff; }
#your-demo .cl-lang button:hover { color: var(--cl-ink); }
#your-demo .cl-lang button:focus-visible { outline: 2px solid var(--cl-blue); outline-offset: 2px; }
#your-demo .cl-lang.is-shared button { color: #fff; }
#your-demo .cl-lang.is-shared .cl-lang-thumb { width: calc(100% - 6px); transform: none; }

#your-demo .cl-outcome { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.3; }
#your-demo .cl-outcome-state { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; color: var(--cl-green); }
#your-demo .cl-outcome-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
#your-demo .cl-outcome.is-declined .cl-outcome-state { color: var(--cl-amber); }
#your-demo .cl-outcome-detail { color: var(--cl-muted); font-weight: 650; }

/* ---------- waveform + caption ---------- */
#your-demo .cl-player { display: flex; flex-direction: column; gap: 12px; }

#your-demo .cl-scrub-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

#your-demo .cl-time {
  min-width: 34px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cl-muted);
  font-variant-numeric: tabular-nums;
}

#your-demo .cl-time-end { text-align: right; }

#your-demo .cl-scrub { position: relative; height: 44px; border-radius: 12px; background: var(--cl-panel); }
#your-demo .cl-scrub:focus-within { outline: 2px solid var(--cl-blue); outline-offset: 3px; }
#your-demo .cl-wave { position: absolute; inset: 8px 12px; --p: 0%; }
#your-demo .cl-wave-layer { position: absolute; inset: 0; display: flex; align-items: center; gap: 3px; }
#your-demo .cl-wave-layer span { flex: 1 1 0; min-height: 3px; border-radius: 2px; background: rgba(167, 179, 198, 0.3); }
#your-demo .cl-wave-played { clip-path: inset(0 calc(100% - var(--p)) 0 0); }
#your-demo .cl-wave-played span { background: var(--cl-blue); }

#your-demo .cl-seek { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }

#your-demo .cl-caption {
  margin: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--cl-panel);
}

#your-demo .cl-caption-who { font-size: 13px; line-height: 1.55; font-weight: 800; }
#your-demo .cl-caption-who.is-agent { color: var(--cl-orange-ink); }
#your-demo .cl-caption-who.is-caller { color: var(--cl-blue-ink); }

#your-demo .cl-caption-text {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--cl-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#your-demo .cl-caption.is-idle .cl-caption-text { color: var(--cl-muted); }
#your-demo .cl-caption.is-new .cl-caption-text { animation: cl-line-in 260ms var(--cl-ease); }

@keyframes cl-line-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

#your-demo .cl-error { margin: 0; font-size: 14px; color: var(--cl-amber); }

/* ---------- call picker ---------- */
#your-demo .cl-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  color: var(--cl-ink);
}

#your-demo .cl-log { container-type: inline-size; }
#your-demo .cl-log-head { padding: 4px 6px 2px; }
#your-demo .cl-log-head h3,
#your-demo .cl-log-head h4 { margin: 0; font-size: 19px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; color: var(--cl-ink); }
#your-demo .cl-log-sub { margin: 3px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--cl-muted); }

#your-demo .cl-tabs {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 4px;
  border-radius: 14px;
  background: var(--cl-panel);
  isolation: isolate;
  overflow-x: auto;
  scrollbar-width: none;
  --tab-x: 4px;
  --tab-w: 0px;
}

#your-demo .cl-tabs::-webkit-scrollbar { display: none; }

#your-demo .cl-tabs-thumb {
  position: absolute;
  z-index: -1;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: var(--tab-w);
  transform: translateX(var(--tab-x));
  border-radius: 10px;
  background: var(--cl-orange);
  transition: transform 340ms var(--cl-ease), width 340ms var(--cl-ease);
}

#your-demo .cl-tab {
  appearance: none;
  border: 0;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  white-space: nowrap;
  font: 750 13.5px/1 Manrope, "Segoe UI", sans-serif;
  color: var(--cl-muted);
  cursor: pointer;
  transition: color 200ms ease, background 200ms ease;
}

#your-demo .cl-tab:hover { color: var(--cl-ink); background: rgba(255, 255, 255, 0.04); }
#your-demo .cl-tab[aria-selected="true"] { color: #1a0a02; background: transparent; }
#your-demo .cl-tab:focus-visible { outline: 2px solid var(--cl-blue); outline-offset: 1px; }

#your-demo .cl-tab-icon {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#your-demo .cl-tab-count { display: none; }
#your-demo .cl-tab-count-unused {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

#your-demo .cl-tab[aria-selected="true"] .cl-tab-count { background: rgba(26, 10, 2, 0.16); }

#your-demo .cl-groups { flex: 1 1 auto; }
#your-demo .cl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
#your-demo .cl-list[hidden] { display: none; }
#your-demo .cl-list:not([hidden]) { animation: cl-list-in 280ms var(--cl-ease); }

@keyframes cl-list-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

#your-demo .cl-row-btn {
  appearance: none;
  border: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 12px;
  background: transparent;
  color: var(--cl-ink);
  text-align: left;
  cursor: pointer;
  font-family: Manrope, "Segoe UI", sans-serif;
  transition: background 180ms ease, box-shadow 180ms ease, transform 160ms var(--cl-ease);
}

#your-demo .cl-row-btn:hover { background: rgba(255, 255, 255, 0.045); }
#your-demo .cl-row-btn:active { transform: scale(0.985); }
#your-demo .cl-row-btn:focus-visible { outline: 2px solid var(--cl-blue); outline-offset: 1px; }
#your-demo .cl-row-btn.is-current { background: var(--cl-orange-soft); box-shadow: inset 0 0 0 1.5px rgba(249, 115, 22, 0.75); /* taste-skill-ignore: selection ring */ }

#your-demo .cl-disc {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cl-raise);
  color: var(--cl-blue-ink);
  font-size: 15px;
  font-weight: 800;
}

#your-demo .is-current .cl-disc { background: var(--cl-orange); color: #1a0a02; }
#your-demo .cl-eq { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 3px; }
#your-demo .cl-eq i { display: block; width: 3px; height: 13px; border-radius: 2px; background: #1a0a02; animation: cl-eq 900ms ease-in-out infinite; }
#your-demo .cl-eq i:nth-child(2) { animation-delay: -300ms; }
#your-demo .cl-eq i:nth-child(3) { animation-delay: -600ms; }
#your-demo .cl-row-btn.is-playing .cl-eq { display: flex; }
#your-demo .cl-row-btn.is-playing .cl-initial { visibility: hidden; }

@keyframes cl-eq {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}

#your-demo .cl-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#your-demo .cl-row-title { font-size: 15px; line-height: 1.3; font-weight: 800; letter-spacing: -0.01em; color: var(--cl-ink); }

#your-demo .cl-row-summary {
  font-size: 13px;
  line-height: 1.45;
  color: var(--cl-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#your-demo .cl-row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-variant-numeric: tabular-nums; }
#your-demo .cl-row-dur { font-size: 13.5px; font-weight: 750; color: var(--cl-ink); }
#your-demo .cl-row-agent { font-size: 12px; font-weight: 650; color: var(--cl-quiet); }

#your-demo .cl-note { margin: 0 6px; font-size: 12.5px; line-height: 1.45; color: var(--cl-quiet); }

/* hybrid tabs when the picker is narrow: icons for the others, icon + name for the chosen one */
@container (max-width: 540px) {
  #your-demo .cl-tabs { display: flex; }
  #your-demo .cl-tab { flex: 1 1 auto; padding: 0 10px; }
  #your-demo .cl-tab:not([aria-selected="true"]) .cl-tab-label { display: none; }
  #your-demo .cl-tab[aria-selected="true"] { flex: 3 1 auto; }
}

/* ---------- row 2: custom demo request ---------- */
#your-demo .demo-hub-bottom-row .demo-lead-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px;
}

#your-demo .demo-hub-bottom-row .demo-lead-intro { margin: 0; text-align: left; max-width: none; }

#your-demo .demo-hub-bottom-row .demo-lead-intro h3 {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--cl-ink);
  text-align: left;
}

#your-demo .demo-hub-bottom-row .demo-lead-intro p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--cl-muted); text-align: left; max-width: 52ch; }

#your-demo .demo-hub-bottom-row .demo-lead-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }

#your-demo .demo-hub-bottom-row .demo-lead-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin: 0;
}

#your-demo .demo-hub-bottom-row .demo-field-label { gap: 5px; margin: 0; }
#your-demo .demo-hub-bottom-row .demo-field-label > span { font-size: 12.5px; color: var(--cl-muted); }

#your-demo .demo-hub-bottom-row .demo-field-label input {
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 14px;
  background: var(--cl-panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

#your-demo .demo-hub-bottom-row .demo-field-label input:focus { border-color: var(--cl-orange); outline: none; box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.22); /* taste-skill-ignore: focus ring */ }

#your-demo .demo-hub-bottom-row .demo-lead-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0;
}

#your-demo .demo-hub-bottom-row .demo-lead-submit { min-height: 44px; margin: 0; }
#your-demo .demo-hub-bottom-row .demo-lead-consent { margin: 0; font-size: 12.5px; color: var(--cl-quiet); }
#your-demo .demo-hub-bottom-row .demo-lead-reassurance { flex-basis: 100%; margin-top: -2px; font-family: Manrope, "Segoe UI", sans-serif; font-size: 12.5px; letter-spacing: 0; color: var(--cl-quiet); text-align: left; }

#your-demo .cl-row .demo-code-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

#your-demo .cl-row .demo-code-toggle { font-size: 13.5px; }
#your-demo .cl-row .demo-code-drawer { display: flex; gap: 8px; flex: 1 1 260px; margin: 0; }
#your-demo .cl-row .demo-code-drawer[hidden] { display: none; }
#your-demo .cl-row .demo-code-drawer input { height: 40px; flex: 1; min-width: 0; }
#your-demo .cl-row .demo-code-submit { height: 40px; }

/* ---------- row 2: the sphere (text in its own column, never over the sphere) ---------- */
#your-demo .demo-hub-bottom-row .demo-col-sphere {
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, 0.6fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 20px 22px;
  overflow: hidden;
  min-height: 320px;
  text-align: left;
}

#your-demo .demo-hub-bottom-row .sphere-header { position: static; align-self: start; max-width: none; margin: 0; text-align: left; }
#your-demo .demo-hub-bottom-row .sphere-header h4 { margin: 0 0 6px; font-size: 19px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; color: var(--cl-ink); }
#your-demo .demo-hub-bottom-row .sphere-header p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--cl-muted); max-width: none; }

#your-demo .demo-hub-bottom-row .sphere-3d-stage {
  position: relative;
  justify-self: center;
  width: 300px;
  height: 300px;
  max-width: 100%;
  margin: 0;
  transform: none;
}

#your-demo .demo-hub-bottom-row .sphere-drag-hint { display: none; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  #your-demo .demo-hub-top-row.cl-row,
  #your-demo .demo-hub-bottom-row { grid-template-columns: 1fr; }
  #your-demo .demo-hub-bottom-row .demo-col-sphere { grid-template-columns: minmax(170px, 0.5fr) minmax(0, 1fr); }
}

/* ---------- phone ---------- */
@media (max-width: 600px) {
  #your-demo .demo-hub-top-row.cl-row { padding: 10px 10px 0; gap: 10px; }
  #your-demo .demo-hub-bottom-row { padding: 10px; gap: 10px; }
  #your-demo .cl-row .demo-col-browser { padding: 16px; gap: 14px; }
  #your-demo .cl-row .demo-orb-layout { flex-direction: row !important; align-items: center !important; gap: 16px !important; margin: 0 !important; }
  #your-demo .cl-wave-layer span:nth-child(2n) { display: none; }
  #your-demo .cl-row .demo-orb-wrapper { flex: none; margin: 0 !important; }
  #your-demo .cl-row .demo-orb-btn { width: 92px !important; height: 92px !important; }
  #your-demo .cl-row .demo-orb-text { font-size: 10.5px !important; }
  #your-demo .cl-row .demo-orb-btn .demo-orb-inner { padding: 0 6px; }
  #your-demo .cl-row .demo-orb-icon { width: 18px; height: 18px; }
  #your-demo .cl-row .demo-orb-right { flex: 1 1 0; min-width: 0; width: auto !important; max-width: none !important; }
  #your-demo .cl-now { gap: 6px; }
  #your-demo .cl-now-title { font-size: 20px; }
  #your-demo .cl-now-people { font-size: 14px; }
  #your-demo .cl-now-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  #your-demo .cl-lang button { min-height: 32px; padding: 0 11px; font-size: 12.5px; }
  #your-demo .cl-outcome { font-size: 13px; }
  #your-demo .cl-caption { grid-template-columns: 1fr; gap: 2px; min-height: 76px; }
  #your-demo .cl-log { padding: 10px; }
  #your-demo .cl-row-btn { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; padding: 9px 8px; }
  #your-demo .cl-disc { width: 36px; height: 36px; font-size: 14px; }
  #your-demo .demo-hub-bottom-row .demo-lead-panel { padding: 16px; }
  #your-demo .demo-hub-bottom-row .demo-lead-grid { grid-template-columns: 1fr; }
  #your-demo .demo-hub-bottom-row .demo-field-label input { font-size: 16px; }
  #your-demo .demo-hub-bottom-row .demo-lead-submit { width: 100%; justify-content: center; }
  #your-demo .demo-hub-bottom-row .demo-lead-footer { flex-direction: column; align-items: stretch; gap: 8px; }
  #your-demo .demo-hub-bottom-row .demo-lead-consent,
  #your-demo .demo-hub-bottom-row .demo-lead-reassurance { text-align: left; flex-basis: auto; width: auto; margin: 0; white-space: normal; }
  #your-demo .cl-row .demo-code-footer { flex-direction: column; align-items: stretch; }
  #your-demo .cl-row .demo-code-drawer { flex-direction: row !important; flex: none; }
  #your-demo .cl-row .demo-code-drawer input { font-size: 16px; }
  #your-demo .cl-row .demo-code-submit { width: auto !important; padding: 0 16px; }
  #your-demo .demo-hub-bottom-row .demo-col-sphere { grid-template-columns: 1fr; min-height: 0; padding: 16px; gap: 10px; }
  #your-demo .demo-hub-bottom-row .sphere-3d-stage { width: 280px; height: 280px; }
}

@media (prefers-reduced-motion: reduce) {
  #your-demo .cl-eq i { animation: none; transform: scaleY(0.7); }
  #your-demo .cl-list:not([hidden]),
  #your-demo .cl-caption.is-new .cl-caption-text { animation: none; }
  #your-demo .cl-lang-thumb,
  #your-demo .cl-tabs-thumb,
  #your-demo .cl-row-btn,
  #your-demo .cl-tab { transition: none; }
}
