/* reddenda-chat.css — public "Tuenda" chat widget.
   Brand: night-sky #03060f, cyan #00E5FF, violet #a78bff, Space Grotesk + IBM Plex.
   Motion: transform/opacity only (60fps), prefers-reduced-motion honored, 320px-safe. */

.rdc-root {
  --rdc-bg: #0a0f1c; --rdc-panel: #0c1220; --rdc-line: rgba(255,255,255,.08);
  --rdc-cyan: #22D3EE; --rdc-violet: #a78bff; --rdc-ink: #e8edf6; --rdc-dim: #9aa6bd;
  /* single-accent doctrine (2026-07-07): the FAB and chat accents ride the canonical
     teal->cyan signal ramp; the periwinkle/violet second accent is retired here. */
  --rdc-grad: linear-gradient(120deg, #0FB5A6 0%, #22D3EE 100%);
  position: fixed; right: 20px; bottom: 20px; z-index: 2147483000;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  /* The root is a transparent fixed container; on mobile it spans the full width
     (left:12/right:12) but only shows the launcher at the right. It must NOT capture
     clicks in its empty area, or it covers page CTAs beneath it (e.g. the light-home
     "Learn more" fab). Only the real interactive children re-enable pointer events. */
  pointer-events: none;
}

/* Launcher */
.rdc-launch {
  display: flex; align-items: center; gap: 9px; height: 54px; padding: 0 20px 0 18px;
  border: 0; border-radius: 28px; cursor: pointer; background: var(--rdc-grad); color: #04121a;
  font-weight: 600; font-size: 15px; letter-spacing: .1px; pointer-events: auto;
  box-shadow: 0 10px 30px rgba(0,229,255,.28), 0 2px 8px rgba(0,0,0,.4);
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s; will-change: transform;
}
.rdc-launch:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0,229,255,.36); }
.rdc-launch:active { transform: translateY(0) scale(.98); }
.rdc-launch svg { width: 20px; height: 20px; flex: 0 0 auto; }
.rdc-launch .rdc-pulse { position: absolute; right: 14px; top: 12px; width: 9px; height: 9px; border-radius: 50%; background: #62FF8F; animation: rdc-pulse 2.4s ease-out infinite; }
@keyframes rdc-pulse { 0%{opacity:1;transform:scale(.9)} 70%{opacity:0;transform:scale(2.4)} 100%{opacity:0} }
.rdc-root.is-open .rdc-launch { transform: scale(.6); opacity: 0; pointer-events: none; }

/* Panel */
.rdc-panel {
  position: absolute; right: 0; bottom: 0; width: 380px; max-width: calc(100vw - 32px);
  height: 580px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; overflow: hidden;
  background: var(--rdc-panel); border: 1px solid var(--rdc-line); border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
  opacity: 0; transform: translateY(14px) scale(.98); transform-origin: bottom right;
  pointer-events: none; transition: opacity .2s ease, transform .26s cubic-bezier(.2,.8,.2,1);
}
.rdc-root.is-open .rdc-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.rdc-head { display: flex; align-items: center; gap: 11px; padding: 14px 14px 13px; border-bottom: 1px solid var(--rdc-line);
  background: radial-gradient(120% 140% at 0% 0%, rgba(0,229,255,.10), transparent 60%), var(--rdc-bg); }
.rdc-avatar { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; background: var(--rdc-grad); display: grid; place-items: center; color: #04121a; }
.rdc-avatar svg { width: 18px; height: 18px; }
.rdc-title { flex: 1; min-width: 0; }
.rdc-title b { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 15.5px; color: var(--rdc-ink); font-weight: 600; letter-spacing: .2px; }
.rdc-title span { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--rdc-dim); }
.rdc-title span i { width: 6px; height: 6px; border-radius: 50%; background: #62FF8F; box-shadow: 0 0 8px #62FF8F; flex: 0 0 auto; }
.rdc-close { width: 32px; height: 32px; border: 0; border-radius: 9px; cursor: pointer; background: rgba(255,255,255,.05); color: var(--rdc-dim); font-size: 18px; line-height: 1; transition: background .15s, color .15s; }
.rdc-close:hover { background: rgba(255,255,255,.1); color: var(--rdc-ink); }

/* Chat body */
.rdc-body { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.rdc-log { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 11px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent; }
.rdc-log::-webkit-scrollbar { width: 8px; }
.rdc-log::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 8px; }

.rdc-row { display: flex; flex-direction: column; max-width: 90%; }
.rdc-row.me { align-self: flex-end; align-items: flex-end; }
.rdc-row.bot { align-self: flex-start; align-items: flex-start; }
.rdc-msg { padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.rdc-msg.bot { background: rgba(255,255,255,.05); border: 1px solid var(--rdc-line); color: var(--rdc-ink); border-bottom-left-radius: 5px; }
.rdc-msg.me { background: var(--rdc-grad); color: #04121a; font-weight: 500; border-bottom-right-radius: 5px; }
.rdc-msg a { color: var(--rdc-cyan); }
.rdc-msg.me a { color: #04121a; }

.rdc-ctas { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.rdc-cta { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; font-size: 12.5px; font-weight: 500; padding: 8px 13px; border-radius: 999px;
  background: rgba(0,229,255,.12); border: 1px solid rgba(0,229,255,.4); color: #d7f6ff; transition: background .15s, transform .15s, border-color .15s; }
.rdc-cta::after { content: '\2192'; opacity: .7; }
.rdc-cta:hover { background: rgba(0,229,255,.22); border-color: var(--rdc-cyan); transform: translateY(-1px); }

.rdc-typing { display: inline-flex; gap: 4px; padding: 13px 14px; background: rgba(255,255,255,.05); border: 1px solid var(--rdc-line); border-radius: 14px; border-bottom-left-radius: 5px; }
.rdc-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--rdc-dim); opacity: .5; animation: rdc-bounce 1.2s infinite ease-in-out; }
.rdc-typing i:nth-child(2){ animation-delay: .15s; } .rdc-typing i:nth-child(3){ animation-delay: .3s; }
@keyframes rdc-bounce { 0%,80%,100%{ transform: translateY(0); opacity:.4 } 40%{ transform: translateY(-4px); opacity:1 } }

.rdc-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 14px 12px; }
.rdc-chip { border: 1px solid rgba(167,139,255,.34); background: rgba(167,139,255,.07); color: var(--rdc-ink); font-size: 12.5px; padding: 8px 13px; border-radius: 999px; cursor: pointer; transition: background .15s, transform .15s, border-color .15s; }
.rdc-chip:hover { background: rgba(167,139,255,.16); border-color: var(--rdc-violet); transform: translateY(-1px); }

/* Footer input */
.rdc-foot { border-top: 1px solid var(--rdc-line); padding: 11px; background: var(--rdc-bg); }
.rdc-inputrow { display: flex; gap: 9px; align-items: flex-end; }
.rdc-input { flex: 1; resize: none; max-height: 110px; min-height: 22px; background: rgba(255,255,255,.04); border: 1px solid var(--rdc-line); border-radius: 12px; color: var(--rdc-ink); font: inherit; font-size: 16px; padding: 10px 12px; line-height: 1.4; outline: none; transition: border-color .15s; }
.rdc-input:focus { border-color: rgba(0,229,255,.5); }
.rdc-input::placeholder { color: var(--rdc-dim); }
.rdc-send { width: 42px; height: 42px; flex: 0 0 auto; border: 0; border-radius: 12px; cursor: pointer; background: var(--rdc-grad); color: #04121a; display: grid; place-items: center; transition: transform .15s, opacity .15s; }
.rdc-send:hover { transform: translateY(-1px); }
.rdc-send:disabled { opacity: .4; cursor: default; transform: none; }
.rdc-send svg { width: 18px; height: 18px; }
.rdc-legal { margin: 8px 2px 0; font-size: 10.5px; color: var(--rdc-dim); text-align: center; }

/* Talent form view */
.rdc-form { display: none; flex: 1; min-height: 0; overflow-y: auto; flex-direction: column; gap: 11px; padding: 16px 16px 20px; }
.rdc-panel.show-form .rdc-form { display: flex; }
.rdc-panel.show-form .rdc-body, .rdc-panel.show-form .rdc-foot { display: none; }
.rdc-back { align-self: flex-start; background: none; border: 0; color: var(--rdc-dim); font: inherit; font-size: 13px; cursor: pointer; padding: 2px 0; }
.rdc-back:hover { color: var(--rdc-ink); }
.rdc-form h3 { margin: 2px 0 0; font-family: 'Space Grotesk', sans-serif; font-size: 18px; color: var(--rdc-ink); }
.rdc-formsub { margin: 0 0 4px; font-size: 13px; line-height: 1.5; color: var(--rdc-dim); }
.rdc-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--rdc-dim); }
.rdc-form label span { color: rgba(154,166,189,.7); }
.rdc-form input[type=text], .rdc-form input[type=email], .rdc-form input[type=tel], .rdc-form textarea {
  background: rgba(255,255,255,.04); border: 1px solid var(--rdc-line); border-radius: 10px; color: var(--rdc-ink); font: inherit; font-size: 16px; padding: 10px 12px; outline: none; transition: border-color .15s; }
.rdc-form input:focus, .rdc-form textarea:focus { border-color: rgba(0,229,255,.5); }
.rdc-form textarea { resize: vertical; min-height: 64px; }
.rdc-filelbl input[type=file] { font-size: 12.5px; color: var(--rdc-dim); padding: 8px 0 0; }
.rdc-filelbl input::file-selector-button { background: rgba(0,229,255,.12); border: 1px solid rgba(0,229,255,.4); color: #d7f6ff; border-radius: 8px; padding: 7px 12px; font: inherit; font-size: 12.5px; cursor: pointer; margin-right: 10px; }
.rdc-formmsg { font-size: 12.5px; min-height: 16px; color: var(--rdc-dim); }
.rdc-formmsg.err { color: #ff8a8a; }
.rdc-formsend { margin-top: 2px; border: 0; border-radius: 12px; cursor: pointer; background: var(--rdc-grad); color: #04121a; font: inherit; font-weight: 600; font-size: 15px; padding: 12px; transition: transform .15s, opacity .15s; }
.rdc-formsend:hover { transform: translateY(-1px); }
.rdc-formsend:disabled { opacity: .55; cursor: default; transform: none; }

/* ── Proactive specialty wizard teaser ───────────────────────────── */
.rdc-teaser {
  position: absolute; right: 0; bottom: 72px; width: 344px; max-width: calc(100vw - 28px);
  background:
    radial-gradient(130% 90% at 100% 0%, rgba(167,139,255,.12), transparent 55%),
    radial-gradient(120% 80% at 0% 0%, rgba(0,229,255,.10), transparent 55%),
    var(--rdc-panel);
  border: 1px solid var(--rdc-line); border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.5), 0 2px 10px rgba(0,0,0,.4);
  padding: 15px 16px 16px; color: var(--rdc-ink);
  opacity: 0; transform: translateY(14px) scale(.97); transform-origin: bottom right;
  pointer-events: none; transition: opacity .26s ease, transform .32s cubic-bezier(.2,.8,.2,1);
}
.rdc-teaser.show { opacity: 1; transform: none; pointer-events: auto; }
.rdc-root.is-open .rdc-teaser { opacity: 0 !important; transform: translateY(8px) scale(.97) !important; pointer-events: none !important; }

.rdc-tz-x { position: absolute; top: 9px; right: 9px; width: 26px; height: 26px; border: 0; border-radius: 8px;
  cursor: pointer; background: rgba(255,255,255,.05); color: var(--rdc-dim); font-size: 17px; line-height: 1; transition: background .15s, color .15s; }
.rdc-tz-x:hover { background: rgba(255,255,255,.12); color: var(--rdc-ink); }

.rdc-tz-head { display: flex; align-items: center; gap: 10px; padding-right: 26px; }
.rdc-tz-av { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; background: var(--rdc-grad); display: grid; place-items: center; color: #04121a; }
.rdc-tz-av svg { width: 17px; height: 17px; }
.rdc-tz-id b { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 14.5px; font-weight: 600; color: var(--rdc-ink); letter-spacing: .2px; line-height: 1.1; }
.rdc-tz-id span { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--rdc-dim); margin-top: 2px; }
.rdc-tz-id span i { width: 6px; height: 6px; border-radius: 50%; background: #62FF8F; box-shadow: 0 0 8px #62FF8F; flex: 0 0 auto; }

.rdc-tz-body { margin-top: 12px; transition: opacity .13s ease; }
.rdc-tz-q { margin: 0 0 11px; font-size: 14px; line-height: 1.5; color: var(--rdc-ink); }
.rdc-tz-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.rdc-tz-chip { border: 1px solid rgba(167,139,255,.34); background: rgba(167,139,255,.08); color: var(--rdc-ink);
  font: inherit; font-size: 12.5px; padding: 8px 13px; border-radius: 999px; cursor: pointer;
  transition: background .15s, transform .15s, border-color .15s; }
.rdc-tz-chip:hover { background: rgba(167,139,255,.18); border-color: var(--rdc-violet); transform: translateY(-1px); }
.rdc-tz-chip.alt { border-color: rgba(0,229,255,.32); background: rgba(0,229,255,.08); }
.rdc-tz-chip.alt:hover { background: rgba(0,229,255,.18); border-color: var(--rdc-cyan); }

.rdc-tz-tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .2px; color: var(--rdc-dim);
  background: rgba(255,255,255,.05); border: 1px solid var(--rdc-line); padding: 3px 9px; border-radius: 999px; }
.rdc-tz-title { margin: 9px 0 6px; font-family: 'Space Grotesk', sans-serif; font-size: 16.5px; font-weight: 600; color: var(--rdc-ink); letter-spacing: .2px; line-height: 1.2; }
.rdc-tz-why { margin: 0 0 13px; font-size: 13px; line-height: 1.55; color: var(--rdc-dim); }
.rdc-tz-go { display: flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none;
  background: var(--rdc-grad); color: #04121a; font-weight: 600; font-size: 14px; padding: 11px 14px; border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0,229,255,.22); transition: transform .15s, box-shadow .15s; }
.rdc-tz-go::after { content: '\2192'; font-weight: 700; }
.rdc-tz-go:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(0,229,255,.32); }
.rdc-tz-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 11px; }
.rdc-tz-sec, .rdc-tz-ask, .rdc-tz-back { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 12.5px; color: var(--rdc-dim); text-decoration: none; transition: color .15s; }
.rdc-tz-sec { color: var(--rdc-cyan); }
.rdc-tz-ask:hover, .rdc-tz-back:hover, .rdc-tz-sec:hover { color: var(--rdc-ink); }
.rdc-tz-back { margin-left: auto; }

/* Mobile bottom sheet (HERO-7SEC 2026-07-06: raised 480px -> 768px per the occlusion contract) */
@media (max-width: 768px) {
  .rdc-root { right: 12px; bottom: 12px; left: 12px; display: flex; justify-content: flex-end; }
  .rdc-panel { position: fixed; left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; height: 88vh; max-height: 88vh; border-radius: 18px 18px 0 0; }
  .rdc-teaser { right: 0; left: 0; bottom: 66px; width: auto; max-width: 100%; }
}

/* HERO-7SEC occlusion contract: while a sticky bottom CTA bar is on screen, the launcher
   and teaser ride above it so they can never overlap a [data-primary-cta] element. */
body.has-sticky-cta .rdc-root { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
body.has-sticky-cta .rdc-teaser { bottom: 66px; }
@media (prefers-reduced-motion: reduce) {
  .rdc-launch, .rdc-panel, .rdc-chip, .rdc-cta, .rdc-send, .rdc-formsend, .rdc-teaser, .rdc-tz-go, .rdc-tz-chip { transition: none; }
  .rdc-pulse, .rdc-typing i { animation: none; }
  .rdc-root.is-open .rdc-launch { opacity: 0; }
}

/* ── Tuenda site-guide steps + video nudge (David 2026-06-17) — dark teaser card, reads on light+dark ── */
.rdc-tz-steps{list-style:none;margin:0 0 12px;padding:0;display:flex;flex-direction:column;gap:8px;counter-reset:none}
.rdc-tz-step a{display:flex;align-items:flex-start;gap:11px;text-decoration:none;padding:10px 11px;border-radius:12px;
  border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.035);transition:background .16s,border-color .16s,transform .16s}
.rdc-tz-step a:hover{background:rgba(0,229,255,.10);border-color:rgba(0,229,255,.32);transform:translateY(-1px)}
.rdc-tz-step__n{flex:0 0 auto;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;
  font:700 12px/1 'Space Grotesk',sans-serif;color:#04121a;background:var(--rdc-grad);margin-top:1px}
.rdc-tz-step__tx{display:flex;flex-direction:column;min-width:0;line-height:1.3}
.rdc-tz-step__tx b{font-size:13px;font-weight:600;color:var(--rdc-ink)}
.rdc-tz-step__tx i{font-style:normal;font-size:11.5px;color:var(--rdc-dim);margin-top:2px}
.rdc-tz-step__ar{margin-left:auto;align-self:center;color:var(--rdc-dim);font-weight:700;transition:transform .16s,color .16s}
.rdc-tz-step a:hover .rdc-tz-step__ar{color:var(--rdc-cyan);transform:translateX(2px)}
.rdc-tz-video{display:flex;align-items:center;gap:9px;text-decoration:none;margin:0 0 12px;padding:11px 13px;border-radius:12px;
  font-size:13px;font-weight:600;color:var(--rdc-ink);border:1px solid rgba(167,139,255,.30);
  background:linear-gradient(100deg,rgba(167,139,255,.12),rgba(0,229,255,.10));transition:transform .16s,box-shadow .16s,border-color .16s}
.rdc-tz-video:hover{transform:translateY(-1px);border-color:var(--rdc-violet);box-shadow:0 10px 26px -12px rgba(167,139,255,.5)}
.rdc-tz-video__p{flex:0 0 auto;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-size:10px;color:#04121a;background:var(--rdc-grad)}
.rdc-tz-video--solo{margin-top:4px;font-size:14px;padding:13px 15px}
.rdc-tz-vsub{margin:0 0 12px;font-size:12px;line-height:1.5;color:var(--rdc-dim)}
.rdc-tz-spec{background:none;border:0;padding:0;cursor:pointer;font:inherit;font-size:12.5px;font-weight:600;color:var(--rdc-cyan);transition:color .15s}
.rdc-tz-spec:hover{color:var(--rdc-ink)}
@media(prefers-reduced-motion:reduce){.rdc-tz-step a,.rdc-tz-video{transition:none}}

/* ── Mobile icon-only launcher (T-NEXTAUTH 2026-06-17, David "fix it all"): on phones the
   labeled "Ask Tuenda" pill crowded the light-home "Learn more" fab. Collapse to a round
   icon button ≤480px (standard mobile chat-FAB pattern) so the corner pills never collide. */
@media (max-width:480px){
  .rdc-launch{padding:0;width:54px;height:54px;justify-content:center;border-radius:50%}
  .rdc-launch > span:not(.rdc-pulse){display:none}
  .rdc-launch .rdc-pulse{right:10px;top:10px}
}
