/* ─────────────────────────────────────────────────────────────────────────────
   intake-widget.css  —  Zulu Baat Karta Hai intake panel
   Self-contained styles. Prefixed with zbk- to avoid collisions.
   ───────────────────────────────────────────────────────────────────────── */

/* ── SECTION WRAPPER ─────────────────────────────────────────────────────── */
.zbk-wrap {
  padding: clamp(4rem,8vh,7rem) var(--px,2rem);
  border-top: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
.zbk-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 0%,
    rgba(91,114,232,.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ── SECTION HEADER ──────────────────────────────────────────────────────── */
.zbk-hd { max-width: 460px; margin-bottom: 2.5rem; }
.zbk-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--fg3);
  display: flex; align-items: center; gap: .55rem; margin-bottom: 1rem;
}
.zbk-eyebrow::before {
  content: ''; display: block; width: 16px; height: 2px;
  background: var(--accent); border-radius: 1px;
}
.zbk-title {
  font-family: 'Lato', sans-serif;
  font-size: clamp(2rem,4vw,3.25rem); font-weight: 300;
  letter-spacing: -.035em; line-height: 1.05; color: #fff; margin-bottom: .875rem;
}
.zbk-title em       { font-style: normal; color: var(--accent); }
.zbk-title .em-gold { font-style: normal; color: var(--gold); }
.zbk-sub { font-size: 14px; color: var(--fg3); line-height: 1.75; max-width: 440px; }

/* Two-col layout */
.zbk-two {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem,5vw,5rem); align-items: start;
}
@media (max-width: 760px) { .zbk-two { grid-template-columns: 1fr; } }

/* ── PANEL SHELL ─────────────────────────────────────────────────────────── */
.zbk-panel {
  background: #0d0d1c;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.55);
  animation: zbkFadeUp .4s ease;
}
@keyframes zbkFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Topbar (macOS dots) */
.zbk-topbar {
  display: flex; align-items: center; gap: .45rem;
  padding: .6rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
}
.zbk-tb-dot { width: 9px; height: 9px; border-radius: 50%; }
.zbk-tb-r   { background: #ff5f57; }
.zbk-tb-y   { background: #febc2e; }
.zbk-tb-g   { background: #28c840; }
.zbk-tb-title { font-size: 11px; color: rgba(255,255,255,.3); margin-left: .35rem; flex: 1; letter-spacing: .04em; }
.zbk-tb-status { font-size: 10px; color: rgba(255,255,255,.3); letter-spacing: .04em; transition: color .2s; }
.zbk-tb-status.active { color: #4ade80; }

/* ── ROUND TABS ──────────────────────────────────────────────────────────── */
.zbk-rounds {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,.06);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 .25rem;
}
.zbk-rounds::-webkit-scrollbar { display: none; }
.zbk-round-tab {
  flex: 1;
  background: none; border: none;
  border-bottom: 2px solid transparent;
  padding: .75rem .5rem;
  font-size: 11px; font-weight: 400;
  color: rgba(255,255,255,.35);
  letter-spacing: .01em;
  cursor: pointer;
  transition: color .18s, border-color .18s;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  text-align: center;
  margin-bottom: -1px;
}
.zbk-round-tab:hover { color: rgba(255,255,255,.6); }
.zbk-round-tab.active {
  font-weight: 700;
  color: var(--zbk-c, #5b72e8);
  border-bottom-color: var(--zbk-c, #5b72e8);
}

/* ── BODY ────────────────────────────────────────────────────────────────── */
.zbk-body {
  padding: 1rem 1rem 1.25rem;
  display: flex; flex-direction: column; gap: .875rem;
}

/* ── FIELD CARDS ─────────────────────────────────────────────────────────── */
.zbk-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.zbk-fields-empty {
  grid-column: 1 / -1;
  font-size: 11px; color: rgba(255,255,255,.2);
  text-align: center; padding: 1.25rem; font-style: italic;
}
.zbk-field-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: .85rem 1rem;
  min-height: 62px;
  display: flex; flex-direction: column; gap: .3rem;
  transition: background .15s;
}
.zbk-field-card:hover { background: rgba(255,255,255,.07); }
.zbk-fc-key {
  font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.35);
}
.zbk-fc-val {
  font-size: 13px; font-weight: 500; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}
.zbk-fc-val.empty { color: rgba(255,255,255,.2); font-style: italic; }
.zbk-field-card.filled {
  border-color: rgba(255,255,255,.14);
}
.zbk-field-card.empty {
  background: rgba(255,255,255,.02);
  border-color: rgba(255,255,255,.05);
}
.zbk-field-card.empty .zbk-fc-key { color: rgba(255,255,255,.2); }

/* ── MIC + INPUT AREA ────────────────────────────────────────────────────── */
.zbk-input-area { display: flex; flex-direction: column; gap: .5rem; }
.zbk-mic-row    { display: none; } /* waveform moved inline */

/* Single-row input bar (matches screenshot) */
.zbk-input-bar {
  display: flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: .55rem .55rem .55rem .9rem;
  transition: border-color .18s;
}
.zbk-input-bar:focus-within { border-color: rgba(255,255,255,.22); }

.zbk-tx {
  flex: 1;
  background: none; border: none; outline: none;
  font-size: 13.5px; color: #fff;
  font-family: 'Inter', sans-serif;
  line-height: 1.5; resize: none;
  max-height: 100px; overflow-y: auto;
  scrollbar-width: none;
}
.zbk-tx::-webkit-scrollbar { display: none; }
.zbk-tx::placeholder { color: rgba(255,255,255,.28); font-style: normal; }

/* Send button — dark rounded square */
.zbk-send-btn {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.7);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s, color .18s;
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
}
.zbk-send-btn svg { width: 14px; height: 14px; }
.zbk-send-btn:hover { background: rgba(255,255,255,.17); color: #fff; }
.zbk-send-btn:disabled { opacity: .3; cursor: not-allowed; }

/* Mic button — solid blue circle */
.zbk-mic-btn {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--zbk-c, #5b72e8);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .2s, transform .2s;
  position: relative;
}
.zbk-mic-btn svg { width: 16px; height: 16px; }
.zbk-mic-btn:hover { opacity: .88; }
.zbk-mic-btn.listening {
  animation: zbkPulse .9s ease-in-out infinite;
}
.zbk-mic-btn.listening::before {
  content: '';
  position: absolute; inset: -6px; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--zbk-c, #5b72e8) 35%, transparent);
  animation: zbkRing 1s ease-out infinite;
}
.zbk-mic-btn.processing { opacity: .35; cursor: not-allowed; animation: none; }
@keyframes zbkPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.07)} }
@keyframes zbkRing  { 0%{transform:scale(.9);opacity:1} 100%{transform:scale(1.6);opacity:0} }

/* Waveform (hidden by default, shown during listening) */
.zbk-wf { display: none; gap: 2px; align-items: flex-end; height: 20px; }
.zbk-wf.active { display: flex; }
.zbk-wfb {
  width: 3px; height: 4px; border-radius: 1.5px;
  background: var(--zbk-c, #5b72e8); opacity: .7;
  transition: height .1s;
}
.zbk-wf.active .zbk-wfb { animation: zbkBar .55s ease-in-out infinite alternate; }
.zbk-wf.active .zbk-wfb:nth-child(2){animation-delay:.07s}
.zbk-wf.active .zbk-wfb:nth-child(3){animation-delay:.14s}
.zbk-wf.active .zbk-wfb:nth-child(4){animation-delay:.04s}
.zbk-wf.active .zbk-wfb:nth-child(5){animation-delay:.11s}
.zbk-wf.active .zbk-wfb:nth-child(6){animation-delay:.18s}
.zbk-wf.active .zbk-wfb:nth-child(7){animation-delay:.06s}
.zbk-wf.active .zbk-wfb:nth-child(8){animation-delay:.13s}
@keyframes zbkBar { from{height:3px} to{height:18px} }

/* Hint below input */
.zbk-hint { font-size: 10px; color: rgba(255,255,255,.25); letter-spacing: .04em; }
.zbk-send-row { display: flex; align-items: center; justify-content: space-between; }

/* ── ERROR BANNER ────────────────────────────────────────────────────────── */
.zbk-err {
  font-size: 11px; color: #fca5a5;
  background: rgba(239,68,68,.06);
  border: 1px solid rgba(239,68,68,.18);
  padding: .55rem .85rem; border-radius: 8px;
  display: none; line-height: 1.5;
}

/* ── PROGRESS DOTS + FOOTER ──────────────────────────────────────────────── */
.zbk-dots {
  display: flex; align-items: center; gap: 5px;
  padding: .75rem 1rem;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-wrap: wrap;
}
.zbk-dot-group { display: flex; gap: 4px; align-items: center; }
.zbk-dot-pip {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.13);
  transition: all .25s ease;
}
.zbk-dot-pip.filled { transform: scale(1.1); }

/* Footer row: dots left, count + reset right */
.zbk-footer-row {
  display: flex; align-items: center; gap: .65rem;
  padding: .6rem 1rem .75rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
.zbk-footer-dots { display: flex; gap: 5px; align-items: center; flex: 1; flex-wrap: wrap; }
.zbk-footer-count {
  font-size: 12px; font-weight: 700; color: #fff;
  letter-spacing: .02em; white-space: nowrap;
}
.zbk-footer-count span { color: rgba(255,255,255,.35); font-weight: 400; }
.zbk-footer-reset {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.4); background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1); border-radius: 6px;
  padding: .3rem .65rem; cursor: pointer; font-family: 'Inter', sans-serif;
  transition: color .15s, background .15s;
}
.zbk-footer-reset:hover { color: #fff; background: rgba(255,255,255,.1); }

/* ── PROCESSING SPINNER ──────────────────────────────────────────────────── */
.zbk-spinner {
  width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,.1);
  border-top-color: var(--zbk-c, #5b72e8);
  border-radius: 50%;
  animation: zbkSpin .65s linear infinite;
  display: inline-block; flex-shrink: 0;
}
@keyframes zbkSpin { to { transform: rotate(360deg); } }

/* ── DEBUG PANEL ─────────────────────────────────────────────────────────── */
.zbk-debug {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: .75rem 1rem;
}
.zbk-debug-hd {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem;
}
.zbk-debug-label {
  font-size: 9px; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: rgba(255,255,255,.3);
}
.zbk-debug-clear {
  font-size: 9px; color: rgba(255,255,255,.3); background: none; border: none;
  cursor: pointer; font-family: 'Inter', sans-serif; transition: color .15s;
}
.zbk-debug-clear:hover { color: rgba(255,255,255,.6); }
.zbk-debug-entry { margin-bottom: .5rem; }
.zbk-debug-ts { font-size: 9px; color: rgba(255,255,255,.3); margin-bottom: .25rem; }
.zbk-debug-pre {
  background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.06);
  border-radius: 6px; padding: .5rem; font-size: 10px; color: rgba(255,255,255,.4);
  line-height: 1.5; max-height: 160px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-all; scrollbar-width: thin;
}
