/* DIGIERA — website chat (see chat.js). Uses the tokens from digiera.css. */
.dg-chat{position:fixed;right:20px;bottom:20px;z-index:80;font-family:inherit;}
.dg-chat-launcher{width:56px;height:56px;border-radius:50%;border:none;cursor:pointer;background:var(--orange,#f4661b);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 10px 28px rgba(13,13,16,0.28),0 2px 6px rgba(13,13,16,0.18);transition:transform .15s ease,box-shadow .15s ease;margin-left:auto;}
.dg-chat-launcher:hover{transform:translateY(-2px);box-shadow:0 14px 32px rgba(13,13,16,0.32),0 3px 8px rgba(13,13,16,0.2);}
.dg-chat-launcher:focus-visible,.dg-chat button:focus-visible,.dg-chat-input:focus-visible{outline:3px solid var(--orange,#f4661b);outline-offset:2px;}
.dg-chat-launcher svg{width:26px;height:26px;}
.dg-chat.is-open{z-index:1000;} /* above the fixed site header; the consent banner stays on top */
.dg-chat.is-open .dg-chat-launcher{display:none;}

/* Wait until the visitor has answered the cookie banner, which otherwise covers the chat. */
body:has(#consent-banner) .dg-chat{display:none;}

.dg-chat-panel{width:380px;max-width:calc(100vw - 32px);height:min(600px,calc(100vh - 40px));background:#fff;border-radius:20px;box-shadow:0 24px 60px rgba(13,13,16,0.3),0 4px 14px rgba(13,13,16,0.16);display:flex;flex-direction:column;overflow:hidden;color:var(--gray-900,#16161f);}
.dg-chat-panel[hidden]{display:none;}

.dg-chat-head{display:flex;flex-wrap:wrap;align-items:center;row-gap:8px;padding:14px 12px 12px 16px;background:var(--dark,#0d0d10);color:#fff;}
/* Mirrors the site header's .logo: 30px mark, 10px gap, bold 17px lowercase wordmark. */
.dg-chat-logo{display:flex;align-items:center;gap:10px;flex:1;min-width:0;}
.dg-chat-mark{width:30px;height:30px;object-fit:contain;flex:none;}
.dg-chat-brand{font-size:17px;font-weight:700;line-height:1.2;}
.dg-chat-status{flex-basis:100%;font-size:12.5px;line-height:1.35;color:rgba(255,255,255,0.72);display:flex;align-items:center;gap:6px;}
.dg-chat-dot{width:7px;height:7px;border-radius:50%;background:rgba(255,255,255,0.35);flex:none;}
.dg-chat.is-live .dg-chat-dot{background:#61c554;}
.dg-chat-close{background:none;border:none;color:#fff;cursor:pointer;width:34px;height:34px;border-radius:8px;display:flex;align-items:center;justify-content:center;opacity:.8;}
.dg-chat-close:hover{opacity:1;background:rgba(255,255,255,0.08);}
.dg-chat-close svg{width:20px;height:20px;}

.dg-chat-log{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain;}
.dg-chat-msg{max-width:86%;padding:10px 13px;border-radius:14px;font-size:14.5px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;}
.dg-chat-assistant{align-self:flex-start;background:var(--gray-100,#f5f5f8);border-bottom-left-radius:4px;}
.dg-chat-visitor{align-self:flex-end;background:var(--dark,#0d0d10);color:#fff;border-bottom-right-radius:4px;}
.dg-chat-system{align-self:center;max-width:100%;background:none;color:var(--orange-text,#b84307);font-size:13px;text-align:center;padding:4px 8px;}
.dg-chat-msg a{color:var(--orange-text,#b84307);font-weight:600;text-decoration:underline;}
.dg-chat-visitor a{color:#fff;}

.dg-chat-typing{display:flex;gap:4px;align-items:center;padding:13px 14px;}
.dg-chat-typing i{width:7px;height:7px;border-radius:50%;background:var(--gray-500,#5f6580);animation:dg-chat-blink 1.2s infinite ease-in-out;}
.dg-chat-typing i:nth-child(2){animation-delay:.15s;}
.dg-chat-typing i:nth-child(3){animation-delay:.3s;}
@keyframes dg-chat-blink{0%,80%,100%{opacity:.25;}40%{opacity:1;}}
@media (prefers-reduced-motion:reduce){.dg-chat-typing i{animation:none;opacity:.6;}.dg-chat-launcher{transition:none;}}

.dg-chat-chips{display:flex;flex-wrap:wrap;gap:8px;padding:0 16px 10px;}
.dg-chat-chips:empty{display:none;}
.dg-chat-chip{border:1px solid var(--gray-200,#e7e8ef);background:#fff;border-radius:100px;padding:7px 12px;font-size:13px;font-family:inherit;color:var(--gray-900,#16161f);cursor:pointer;text-align:left;}
.dg-chat-chip:hover{border-color:var(--orange,#f4661b);color:var(--orange-text,#b84307);}

.dg-chat-form{display:flex;align-items:flex-end;gap:8px;padding:10px 12px;border-top:1px solid var(--gray-200,#e7e8ef);}
.dg-chat-input{flex:1;resize:none;border:1px solid var(--gray-200,#e7e8ef);border-radius:12px;padding:10px 12px;font-family:inherit;font-size:14.5px;line-height:1.4;max-height:120px;color:inherit;}
.dg-chat-input:focus{border-color:var(--orange,#f4661b);outline:none;}
.dg-chat-send{width:40px;height:40px;border-radius:50%;border:none;background:var(--orange,#f4661b);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;flex:none;}
.dg-chat-send:disabled{opacity:.5;cursor:default;}
.dg-chat-send svg{width:19px;height:19px;}

/* Phones: the open chat takes the whole screen. */
@media (max-width:600px){
  .dg-chat{right:16px;bottom:16px;}
  .dg-chat.is-open{inset:0;right:0;bottom:0;}
  .dg-chat.is-open .dg-chat-panel{width:100%;max-width:none;height:100%;height:100dvh;border-radius:0;}
  .dg-chat-input{font-size:16px;} /* stops iOS zooming into the field */
}

/* Team member replies (phase 2 live chat) */
.dg-chat-operator{align-self:flex-start;background:#fdebe2;border-bottom-left-radius:4px;}
.dg-chat-who{display:block;font-size:11px;font-weight:700;color:var(--orange-text,#b84307);margin-bottom:2px;}
.dg-chat-launcher.has-new::after{content:"";position:absolute;top:4px;right:4px;width:12px;height:12px;border-radius:50%;background:#e03131;border:2px solid #fff;}
.dg-chat-launcher{position:relative;}
