/* =========================================================================
   smrtAgents Demo — "Don't take our word for it. Call an agent."
   Standalone block stylesheet (no webpack build). Ported from the design
   handoff; every class namespaced `sad-` and scoped under `.sad-section`
   so nothing collides with the theme's .section/.row/.orb etc.
   ========================================================================= */

.sad-section {
  --sad-ink:   #1a1a18;   /* primary text; lead panel + CTA bg */
  --sad-ink-2: #8a8a83;   /* secondary text / descriptions */
  --sad-ink-3: #a9a9a1;   /* tertiary / placeholders / eyebrow */
  --sad-line:  #e9e8e3;   /* hairline borders */
  --sad-sel:   #eef0f7;   /* selected row / option wash */
  --sad-tint:  #f4f5f8;   /* call cell + call stage bg */
  --sad-accent:#2f7bf6;
  --sad-font: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.sad-section, .sad-section * { box-sizing: border-box; }

.sad-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 32px 72px;
  font-family: var(--sad-font);
  color: var(--sad-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.sad-section button,
.sad-section input { font-family: var(--sad-font); }

/* ===================== SECTION HEADER ===================== */
.sad-sec-head { margin: 0 0 32px; }
.sad-sec-eyebrow {
  display: inline-block; font-size: 14px; font-weight: 600; letter-spacing: .01em;
  color: var(--sad-ink-3); margin-bottom: 22px; text-transform: none;
}
.sad-sec-row { display: grid; grid-template-columns: 1fr 1.18fr; gap: 0; align-items: end; }
.sad-sec-title {
  font-size: clamp(28px, 3.2vw, 40px); line-height: 1.07; letter-spacing: -0.035em;
  font-weight: 600; margin: 0; color: var(--sad-ink); text-wrap: balance; padding-right: 24px;
}
.sad-sec-sub {
  font-size: 17px; line-height: 1.55; color: var(--sad-ink-2); margin: 0;
  text-wrap: pretty; padding-left: 36px; padding-right: 36px;
}

/* ===================== OUTER CARD ===================== */
.sad-card {
  position: relative; display: grid; grid-template-columns: 1fr 1.18fr;
  border: 1px solid var(--sad-line); border-radius: 18px; overflow: hidden; background: #fff;
  height: clamp(440px, calc(100vh - 300px), 576px);
}
.sad-card--empty { display: block; height: auto; padding: 48px 32px; }
.sad-noagents { margin: 0; color: var(--sad-ink-2); font-size: 16px; }

/* ===================== LEFT — list ===================== */
/* min-width:0 lets this grid track shrink below the long agent names'
   min-content width — otherwise the card overflows on narrow screens. */
.sad-dl { display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 18px; }
.sad-dl-list {
  display: flex; flex-direction: column; gap: 4px; overflow-y: auto; flex: 1; min-height: 0;
  padding: 2px 4px 28px 2px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}
.sad-dl-list::-webkit-scrollbar { width: 0; display: none; }

/* ---- text-only filter dropdowns ---- */
.sad-flt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding: 6px 14px 16px; }
.sad-flt-dd { position: relative; }
.sad-flt-btn {
  display: inline-flex; align-items: center; gap: 8px; background: none; border: none;
  padding: 6px 2px; cursor: pointer; font-size: 18px; font-weight: 400; letter-spacing: -0.01em;
  color: var(--sad-ink-2); transition: color .14s;
}
.sad-flt-btn:hover, .sad-flt-btn.is-open { color: var(--sad-ink); }
.sad-flt-val { white-space: nowrap; }
.sad-flt-chev { color: var(--sad-ink-3); flex: none; transition: transform .16s; }
.sad-flt-btn.is-open .sad-flt-chev { transform: rotate(180deg); }
.sad-flt-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 41; min-width: 220px;
  background: #fff; border: 1px solid var(--sad-line); border-radius: 13px;
  box-shadow: 0 16px 44px rgba(22,22,45,0.16); padding: 6px; max-height: 320px; overflow-y: auto;
}
.sad-flt-menu[hidden] { display: none; }
.sad-flt-opt {
  width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: none;
  border-radius: 9px; padding: 9px 11px; cursor: pointer; font-size: 15px; color: var(--sad-ink-2);
  text-align: left; transition: background .12s, color .12s;
}
.sad-flt-opt:hover { background: #eef0f7; color: var(--sad-ink); }
.sad-flt-opt.is-sel { background: var(--sad-sel); color: var(--sad-ink); font-weight: 600; }
.sad-flt-opt span:last-child { flex: 1; white-space: nowrap; }
.sad-dl-empty { padding: 26px 16px; color: var(--sad-ink-3); font-size: 15px; }
.sad-dl-empty[hidden] { display: none; }

/* trainer logo circles */
.sad-tc { border-radius: 50%; color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; line-height: 1; overflow: hidden; }
/* when the trainer has a logo, show it on a light disc instead of initials */
.sad-tc--logo { background: #f3f4f6; }
.sad-tc--logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; display: block; }
.sad-tc-stack { display: inline-flex; align-items: center; flex: none; margin-right: 2px; }
.sad-tc-stack .sad-tc { border: 2px solid #fff; margin-left: -8px; box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
.sad-tc-stack .sad-tc:first-child { margin-left: 0; }

/* ---- rows ---- */
.sad-row {
  display: flex; align-items: center; gap: 18px; width: 100%; text-align: left; cursor: pointer;
  background: none; border: none; padding: 13px 16px; border-radius: 14px; flex: none; transition: background .14s;
}
.sad-row:hover { background: #f2f4fb; }
.sad-row.is-sel { background: var(--sad-sel); }
.sad-row[hidden] { display: none; }
.sad-row-tile {
  width: 56px; height: 56px; flex: none; border-radius: 13px; border: 1px solid var(--sad-line);
  background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden;
  font-size: 12px; font-weight: 600; letter-spacing: .09em; color: var(--sad-ink-3);
}
/* row tile showing the trainer logo (falls back to initials when none) */
.sad-row-tile--logo { padding: 9px; }
.sad-row-tile--logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sad-row-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sad-row-name { font-size: 20px; font-weight: 400; color: var(--sad-ink); letter-spacing: -0.015em; line-height: 1.18; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sad-row-sub { font-size: 15px; font-weight: 400; color: var(--sad-ink-2); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===================== RIGHT — detail ===================== */
.sad-dr { position: relative; border-left: 1px solid var(--sad-line); display: grid; grid-template-rows: 1fr auto; min-height: 0; min-width: 0; }

.sad-dr-read { padding: 32px 36px; min-height: 0; overflow: hidden; }
.sad-dr-name { font-size: clamp(22px, 2.3vw, 28px); font-weight: 400; color: var(--sad-ink); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 16px; }
.sad-dr-desc { font-size: 17px; font-weight: 400; line-height: 1.55; color: var(--sad-ink-2); margin: 0; text-wrap: pretty; }
.sad-dr-stats { display: flex; flex-wrap: wrap; gap: 26px; margin: 22px 0 0; padding: 0; list-style: none; }
.sad-dr-stat { display: flex; flex-direction: column; gap: 2px; }
.sad-dr-stat-v { font-size: 18px; font-weight: 600; color: var(--sad-ink); letter-spacing: -0.01em; }
.sad-dr-stat-k { font-size: 12.5px; color: var(--sad-ink-3); }

/* footer: flush banner | compact call cell */
.sad-dr-foot { border-top: 1px solid var(--sad-line); display: grid; grid-template-columns: 363px 1fr; min-height: 0; }
.sad-foot-banner { padding: 0; display: block; min-width: 0; }
.sad-foot-banner .sad-pb { display: block; width: 363px; border-radius: 0; aspect-ratio: 2 / 1; }
.sad-foot-call { border-left: 1px solid var(--sad-line); background: var(--sad-tint); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 0 10px; text-align: center; }

/* ===== THE single travelling call orb ===== */
.sad-orb {
  position: relative; width: 160px; height: 160px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #fff; background: #16357f;
  box-shadow: 0 12px 30px rgba(22,46,128,0.40); isolation: isolate;
  transition: box-shadow .3s ease, transform .55s cubic-bezier(.2,.85,.26,1), opacity .26s ease;
}
.sad-orb:hover { box-shadow: 0 16px 40px rgba(22,46,128,0.52); }
.sad-orb-fluidwrap { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; z-index: 0; }
.sad-orb-fluid {
  position: absolute; inset: -45%; border-radius: 50%;
  background:
    radial-gradient(38% 38% at 30% 28%, #6fc4ff 0%, transparent 60%),
    radial-gradient(42% 42% at 72% 34%, #2f6bf6 0%, transparent 58%),
    radial-gradient(46% 46% at 64% 74%, #1c3aa8 0%, transparent 60%),
    radial-gradient(40% 40% at 24% 72%, #2fd0c8 0%, transparent 56%),
    radial-gradient(34% 34% at 80% 78%, #5a52e6 0%, transparent 58%),
    radial-gradient(70% 70% at 50% 50%, #2050cf 0%, transparent 72%),
    #1a3a96;
  filter: blur(9px) saturate(1.12);
  animation: sadOrbFlow 17s ease-in-out infinite, sadOrbHue 23s ease-in-out infinite;
  will-change: transform, filter;
}
@keyframes sadOrbFlow {
  0%   { transform: rotate(0deg)   scale(1.06) translate(0, 0); }
  25%  { transform: rotate(95deg)  scale(1.16) translate(5%, -4%); }
  50%  { transform: rotate(184deg) scale(1.08) translate(-4%, 5%); }
  75%  { transform: rotate(272deg) scale(1.17) translate(4%, 3%); }
  100% { transform: rotate(360deg) scale(1.06) translate(0, 0); }
}
@keyframes sadOrbHue {
  0%, 100% { filter: blur(9px) saturate(1.12) hue-rotate(0deg); }
  50%      { filter: blur(9px) saturate(1.18) hue-rotate(-28deg); }
}
.sad-orb.is-live .sad-orb-fluid { animation-duration: 8.5s, 14s; filter: blur(8px) saturate(1.25); }

.sad-orb-grain {
  position: absolute; inset: 0; border-radius: 50%; z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 90px 90px; opacity: 0.20; mix-blend-mode: overlay;
}
.sad-orb-shade {
  position: absolute; inset: 0; border-radius: 50%; z-index: 1; pointer-events: none;
  background:
    radial-gradient(58% 52% at 33% 28%, rgba(255,255,255,0.42) 0%, rgba(255,255,255,0) 55%),
    radial-gradient(125% 125% at 50% 46%, transparent 52%, rgba(7,16,52,0.58) 100%);
  box-shadow: inset 0 -7px 16px rgba(6,14,45,0.5), inset 0 5px 11px rgba(255,255,255,0.16);
}
.sad-orb-float {
  position: absolute; z-index: 9; transform-origin: center center;
  transition: transform .55s cubic-bezier(.2,.85,.26,1), box-shadow .3s ease, opacity .26s ease;
}
.sad-orb-float.is-big { box-shadow: 0 18px 46px rgba(22,46,128,0.46); }

.sad-foot-slot { width: 76px; height: 76px; flex: none; }
.sad-stage-slot { width: 132px; height: 132px; flex: none; }

.sad-orb::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1.5px solid rgba(60,110,230,0.34); animation: sadOrbPulse 2.6s ease-out infinite; z-index: -1; }
.sad-orb.is-live::before { border-color: rgba(60,110,230,0.55); animation-duration: 1.5s; }
@keyframes sadOrbPulse { 0% { transform: scale(.92); opacity: .65; } 100% { transform: scale(1.16); opacity: 0; } }

.sad-orb svg { width: 28px; height: 28px; position: relative; z-index: 2; filter: drop-shadow(0 1px 3px rgba(4,14,50,0.45)); }
.sad-orb-wave { display: inline-flex; align-items: center; gap: 4px; height: 28px; position: relative; z-index: 2; }
.sad-orb-wave i { width: 4px; height: 8px; background: #fff; border-radius: 3px; animation: sadOwave .72s ease-in-out infinite; }
@keyframes sadOwave { 0%,100% { height: 7px; } 50% { height: 26px; } }

.sad-foot-call-label { font-size: 13px; font-weight: 400; color: var(--sad-ink-2); line-height: 1.3; }
.sad-foot-call-label b { font-weight: 600; color: var(--sad-ink); }

/* ===================== LEAD takeover (covers the whole card) ===================== */
.sad-leadbox {
  position: absolute; top: 0; bottom: 0; right: 0; left: -84.7%; z-index: 8; background: var(--sad-ink);
  color: #fff; display: flex; align-items: center; justify-content: center; padding: 32px; opacity: 0;
  transform: translateY(18px) scale(.985); transition: opacity .3s ease, transform .34s cubic-bezier(.2,.85,.3,1);
}
.sad-leadbox.shown { opacity: 1; transform: none; }
.sad-leadbox-in { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.sad-leadbox-ic { width: 48px; height: 48px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; }
.sad-leadbox-h { font-size: 23px; font-weight: 500; letter-spacing: -0.02em; margin: 4px 0 0; }
.sad-leadbox-p { font-size: 14.5px; color: rgba(255,255,255,0.62); margin: 0; line-height: 1.5; }
.sad-leadbox-form { display: flex; gap: 8px; width: 100%; margin-top: 8px; }
.sad-leadbox-form input { flex: 1; font-size: 15px; padding: 14px 16px; border-radius: 9px; border: 1.5px solid #34343a; background: #1f1f22; color: #fff; outline: none; transition: border-color .15s; }
.sad-leadbox-form input:focus { border-color: #6a6a72; }
.sad-leadbox-form input::placeholder { color: #82827f; }
.sad-leadbox-form input.is-err { border-color: #ff7174; }
.sad-leadbox-send { border: none; background: #fff; color: var(--sad-ink); font-size: 15px; font-weight: 600; padding: 0 22px; border-radius: 9px; cursor: pointer; transition: opacity .15s; white-space: nowrap; }
.sad-leadbox-send:hover { opacity: .88; }
.sad-leadbox-send:disabled { opacity: .55; cursor: default; }
.sad-leadbox-err { font-size: 12.5px; color: #ff9093; }
.sad-leadbox-close { position: absolute; top: 16px; right: 18px; width: 34px; height: 34px; border: none; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); border-radius: 50%; font-size: 19px; line-height: 1; cursor: pointer; transition: background .15s, color .15s; }
.sad-leadbox-close:hover { background: rgba(255,255,255,0.16); color: #fff; }
.sad-leadbox-check { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid #fff; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.sad-leadbox-back { margin-top: 4px; border: 1px solid rgba(255,255,255,0.22); background: none; color: #fff; font-size: 14px; padding: 11px 20px; border-radius: 999px; cursor: pointer; transition: background .15s; }
.sad-leadbox-back:hover { background: rgba(255,255,255,0.1); }

/* ===================== CALL STAGE TAKEOVER ===================== */
.sad-dr-stage {
  position: absolute; inset: 0; z-index: 7; background: var(--sad-tint);
  display: flex; flex-direction: column; padding: 22px 26px 20px;
  clip-path: inset(54% 0 0 50%); opacity: .55;
  transition: clip-path .46s cubic-bezier(.2,.85,.26,1), opacity .34s ease;
}
.sad-dr-stage.grown { clip-path: inset(0 0 0 0); opacity: 1; }
.sad-stage-back {
  position: absolute; top: 14px; right: 14px; left: auto; z-index: 4;
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0;
  border: none; background: rgba(20,22,40,0.05); color: var(--sad-ink-2); border-radius: 50%; cursor: pointer;
  transition: background .14s, color .14s;
}
.sad-stage-back:hover { background: rgba(20,22,40,0.09); color: var(--sad-ink); }

.sad-stage-top { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 9px; padding-top: 4px; min-height: 94px; }
.sad-stage-label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sad-ink-3); }
.sad-stage-sugg { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 100%; }
.sad-sugg {
  font-family: var(--sad-font); font-size: 13.5px; color: var(--sad-ink-2); background: rgba(20,22,50,0.045);
  border: 1px solid transparent; padding: 9px 16px; border-radius: 12px; cursor: pointer;
  transition: background .15s, color .15s; max-width: 94%; text-align: center; line-height: 1.35;
}
.sad-sugg:hover:not(:disabled) { background: rgba(20,22,50,0.085); color: var(--sad-ink); }
.sad-sugg:disabled { opacity: .5; cursor: default; }

.sad-stage-mid { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.sad-stage-orbwrap { position: relative; display: flex; flex-direction: column; align-items: center; }
.sad-stage-bubble {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 22px; z-index: 3;
  width: max-content; max-width: 280px; background: #fff; color: var(--sad-ink); font-size: 14px; line-height: 1.42;
  padding: 11px 15px; border-radius: 16px; box-shadow: 0 14px 40px rgba(22,22,45,0.16); text-align: left;
  text-wrap: pretty; animation: sadBubblePop .26s ease;
}
.sad-stage-bubble::after { content: ""; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%) rotate(45deg); width: 12px; height: 12px; background: #fff; border-radius: 0 0 3px 0; }
.sad-stage-bubble.soft { color: var(--sad-ink-3); }
@keyframes sadBubblePop { from { opacity: 0; transform: translate(-50%, 5px); } to { opacity: 1; transform: translate(-50%, 0); } }
.sad-stage-clabel { margin-top: 22px; font-size: 14px; color: var(--sad-ink-2); text-align: center; white-space: nowrap; }
.sad-stage-clabel b { font-weight: 600; color: var(--sad-ink); }
.sad-stage-timer { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--sad-ink); }

.sad-stage-lead { position: relative; z-index: 2; margin-top: auto; }
.sad-lead-cta {
  width: 100%; display: flex; align-items: center; gap: 14px; cursor: pointer; background: var(--sad-ink);
  color: #fff; border: none; border-radius: 15px; padding: 14px 18px; text-align: left;
  box-shadow: 0 10px 28px rgba(20,20,40,0.16); transition: transform .15s, box-shadow .15s;
}
.sad-lead-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(20,20,40,0.22); }
.sad-lead-cta-ic { width: 36px; height: 36px; flex: none; border-radius: 10px; background: rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; }
.sad-lead-cta-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sad-lead-cta-l1 { font-size: 14.5px; font-weight: 600; }
.sad-lead-cta-dim { font-size: 12.5px; color: rgba(255,255,255,0.6); }
.sad-lead-cta-go { font-size: 18px; opacity: .85; transition: transform .15s; }
.sad-lead-cta:hover .sad-lead-cta-go { transform: translateX(4px); }

/* persona placeholder banner */
.sad-pb { position: relative; aspect-ratio: 16 / 7.2; width: 100%; overflow: hidden; background: #1f2a4a; container-type: inline-size; }
.sad-pb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sad-pbph-dots { position: absolute; inset: 0; opacity: .5; background-image: radial-gradient(rgba(255,255,255,0.16) 1.3px, transparent 1.6px); background-size: 7% 16%; -webkit-mask-image: linear-gradient(95deg, transparent, #000 55%); mask-image: linear-gradient(95deg, transparent, #000 55%); }
.sad-pbph-body { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 9%; }
.sad-pbph-logo { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-size: clamp(11px, 4cqw, 17px); font-weight: 400; letter-spacing: -0.01em; }
.sad-pbph-logo b { font-weight: 700; }
.sad-pbph-name { color: #fff; font-weight: 700; font-size: clamp(22px, 11cqw, 42px); line-height: 1; letter-spacing: -0.02em; text-transform: uppercase; text-shadow: 0 2px 12px rgba(0,0,0,0.22); }
.sad-pbph-role { align-self: flex-start; margin-top: 9px; color: #fff; background: rgba(0,0,0,0.34); border-radius: 999px; padding: 6px 15px; font-size: clamp(10px, 3.4cqw, 14px); font-weight: 600; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 920px) {
  .sad-shell { padding: 40px 16px 56px; }
  .sad-sec-row { grid-template-columns: 1fr; gap: 16px; }
  .sad-sec-title { padding-right: 0; }
  .sad-sec-sub { padding-left: 0; padding-right: 0; }
  .sad-card { grid-template-columns: 1fr; height: auto; }
  .sad-dl { max-height: 320px; border-bottom: 1px solid var(--sad-line); }
  .sad-dr { border-left: none; }
  .sad-dr-read { padding: 26px 22px; min-height: 200px; }
  .sad-dr-foot { grid-template-columns: 1fr; }
  .sad-foot-banner .sad-pb { width: 100%; }
  .sad-foot-call { border-left: none; border-top: 1px solid var(--sad-line); min-height: 150px; }
  .sad-leadbox { left: 0; }
  .sad-dr-stage { min-height: 420px; }
}
@media (max-width: 460px) {
  .sad-row-name { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .sad-orb::before, .sad-orb-wave i, .sad-orb-fluid { animation: none !important; }
  .sad-dr-stage, .sad-leadbox, .sad-orb, .sad-orb-float { transition: none !important; }
}
