/* answer.css — DNA+ Answer: RingCentral Call Center
   Phase 1 slice: Voicemail Follow-Up queue + Log-a-Call slide-out panel.
   Uses Hub design tokens from styles.css (--gold, --surface, --border, etc.).
   Alert/attention color standard: #b56a52 (softened clay). */

:root {
  --ans-alert: #b56a52;
}

/* ── Page header row ───────────────────────────────────────── */
.ans-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 20px;
}

/* Answer page header — icon tile + title (matches Intake/.ct-head-icon) */
.ans-tophead { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.ans-hero { display: flex; align-items: center; gap: 14px; }
.ans-hero-icon { width: 48px; height: 48px; border-radius: 11px; background: var(--gold-glow); border: 1px solid var(--gold-dim); display: grid; place-items: center; flex-shrink: 0; color: var(--gold-lt); }
.ans-hero-icon svg { width: 24px; height: 24px; }
.ans-hero-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.ans-hero-sub { font-size: .82rem; color: var(--muted); margin-top: 3px; }
.ans-head-live {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: .72rem; color: var(--muted);
}
.ans-head-live .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
  animation: ans-pulse 2s infinite;
}
@keyframes ans-pulse { 50% { opacity: .4; } }
.ans-head-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.ans-log-btn {
  font-family: var(--mono); font-size: .78rem; font-weight: 700; letter-spacing: .02em;
  color: var(--gold); border: 1px solid transparent; border-radius: 9px;
  padding: 12px 18px; cursor: pointer; transition: .15s;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 4px),
    radial-gradient(120% 60% at 50% 0%, rgba(255,255,255,0.045) 0%, transparent 70%),
    linear-gradient(#0a0a0a, #0a0a0a),
    linear-gradient(145deg, var(--gold-lt), var(--border2) 70%);
  background-clip: padding-box, padding-box, padding-box, padding-box, border-box;
  background-origin: border-box;
}
.ans-log-btn:hover {
  color: var(--gold-lt);
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 4px),
    radial-gradient(120% 60% at 50% 0%, rgba(255,255,255,0.06) 0%, transparent 70%),
    linear-gradient(#0a0a0a, #0a0a0a),
    linear-gradient(145deg, #e9c869, var(--border2) 70%);
  background-clip: padding-box, padding-box, padding-box, padding-box, border-box;
  background-origin: border-box;
}

/* ── VM section title ──────────────────────────────────────── */
.ans-qtitle {
  font-family: var(--mono); font-size: .74rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted);
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.ans-qtitle .ln { flex: 1; height: 1px; background: var(--border); }

/* ── KPI strip ─────────────────────────────────────────────── */
.ans-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-bottom: 16px; }
.ans-stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 13px 15px; position: relative; overflow: hidden;
}
.ans-stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold); }
.ans-stat.warn::before { background: var(--ans-alert); }
.ans-stat .n { font-family: var(--mono); font-size: 1.4rem; font-weight: 800; line-height: 1; }
.ans-stat.warn .n { color: var(--ans-alert); }
.ans-stat .l { font-family: var(--mono); font-size: .6rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 7px; }

/* ── Filter chips ──────────────────────────────────────────── */
.ans-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.ans-chip {
  font-family: var(--mono); font-size: .7rem; padding: 6px 12px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  cursor: pointer; transition: .15s;
}
.ans-chip:hover { border-color: var(--gold); }
.ans-chip.on { background: var(--gold); color: #0a0a0a; border-color: var(--gold); font-weight: 600; }

/* ── Section labels (grouping) ─────────────────────────────── */
.ans-seclbl {
  display: flex; align-items: center; gap: 12px; margin: 18px 4px 11px;
  font-family: var(--mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
}
.ans-seclbl .ct { color: var(--text); font-weight: 600; }
.ans-seclbl .ln { flex: 1; height: 1px; background: var(--border); }
.ans-seclbl.partner .ct { color: #c4b5fd; }

/* ── VM rows ───────────────────────────────────────────────── */
.ans-row {
  display: grid; grid-template-columns: 150px 150px 1fr 90px 80px 330px; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 13px 16px; margin-bottom: 9px; transition: .15s;
}
.ans-row:hover { border-color: var(--border2); transform: translateX(2px); }
.ans-row.claimed { opacity: .82; border-left: 3px solid var(--gold); }
.ans-row.partner { border-left: 3px solid #7c3aed; }
.ans-row.done { opacity: .45; }

.ans-caller { font-family: var(--mono); font-weight: 600; font-size: .9rem; }
.ans-caller .nm { font-family: var(--sans); font-size: .74rem; color: var(--muted); font-weight: 500; margin-top: 2px; }
.ans-loc { font-size: .82rem; }
.ans-loc .q { font-family: var(--mono); font-size: .62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.ans-note { display: flex; align-items: center; justify-content: center; min-height: 1px; }
.ans-note-chip {
  display: block; max-width: 220px; text-align: center; font-family: var(--mono); font-size: .66rem;
  color: var(--text); background: var(--surface2); border: 1px solid var(--border);
  border-left: 2px solid #7c3aed; border-radius: 5px; padding: 6px 9px; line-height: 1.4;
}
.ans-age { font-family: var(--mono); font-size: .8rem; }
.ans-age.old  { color: var(--gold-lt); }
.ans-age.crit { color: var(--ans-alert); }
.ans-dur { font-family: var(--mono); font-size: .78rem; color: var(--muted); }

.ans-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.ans-btn {
  font-family: var(--mono); font-size: .68rem; padding: 7px 11px; border-radius: 7px;
  border: 1px solid var(--border); background: var(--surface2); color: var(--text);
  cursor: pointer; transition: .15s; white-space: nowrap;
}
.ans-btn:hover { border-color: var(--gold); }
.ans-btn.gold  { background: var(--gold); color: #0a0a0a; border-color: var(--gold); font-weight: 600; }
.ans-btn.gold:hover { background: var(--gold-lt); }
.ans-btn.ghost { color: var(--muted); }
.ans-btn.partner { border-color: #5b3a9e; color: #c4b5fd; }
.ans-btn.partner:hover { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.ans-btn[disabled] { opacity: .4; cursor: not-allowed; }
.ans-btn[disabled]:hover { border-color: var(--border); }
.ans-claimed-by { font-family: var(--mono); font-size: .68rem; color: var(--gold-lt); align-self: center; }
.ans-partner-tag { font-family: var(--mono); font-size: .66rem; color: #a78bfa; white-space: nowrap; align-self: center; }

/* ── Done toggle ───────────────────────────────────────────── */
.ans-done-toggle {
  font-family: var(--mono); font-size: .7rem; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: 9px; padding: 11px 15px; cursor: pointer;
  width: 100%; text-align: left; margin-top: 16px; transition: .15s;
}
.ans-done-toggle:hover { border-color: var(--gold); color: var(--text); }
.ans-done-toggle .caret { display: inline-block; transition: transform .15s; margin-right: 8px; }
.ans-done-toggle.open .caret { transform: rotate(90deg); }
.ans-done-wrap { display: none; margin-top: 9px; }
.ans-done-wrap.open { display: block; }

/* ── Empty / loading states ────────────────────────────────── */
.ans-empty {
  text-align: center; padding: 40px 20px; font-family: var(--mono); font-size: .8rem; color: var(--muted2);
  border: 1px dashed var(--border); border-radius: var(--radius-lg);
}

/* ── Log-a-Call slide-out panel ────────────────────────────── */
.ans-scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none;
  transition: opacity .28s; z-index: 4000;
}
.ans-scrim.show { opacity: 1; pointer-events: auto; }
.ans-panel {
  position: fixed; top: 0; right: 0; height: 100vh; width: 460px; max-width: 92vw; z-index: 4001;
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: -20px 0 60px -20px rgba(0,0,0,.7);
  transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.ans-panel.show { transform: translateX(0); }
.ans-panel::before { content: ""; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: linear-gradient(180deg, var(--gold), var(--gold-lt), var(--gold)); }
.ans-panel-head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.ans-panel-head h3 { font-size: 1.1rem; font-weight: 700; }
.ans-panel-head .sub { font-family: var(--mono); font-size: .62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; }
.ans-panel-head .x { cursor: pointer; color: var(--muted); font-size: 1.3rem; background: none; border: none; }
.ans-panel-body { flex: 1; overflow: hidden; }
.ans-panel-body iframe { width: 100%; height: 100%; border: 0; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 980px) {
  .ans-stats { grid-template-columns: repeat(2, 1fr); }
  .ans-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ans-note:empty { display: none; }
  .ans-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ── Presence widget (Phase 2) ─────────────────────────────── */
.ans-widget {
  position: fixed; width: 270px; z-index: 3000;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 8px 28px rgba(0,0,0,.45); overflow: hidden;
}
.ans-widget-head {
  display: flex; align-items: center; gap: 9px; padding: 11px 13px;
  cursor: grab; user-select: none; transition: background .15s;
}
.ans-widget-head:active { cursor: grabbing; }
.ans-widget-head:hover { background: var(--surface2); }
.ans-widget-head .grip { color: var(--border2); font-size: .85rem; letter-spacing: -2px; }
.ans-widget-head .ttl { font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-lt); font-weight: 600; }
.ans-widget-head .ld { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); animation: ans-pulse 2s infinite; }
.ans-widget-head .caret { margin-left: auto; color: var(--muted); transition: transform .2s; font-size: .75rem; }
.ans-widget.collapsed .caret { transform: rotate(180deg); }

.ans-widget-summary { display: flex; gap: 13px; padding: 0 13px 12px; font-family: var(--mono); font-size: .72rem; align-items: center; flex-wrap: wrap; }
.ans-widget-summary .it { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.ans-widget-summary .it b { color: var(--text); font-weight: 600; }
.ans-widget-summary .it.av b { color: var(--green); }
.ans-widget-summary .it.dn b { color: var(--ans-alert); }
.ans-widget-summary .sdot { width: 6px; height: 6px; border-radius: 50%; }
.ans-widget-summary .sdot.on { color: var(--gold-lt); background: var(--gold-lt); }
.ans-widget-summary .sdot.av { background: var(--green); }
.ans-widget-summary .sdot.dn { background: var(--ans-alert); }

.ans-widget-body { border-top: 1px solid var(--border); max-height: 360px; overflow-y: auto; transition: max-height .25s ease; }
.ans-widget.collapsed .ans-widget-body { max-height: 0; border-top-color: transparent; }
.ans-rep { display: flex; align-items: center; gap: 10px; padding: 9px 13px; font-size: .82rem; border-bottom: 1px solid var(--border); }
.ans-rep:last-child { border: none; }
.ans-rep .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ans-rep .dot.available { background: var(--green); box-shadow: 0 0 6px var(--green); }
.ans-rep .dot.on_call { background: var(--gold-lt); }
.ans-rep .dot.dnd { background: var(--ans-alert); }
.ans-rep .nm { font-weight: 500; }
.ans-rep .st { margin-left: auto; font-family: var(--mono); font-size: .62rem; color: var(--muted); }
.ans-rep .st.on_call { color: var(--gold-lt); }

/* ── Call widget (Phase 4) ─────────────────────────────────── */
.ans-widget.cw { width: 316px; }
.ans-widget.cw .ans-widget-body { max-height: 600px; overflow: hidden; }
.ans-widget.cw.collapsed .ans-widget-body { max-height: 0; }
.cw-frame { width: 100%; height: 500px; border: 0; display: block; background: #fff; }

/* caller/queue + DND strip */
.cw-strip { border-top: 1px solid var(--border); background: #141414; font-family: var(--mono); }
.cw-caller { display: none; align-items: center; gap: 9px; padding: 9px 13px; border-bottom: 1px solid var(--border); }
.cw-strip.ringing .cw-caller, .cw-strip.active .cw-caller { display: flex; }
.cw-caller .pp { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-lt); flex-shrink: 0; }
.cw-strip.ringing .cw-caller .pp { background: var(--green); box-shadow: 0 0 6px var(--green); animation: ans-pulse 1.2s infinite; }
.cw-caller .who { display: flex; flex-direction: column; min-width: 0; }
.cw-caller .who .nm { font-size: .8rem; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-caller .who .num { font-size: .66rem; color: var(--muted); }
.cw-caller .q { margin-left: auto; font-size: .62rem; color: var(--gold-lt); text-align: right; max-width: 130px; }
.cw-dndrow { display: flex; align-items: center; gap: 10px; padding: 10px 13px; }
.cw-dndrow .lbl { font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cw-dndrow .state { margin-left: auto; font-size: .72rem; font-weight: 600; color: var(--muted); }
.cw-toggle { width: 40px; height: 22px; border-radius: 11px; background: #333; position: relative; cursor: pointer; transition: background .18s; flex-shrink: 0; }
.cw-toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #bbb; transition: transform .18s, background .18s; }
.cw-strip.avail .cw-toggle { background: rgba(63,185,80,.35); }
.cw-strip.avail .cw-toggle::after { transform: translateX(18px); background: var(--green); }
.cw-strip.avail .state { color: var(--green); }
.cw-strip.dnd .state { color: var(--ans-alert); }
.cw-notice { display: none; padding: 8px 13px; border-top: 1px solid var(--border); font-size: .64rem; line-height: 1.45; color: var(--ans-alert); background: rgba(212,106,106,.08); }
.cw-notice.show { display: block; }

/* ── Mobile: keep the dialer out of the way (desktop unchanged) ──────────
   Below the nav drawer (z 1200); collapsed pill by default; bottom-sheet
   sizing when expanded; touch-draggable (handlers in answer.js). */
@media (max-width: 900px) {
  .ans-widget { z-index: 1000; }
  .ans-widget.cw { width: min(92vw, 316px); }
  .ans-widget.cw.collapsed { width: auto; max-width: 72vw; }
  .ans-widget.cw .ans-widget-body { max-height: 74vh; overflow-y: auto; }
  .ans-widget.cw .cw-frame { height: 52vh; }
  .ans-widget.cw .ans-widget-body { flex-direction: column; }
  .ans-widget.cw .cw-main { flex: none; }
  .ans-widget.cw .cw-clinic { flex: none; max-height: none; border-left: 0; border-top: 1px solid var(--border); }
  .cw-clinic.show { display: block; }
}

/* ── Dashboard: Call Center Performance (Phase 3) ──────────── */
.ans-dash { margin-bottom: 24px; }
.ans-dash-rule { height: 2px; background: linear-gradient(90deg, var(--gold), var(--gold-lt), transparent); border-radius: 2px; margin-bottom: 14px; }
.ans-dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.ans-dash-title { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em;
  background: linear-gradient(90deg, #fff, #f3ead4, var(--gold-lt));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ans-dash-sub { font-family: var(--mono); font-size: .62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-top: 5px; }

/* Voicemail Follow-Up header — matches Call Center Performance title */
.ans-vmhead { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 26px 0 14px; }

/* range toggle + custom */
.ans-range { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ans-range-btn { font-family: var(--mono); font-size: .7rem; font-weight: 600; padding: 7px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; transition: .15s; }
.ans-range-btn:hover { border-color: var(--gold); }
.ans-range-btn.on { background: var(--gold); color: #0a0a0a; border-color: var(--gold); }
.ans-custom { display: none; align-items: center; gap: 6px; }
.ans-custom.show { display: flex; }
.ans-custom input { font-family: var(--mono); font-size: .68rem; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 7px; padding: 6px 9px; color-scheme: dark; }
.ans-custom .sep { color: var(--muted2); }
.ans-custom .go { font-family: var(--mono); font-size: .68rem; font-weight: 700; background: var(--gold); color: #0a0a0a;
  border: none; border-radius: 7px; padding: 7px 12px; cursor: pointer; }

/* tiles (Style B — gradient edge, JetBrains-light numbers) */
.ans-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.ans-tile { position: relative; border-radius: 14px; padding: 1px;
  background: linear-gradient(145deg, rgba(212,174,82,.45), rgba(38,38,38,.6) 45%); }
.ans-tile-in { background: radial-gradient(120% 120% at 0% 0%, #181613, #111 60%); border-radius: 13px; padding: 16px 17px; height: 100%; }
.ans-tile-l { font-family: var(--mono); font-size: .58rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 500; }
.ans-tile-row { display: flex; align-items: baseline; gap: 9px; margin-top: 11px; }
.ans-tile-n { font-family: var(--mono); font-size: 1.7rem; font-weight: 500; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.ans-tile.pos .ans-tile-n { color: var(--green); }
.ans-tile.neg .ans-tile-n { color: var(--ans-alert); }

/* trend pill */
.ans-trend { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-size: .6rem; font-weight: 600; }
.ans-trend .arr { font-size: .66rem; line-height: 1; }
.ans-trend.good { color: var(--green); }
.ans-trend.bad  { color: var(--ans-alert); }
.ans-trend.flat { color: var(--muted2); }

/* bottom row: condensed table (left) + calls-by-hour bar strip (right) */
.ans-botrow { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 11px; align-items: start; }
.ans-dpanel { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.ans-dpanel-head { display: flex; align-items: center; gap: 10px; padding: 11px 15px; background: var(--surface2);
  font-family: var(--mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.ans-dpanel-head .ln { flex: 1; height: 1px; background: var(--border); }

/* condensed by-rep table */
.ans-byrep table { width: 100%; border-collapse: collapse; }
.ans-byrep th { text-align: left; font-family: var(--mono); font-size: .54rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted2); padding: 7px 15px; border-bottom: 1px solid var(--border); }
.ans-byrep th.num, .ans-byrep td.num { text-align: right; }
.ans-byrep td { padding: 7px 15px; border-bottom: 1px solid var(--border); font-size: .78rem; }
.ans-byrep tr:last-child td { border-bottom: none; }
.ans-byrep tr:hover td { background: var(--surface); }
.ans-byrep .rep { font-weight: 600; }
.ans-byrep .calls { font-family: var(--mono); font-weight: 700; }
.ans-byrep .talk { font-family: var(--mono); color: var(--muted); font-size: .72rem; }

/* calls-by-hour bar strip */
.ans-hours { padding: 16px 16px 12px; }
.ans-bars { display: flex; align-items: flex-end; gap: 6px; height: 132px; }
.ans-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.ans-bar .fill { width: 100%; border-radius: 4px 4px 0 0; min-height: 2px; transition: .15s;
  background: linear-gradient(180deg, rgba(212,174,82,.85), rgba(184,150,46,.35)); }
.ans-bar.peak .fill { background: linear-gradient(180deg, var(--gold-lt), var(--gold)); }
.ans-bar .ct { font-family: var(--mono); font-size: .56rem; color: var(--muted); height: .7rem; }
.ans-bar.peak .ct { color: var(--gold-lt); font-weight: 700; }
.ans-bar .cap { font-family: var(--mono); font-size: .52rem; color: var(--muted2); }

/* responsive */
@media (max-width: 980px) {
  .ans-tiles { grid-template-columns: repeat(2, 1fr); }
  .ans-botrow { grid-template-columns: 1fr; }
}

/* clickable Missed tile */
.ans-tile.clickable { cursor: pointer; transition: transform .15s; }
.ans-tile.clickable:hover { transform: translateY(-1px); }
.ans-tile .ans-tile-hint { font-family: var(--mono); font-size: .55rem; color: var(--gold-lt); margin-top: 8px; opacity: .85; }

/* Missed-calls modal */
.ans-mc-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 4100; }
.ans-mc-scrim[hidden] { display: none; }
.ans-mc-modal { width: 520px; max-width: 92vw; max-height: 80vh; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border2); border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 70px -20px rgba(0,0,0,.8); }
.ans-mc-modal::before { content: ""; display: block; height: 2px; background: linear-gradient(90deg, var(--ans-alert), rgba(181,106,82,.3), transparent); }
.ans-mc-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.ans-mc-head h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.ans-mc-head .sub { font-family: var(--mono); font-size: .6rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; }
.ans-mc-head .x { background: none; border: none; color: var(--muted); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.ans-mc-body { overflow-y: auto; }
.ans-mc-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.ans-mc-row:last-child { border-bottom: none; }
.ans-mc-row:hover { background: var(--surface2); }
.ans-mc-num { font-family: var(--mono); font-size: .92rem; font-weight: 600; }
.ans-mc-queue { font-size: .74rem; color: var(--muted); margin-top: 2px; }
.ans-mc-time { font-family: var(--mono); font-size: .72rem; color: var(--muted); text-align: right; align-self: center; }
.ans-mc-empty { padding: 34px 18px; text-align: center; font-family: var(--mono); font-size: .78rem; color: var(--muted2); }

/* ── Missed-calls by-hour chart (ans-mcb-) — in the drilldown modal ── */
.ans-mcb { margin-bottom: 14px; }
.ans-mcb-legend { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.ans-mcb-legend .k { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.ans-mcb-legend .k.in { background: var(--gold-lt); }
.ans-mcb-legend .k.out { background: var(--muted); opacity: .5; background-image: repeating-linear-gradient(45deg, transparent 0 3px, rgba(255,255,255,.15) 3px 6px); }
.ans-mcb-bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.ans-mcb-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; height: 100%; }
.ans-mcb-stack { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.ans-mcb-in { background: var(--gold-lt); border-radius: 2px 2px 0 0; }
.ans-mcb-out { background: var(--muted); opacity: .55; background-image: repeating-linear-gradient(45deg, transparent 0 3px, rgba(255,255,255,.15) 3px 6px); border-radius: 2px 2px 0 0; }
.ans-mcb-x { font-size: 10px; color: var(--muted); margin-top: 4px; }
.ans-mcb-sum { font-size: 12px; color: var(--muted); margin-top: 10px; }
.ans-mcb-sum b { color: var(--text); }

/* ── VM hand-off modal (ans-ho-) — → Partner ──────────────── */
.ans-ho-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.66);
  backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 1rem; }
.ans-ho-modal { width: 100%; max-width: 440px; background: var(--surface);
  border: 1px solid var(--border2); border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 70px -20px rgba(0,0,0,.8); }
.ans-ho-modal::before { content: ""; display: block; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-dim), transparent); }
.ans-ho-head { padding: 16px 18px 14px; border-bottom: 1px solid var(--border); }
.ans-ho-title { font-family: var(--mono); font-size: .6rem; text-transform: uppercase;
  letter-spacing: .16em; color: var(--gold-lt); font-weight: 700; }
.ans-ho-sub { margin-top: 8px; color: #f5f5f5; font-size: 1.05rem; font-weight: 700; }
.ans-ho-ctx { margin-top: 4px; color: var(--muted); font-size: .78rem; font-family: var(--mono); }
.ans-ho-body { padding: 16px 18px 18px; }
.ans-ho-lbl { font-family: var(--mono); font-size: .62rem; text-transform: uppercase;
  letter-spacing: .14em; color: var(--muted); margin-bottom: 9px; }
.ans-ho-opt { color: var(--muted2); text-transform: none; letter-spacing: 0; }
.ans-ho-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.ans-ho-chip { background: var(--surface2); border: 1px solid var(--border2); color: #ededed;
  font-size: .78rem; padding: 7px 13px; border-radius: 20px; cursor: pointer; transition: .15s; }
.ans-ho-chip:hover { border-color: var(--gold-dim); }
.ans-ho-chip.on { background: var(--gold-glow); border-color: var(--gold); color: var(--gold-lt); font-weight: 700; }
.ans-ho-note { width: 100%; min-height: 88px; resize: vertical; background: #0a0a0a;
  border: 1px solid var(--border2); border-radius: 8px; color: #ededed;
  font-family: inherit; font-size: .9rem; padding: 11px 13px; line-height: 1.5; }
.ans-ho-note:focus { outline: none; border-color: var(--gold); }
.ans-ho-note::placeholder { color: var(--muted2); }
.ans-ho-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.ans-ho-cancel { background: transparent; border: 1px solid var(--border2); color: var(--muted);
  font-size: .8rem; font-weight: 700; padding: 9px 17px; border-radius: 7px; cursor: pointer; }
.ans-ho-cancel:hover { color: #ededed; border-color: var(--muted); }
.ans-ho-confirm { background: var(--gold); border: 1px solid var(--gold); color: #0a0a0a;
  font-size: .8rem; font-weight: 800; padding: 9px 19px; border-radius: 7px; cursor: pointer; transition: .15s; }
.ans-ho-confirm:hover:not(:disabled) { background: var(--gold-lt); }
.ans-ho-confirm:disabled { opacity: .45; cursor: not-allowed; }

/* Clinic card in the call widget — only visible while a call is up. */
/* var(--line) is not defined on this page; the sibling .cw-* rules use --border. */
/* Clinic card — its own column beside the dialer, only while a call is up.
   The body is a row: .cw-main (dialer + strip) and .cw-clinic. The widget widens
   by one column (300px) when the card shows; see cwOpenColumn in answer.js for
   why the dialer never moves. */
.ans-widget.cw .ans-widget-body { display: flex; }
.cw-main { flex: 1 1 auto; min-width: 0; }
.ans-widget.cw.clinic-open { width: 616px; }
/* max-height mirrors the body's 600px cap above. Without it, a tall card (Gilbert:
   25 rules) grows the whole flex row past 600px and the body's overflow:hidden
   clips it -- the exact bug this column exists to fix. Capped, it scrolls instead. */
.cw-clinic {
  display: none; flex: 0 0 300px; max-height: 600px; overflow-y: auto;
  padding: 10px 12px; border-left: 1px solid var(--border); background: #141414;
}
.ans-widget.cw.clinic-open .cw-clinic.show { display: block; }
.ans-widget.cw.clinic-left .cw-clinic { order: -1; border-left: 0; border-right: 1px solid var(--border); }
.cw-clinic .cc-name { font-weight: 600; font-size: 14px; }
.cw-clinic .cc-hours { font-size: 12px; margin-top: 4px; line-height: 1.4; }
.cw-clinic .cc-addr { font-size: 12px; margin-top: 4px; color: var(--muted); line-height: 1.4; }
.cw-clinic .cc-meta { font-size: 12px; margin-top: 4px; }
.cw-clinic .cc-meta a { text-decoration: underline; }
.cw-clinic .cc-rules-h { font-size: .62rem; color: var(--muted); margin-top: 10px; text-transform: uppercase; letter-spacing: .04em; }
.cw-clinic .cc-rules { margin: 4px 0 0; padding-left: 15px; }
.cw-clinic .cc-rules li { font-size: .7rem; line-height: 1.4; margin-bottom: 3px; }
