/* DMA Chat — our own website chat (replaces Smartsupp). Tokens come from the dma-charter theme:
   navy #0E1B2A, ink #142333, brass #B89766, teal #0FC2B2 (the site's CTA), mist #F4F6F8, line #E7ECEF.
   Sans only (Inter or the system face): the widget runs on themes that do not load Cormorant.
   Mo 2026-12-03: "Chat with us" pill with her face, smaller window, replies more prominent, typing + focus states. */
.dmc{--dmc-navy:#0E1B2A;--dmc-ink:#142333;--dmc-brass:#B89766;--dmc-teal:#0FC2B2;--dmc-teal-d:#0BAFA0;
  --dmc-mist:#F1F4F7;--dmc-line:#E3E8EC;--dmc-text:#1B2733;--dmc-soft:#5B6773;
  --dmc-sans:"Inter","Inter Body Fallback",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  position:fixed;right:20px;bottom:20px;z-index:2147483000;font-family:var(--dmc-sans);color:var(--dmc-text);
  font-size:15px;line-height:1.45;-webkit-font-smoothing:antialiased}
.dmc *,.dmc *::before,.dmc *::after{box-sizing:border-box}
.dmc[hidden],.dmc-hidden .dmc,.mo-3d-lock .dmc{display:none!important}
.dmc,.dmc *{letter-spacing:normal;text-transform:none;word-spacing:normal}
/* the theme styles every button/textarea (uppercase, tracking, padding, borders, focus boxes): reset hard */
.dmc button{touch-action:manipulation;-webkit-tap-highlight-color:transparent;font:inherit!important;color:inherit;cursor:pointer;background:none;border:0!important;padding:0;margin:0;
  min-height:0;min-width:0;box-shadow:none;text-transform:none!important;letter-spacing:normal!important;line-height:inherit}
.dmc :focus-visible{outline:2px solid var(--dmc-brass);outline-offset:2px}

/* ---- launcher: "Chat with us" pill with Rachel's face ---- */
.dmc .dmc-launch{position:relative;display:flex;align-items:center;gap:10px;height:54px;padding:0 22px 0 5px;
  border-radius:27px!important;background:var(--dmc-navy)!important;color:#fff!important;
  box-shadow:0 10px 28px rgba(14,27,42,.30);margin-left:auto;transition:transform .15s ease,background .15s ease}
.dmc-ava{position:relative;flex:none;width:44px;height:44px;border-radius:50%;background:#2a3a4c center/cover no-repeat}
.dmc-ava::after{content:"";position:absolute;right:0;bottom:1px;width:11px;height:11px;border-radius:50%;
  background:#3BD07F;box-shadow:0 0 0 2px var(--dmc-navy)}
.dmc-launch-txt{font-size:15px!important;font-weight:600!important;white-space:nowrap}
.dmc-badge{position:absolute;top:-5px;right:-5px;min-width:22px;height:22px;padding:0 6px;border-radius:11px;
  background:#E5484D;color:#fff;font-size:12px;font-weight:700;line-height:22px;text-align:center;box-shadow:0 0 0 2px #fff}
.dmc-badge:empty{display:none}
.dmc[data-mode="small"] .dmc-launch,.dmc[data-mode="big"] .dmc-launch{display:none}

/* ---- shared panel ---- */
.dmc-panel{display:none;background:#fff;border-radius:16px;box-shadow:0 16px 44px rgba(14,27,42,.28);overflow:hidden}
.dmc-x{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;flex:none}
.dmc-x svg{width:16px;height:16px;stroke:currentColor;stroke-width:1.8;fill:none}
.dmc-who{flex:1;min-width:0}
.dmc-name{display:block;font-size:16px;font-weight:600;line-height:1.2;color:var(--dmc-navy)}
.dmc-role{font-size:12.5px;color:var(--dmc-soft)}

/* ---- SMALL: preview card (also pops up when Rachel answers while the chat is closed) ---- */
.dmc[data-mode="small"] .dmc-small{display:block}
.dmc-small{width:330px}
.dmc-small-head{display:flex;align-items:center;gap:10px;padding:12px 8px 0 14px}
.dmc-small-head .dmc-ava{width:36px;height:36px}
.dmc-small-head .dmc-ava::after{box-shadow:0 0 0 2px #fff;width:9px;height:9px}
.dmc-small-head .dmc-x{color:var(--dmc-soft)}
.dmc .dmc-note{display:block;width:calc(100% - 28px);margin:10px 14px 12px!important;text-align:left;padding:11px 14px!important;
  border-radius:4px 16px 16px 16px!important;background:var(--dmc-mist)!important;font-size:15px!important;line-height:1.45!important;
  color:var(--dmc-text)!important;font-weight:400!important}
.dmc-small .dmc-form{border-top:1px solid var(--dmc-line)}

/* ---- BIG: the window, sized to its content ---- */
.dmc[data-mode="big"] .dmc-big{display:flex}
.dmc-big{flex-direction:column;width:360px;max-height:min(560px,calc(100vh - 40px))}
.dmc-big-head{display:flex;align-items:center;gap:11px;padding:11px 8px 11px 14px;background:var(--dmc-navy);color:#fff}
.dmc-big-head .dmc-ava{width:38px;height:38px}
.dmc-big-head .dmc-name{color:#fff}
.dmc-big-head .dmc-role{color:#AFC0CF}
.dmc-big-head .dmc-x{color:#fff}
.dmc-log{flex:1 1 auto;min-height:150px;overflow-y:auto;overscroll-behavior:contain;padding:16px 14px 6px;background:#fff;
  display:flex;flex-direction:column;gap:8px}
.dmc-m{max-width:84%;white-space:pre-wrap;overflow-wrap:anywhere;padding:10px 14px;font-size:15px}
.dmc-m a{color:inherit;text-decoration:underline}
/* Rachel: a real bubble with her face on the first line of each run, so replies stand out */
.dmc-row{display:flex;align-items:flex-end;gap:8px;align-self:flex-start;max-width:92%}
.dmc-row .dmc-m{max-width:none}
.dmc-mini{flex:none;width:28px;height:28px;border-radius:50%;background:#2a3a4c center/cover no-repeat}
.dmc-mini--blank{visibility:hidden}
.dmc-m--r{background:var(--dmc-mist);color:var(--dmc-text);border-radius:16px 16px 16px 4px;border-left:3px solid var(--dmc-brass)}
.dmc-m--c{align-self:flex-end;border-radius:16px 16px 4px 16px;background:var(--dmc-navy);color:#fff}
.dmc-m--err{align-self:flex-end;font-size:12px;color:#B3261E;padding:0 2px;margin-top:-4px}
.dmc-new{animation:dmc-pop .32s cubic-bezier(.2,.8,.2,1)}
@keyframes dmc-pop{from{opacity:0;transform:translateY(8px) scale(.97)}to{opacity:1;transform:none}}
/* typing: her face + a bubble with dots + who is typing */
.dmc-typing{display:none;align-items:flex-end;gap:8px;align-self:flex-start}
.dmc-typing.is-on{display:flex}
.dmc-typing-b{display:flex;align-items:center;gap:5px;padding:12px 14px;border-radius:16px 16px 16px 4px;background:var(--dmc-mist);border-left:3px solid var(--dmc-brass)}
.dmc-typing i{width:7px;height:7px;border-radius:50%;background:var(--dmc-navy);animation:dmc-dot 1.2s infinite ease-in-out}
.dmc-typing i:nth-child(2){animation-delay:.15s}.dmc-typing i:nth-child(3){animation-delay:.3s}
.dmc-typing-t{font-size:12px;color:var(--dmc-soft);padding-bottom:3px}
@keyframes dmc-dot{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
.dmc-big-head .dmc-role.is-typing{color:#7FE3D8}

/* ---- reply form (both modes): clear focus state while the visitor types ---- */
.dmc-form{display:flex;align-items:flex-end;gap:8px;margin:8px 10px 10px;padding:4px 4px 4px 14px;border-radius:22px;
  background:var(--dmc-mist);box-shadow:inset 0 0 0 1px var(--dmc-line);transition:box-shadow .15s ease,background .15s ease}
.dmc-form:focus-within{background:#fff;box-shadow:inset 0 0 0 2px var(--dmc-teal),0 0 0 4px rgba(15,194,178,.14)}
.dmc .dmc-in{touch-action:manipulation;flex:1;min-width:0;width:auto;height:auto;resize:none;border:0!important;outline:0!important;box-shadow:none!important;
  border-radius:0;background:transparent!important;font:inherit;font-size:15px;color:var(--dmc-text);max-height:110px;
  min-height:0;margin:0;padding:8px 0;line-height:1.4}
.dmc-in::placeholder{color:#7D8A97;opacity:1;transition:opacity .2s ease}
.dmc .dmc-send{flex:none;width:36px;height:36px;border-radius:50%!important;background:var(--dmc-teal)!important;color:var(--dmc-navy)!important;display:grid;place-items:center}
.dmc-send:disabled{opacity:.4;cursor:default}
.dmc-send svg{width:17px;height:17px;fill:currentColor}
.dmc-foot{padding:0 14px 8px;font-size:11px;color:#8A96A3;text-align:right}
.dmc-foot:empty{display:none}

/* ---- motion ---- */
.dmc-panel{transform-origin:100% 100%}
.dmc[data-mode="small"] .dmc-small,.dmc[data-mode="big"] .dmc-big{animation:dmc-in .22s cubic-bezier(.2,.8,.2,1)}
@keyframes dmc-in{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.dmc *{animation:none!important;transition:none!important}}

/* ---- phone + folded/unfolded phones: a real bottom sheet, not a shrunken desktop card ---- */
.dmc-scrim{display:none}
@media (max-width:820px){
  .dmc{right:12px;bottom:calc(12px + env(safe-area-inset-bottom));left:auto}
  .dmc .dmc-launch{height:50px;padding:0 18px 0 4px;gap:8px}
  .dmc-launch .dmc-ava{width:42px;height:42px}
  .dmc-launch-txt{font-size:14px!important}
  .dmc .dmc-in{font-size:16px} /* no iOS zoom on focus */
  /* small preview card: full width above the bottom edge */
  .dmc[data-mode="small"]{left:12px;right:12px}
  .dmc-small{width:auto}
  /* big = sheet */
  .dmc[data-mode="big"]{left:0;right:0;bottom:var(--dmc-kb,0px)}
  .dmc[data-mode="big"] .dmc-scrim{display:block;position:fixed;inset:0;background:rgba(14,27,42,.42);animation:dmc-fade .2s ease}
  .dmc-big{position:relative;width:100%;border-radius:20px 20px 0 0;
    max-height:min(74dvh,calc(var(--dmc-vh,100dvh) - 56px));box-shadow:0 -10px 40px rgba(14,27,42,.30);
    padding-bottom:env(safe-area-inset-bottom)}
  /* keyboard open: pin the sheet to the visible area (top + height from visualViewport), never past the top */
  .dmc.dmc-kbd[data-mode="big"]{top:var(--dmc-top,0px);bottom:auto}
  .dmc-kbd .dmc-big{padding-bottom:0;height:calc(var(--dmc-vh,100dvh) - 8px);max-height:none;border-radius:16px 16px 0 0}
  .dmc-kbd .dmc-big-head{padding-top:12px}
  .dmc-kbd .dmc-big-head::before{display:none}
  .dmc[data-mode="big"] .dmc-big{animation:dmc-up .26s cubic-bezier(.2,.8,.2,1)}
  .dmc-big-head{position:relative;padding:18px 10px 12px 16px}
  .dmc-big-head::before{content:"";position:absolute;top:7px;left:50%;width:36px;height:4px;margin-left:-18px;border-radius:2px;background:rgba(255,255,255,.35)}
  .dmc-log{min-height:132px;padding:14px 12px 4px}
  .dmc-m{font-size:15.5px}
  .dmc-form{margin:8px 10px 10px}
}
@keyframes dmc-up{from{transform:translateY(100%)}to{transform:none}}
@keyframes dmc-fade{from{opacity:0}to{opacity:1}}
html.dmc-lock,html.dmc-lock body{overflow:hidden!important}
@media (hover:hover) and (pointer:fine){
.dmc .dmc-launch:hover{background:var(--dmc-ink)!important;transform:translateY(-1px)}
.dmc-small-head .dmc-x:hover{background:var(--dmc-mist)}
.dmc-big-head .dmc-x:hover{background:rgba(255,255,255,.1)}
.dmc .dmc-send:hover{background:var(--dmc-teal-d)!important}
}

/* ---- presence dot (Mo 2026-12-03: "she looks like she's not there, then she wakes up and then she's green"):
   away = grey and still, waking = brightening pulse, online = green from the moment she speaks, and stays ---- */
.dmc .dmc-ava::after{background:#9AA5B1;opacity:.6}
.dmc.dmc-waking .dmc-ava::after{animation:dmc-wake 1.6s ease-in-out infinite}
.dmc.dmc-online .dmc-ava::after{background:#3BD07F;opacity:1;animation:dmc-online .5s ease-out}
@keyframes dmc-wake{0%,100%{opacity:.45;transform:scale(.9)}50%{opacity:1;transform:scale(1.08);background:#C3CCD5}}
@keyframes dmc-online{0%{transform:scale(.8)}60%{transform:scale(1.25)}100%{transform:scale(1)}}
.dmc.dmc-waking .dmc-launch{animation:dmc-wiggle .8s ease-in-out infinite}
@keyframes dmc-wiggle{0%,100%{transform:rotate(0)}20%{transform:rotate(-3deg)}40%{transform:rotate(3deg)}60%{transform:rotate(-2deg)}80%{transform:rotate(1deg)}}
@media (prefers-reduced-motion:reduce){.dmc.dmc-waking .dmc-launch{animation:none}}
