/* ==========================================================================
   StrongHearts V2 — chat concierge widget (chat-v2.css)
   --------------------------------------------------------------------------
   Self-injected by js/chat-v2.js on every page that loads it (static site +
   WordPress). Design tokens follow style-v2.css ("Lumière & Confiance":
   navy #C8102E, gold #C8102E). All icons are original inline SVG — no
   external assets. Respects prefers-reduced-motion.
   ========================================================================== */

/* ---------- Floating button ---------- */
.shchat-fab{
  position:fixed;right:22px;bottom:22px;z-index:1200;
  width:64px;height:64px;border:none;border-radius:50%;cursor:pointer;
  background:var(--navy,#C8102E);color:#fff;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 10px 28px rgba(166,11,17,.35);
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
}
.shchat-fab:hover{transform:translateY(-3px);box-shadow:0 14px 32px rgba(166,11,17,.42)}
.shchat-fab:focus-visible{outline:3px solid var(--gold,#C8102E);outline-offset:3px}
.shchat-fab svg{width:30px;height:30px}
.shchat-fab .shchat-close-icon{display:none}
.shchat-fab[aria-expanded="true"] .shchat-chat-icon{display:none}
.shchat-fab[aria-expanded="true"] .shchat-close-icon{display:block}
.shchat-fab .shchat-dot{
  position:absolute;top:2px;right:2px;width:14px;height:14px;border-radius:50%;
  background:var(--gold,#C8102E);border:2.5px solid #fff;
}
.shchat-fab[aria-expanded="true"] .shchat-dot{display:none}

/* ---------- Panel ---------- */
.shchat-panel{
  position:fixed;right:22px;bottom:100px;z-index:1200;
  width:min(380px,calc(100vw - 32px));height:min(560px,calc(100dvh - 180px));
  background:#fff;border:2px solid var(--line,#E4D3D7);border-radius:20px;
  box-shadow:0 24px 60px rgba(166,11,17,.22);
  display:none;flex-direction:column;overflow:hidden;
}
.shchat-panel.open{display:flex;animation:shchat-in .25s ease}
@keyframes shchat-in{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.shchat-head{
  background:var(--navy,#C8102E);color:#fff;padding:16px 18px;flex:none;
  display:flex;align-items:center;gap:12px;
}
.shchat-head .shchat-avatar{
  width:42px;height:42px;flex:none;border-radius:50%;
  background:var(--gold,#C8102E);color:var(--navy,#C8102E);
  display:flex;align-items:center;justify-content:center;
  font-family:'Merriweather',Georgia,serif;font-weight:900;font-size:1rem;
}
.shchat-head .shchat-title{font-weight:800;font-size:1.02rem;line-height:1.3}
.shchat-head .shchat-sub{font-size:.82rem;color:#FBE7E9;line-height:1.4}
.shchat-close{
  margin-left:auto;background:transparent;border:none;color:#fff;cursor:pointer;
  font-size:1.4rem;line-height:1;padding:8px;border-radius:8px;flex:none;
}
.shchat-close:hover{background:rgba(255,255,255,.15)}

.shchat-body{
  flex:1;overflow-y:auto;padding:16px 14px;display:flex;flex-direction:column;gap:10px;
  background:var(--cream,#FFFDF6);scroll-behavior:smooth;
}
.shchat-msg{
  max-width:88%;padding:11px 15px;border-radius:16px;font-size:.96rem;line-height:1.55;
}
.shchat-msg.bot{
  align-self:flex-start;background:#fff;border:1.5px solid var(--line,#E4D3D7);
  border-bottom-left-radius:6px;color:var(--ink,#2B2B2B);
}
.shchat-msg.user{
  align-self:flex-end;background:var(--navy,#C8102E);color:#fff;
  border-bottom-right-radius:6px;
}
.shchat-msg a{color:var(--navy,#C8102E);font-weight:700}
.shchat-msg strong{color:var(--navy,#C8102E)}
.shchat-msg .shchat-phones{display:grid;gap:6px;margin-top:8px}
.shchat-msg .shchat-phones a{
  display:block;background:var(--sky,#E6F8FA);border-radius:10px;padding:8px 12px;
  text-decoration:none;font-weight:800;
}
.shchat-opts{display:flex;flex-wrap:wrap;gap:8px;align-self:flex-start;max-width:100%}
.shchat-opt{
  background:#fff;border:2px solid var(--gold,#C8102E);color:var(--navy,#C8102E);
  border-radius:999px;padding:9px 18px;font-weight:700;font-size:.92rem;cursor:pointer;
  font-family:inherit;transition:background .15s ease,color .15s ease;
}
.shchat-opt:hover{background:var(--gold,#C8102E);color:var(--navy-deep,#A60B11)}
.shchat-opt:focus-visible{outline:3px solid var(--navy,#C8102E);outline-offset:2px}
.shchat-typing{display:flex;gap:5px;padding:12px 16px}
.shchat-typing i{width:8px;height:8px;border-radius:50%;background:var(--muted,#5A6B8A);animation:shchat-blink 1s infinite}
.shchat-typing i:nth-child(2){animation-delay:.18s}
.shchat-typing i:nth-child(3){animation-delay:.36s}
@keyframes shchat-blink{0%,100%{opacity:.25}50%{opacity:1}}

.shchat-foot{flex:none;border-top:2px solid var(--line,#E4D3D7);padding:12px 14px;background:#fff}
.shchat-form{display:flex;gap:10px}
.shchat-form label{position:absolute;left:-9999px}
.shchat-form input{
  flex:1;padding:12px 15px;border:2px solid var(--line,#E4D3D7);border-radius:12px;
  font-size:1rem;font-family:inherit;color:var(--ink,#2B2B2B);
}
.shchat-form input:focus{outline:none;border-color:var(--navy,#C8102E);box-shadow:0 0 0 4px rgba(166,11,17,.1)}
.shchat-form button{
  background:var(--navy,#C8102E);color:#fff;border:none;border-radius:12px;
  padding:12px 18px;font-weight:800;cursor:pointer;font-family:inherit;font-size:1rem;
}
.shchat-form button:hover{background:var(--navy-deep,#A60B11)}
.shchat-note{font-size:.78rem;color:var(--muted,#5A6B8A);margin-top:8px;text-align:center}

/* ---------- Responsive ---------- */
@media (max-width:720px){
  /* Sit above the sticky mobile call bar. */
  .shchat-fab{right:14px;bottom:96px;width:58px;height:58px}
  .shchat-panel{right:14px;bottom:166px;height:min(520px,calc(100dvh - 240px))}
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  .shchat-fab,.shchat-opt,.shchat-form input{transition:none}
  .shchat-panel.open{animation:none}
  .shchat-body{scroll-behavior:auto}
  .shchat-typing i{animation:none;opacity:.6}
}
