/* RTEC — AI assistant chat (SiteOS websites and the RTEC MASTER website): a round button and a chat card (dark header, light messages, rounded
   quick replies, accent send button, a note about privacy and the contacts of the business at the bottom). */
.rtec-chat{--chat-color:#2952cc;--chat-head:#17183b;--chat-ink:#1d2433;--chat-soft:#f6f7fb;--chat-line:#e3e6ef;--chat-muted:#5b6478;position:fixed;right:16px;bottom:16px;z-index:9990;font:16px/1.45 Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color:var(--chat-ink)}
.rtec-chat *{box-sizing:border-box}
.rtec-chat-btn{position:relative;display:flex;align-items:center;gap:10px;border:0;border-radius:999px;padding:8px 18px 8px 8px;background:var(--chat-head);color:#fff;font:inherit;font-weight:600;cursor:pointer;box-shadow:0 10px 28px rgba(15,18,40,.28)}
.rtec-chat-btn:focus-visible,.rtec-chat-panel button:focus-visible,.rtec-chat-panel a:focus-visible{outline:3px solid #ffbf47;outline-offset:2px}
.rtec-chat-btn.has-new::after{content:"";position:absolute;top:-2px;right:-2px;width:12px;height:12px;border-radius:50%;background:#ef4444;border:2px solid #fff}
.rtec-chat.is-open .rtec-chat-btn{display:none}
.rtec-chat-avatar{position:relative;display:inline-grid;place-items:center;flex:none;width:34px;height:34px;border-radius:50%;color:#fff;background:linear-gradient(135deg,#6d3fd6 0%,#c2417f 55%,#f08a2c 100%)}
.rtec-chat-avatar img{width:100%;height:100%;border-radius:50%;object-fit:contain;background:#fff;padding:3px}
.rtec-chat-avatar.is-big{width:52px;height:52px;box-shadow:0 0 0 3px rgba(255,255,255,.12)}
.rtec-chat-avatar.is-big svg{width:26px;height:26px}
.rtec-chat-online{position:absolute;right:-1px;bottom:-1px;width:14px;height:14px;border-radius:50%;background:#22c55e;border:2px solid var(--chat-head)}
.rtec-chat-panel{width:400px;max-width:calc(100vw - 32px);height:640px;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);background:#fff;border-radius:24px;box-shadow:0 18px 50px rgba(15,18,40,.28);display:flex;flex-direction:column;overflow:hidden}
.rtec-chat-panel[hidden]{display:none}
.rtec-chat-head{display:flex;align-items:center;gap:14px;padding:16px 16px 16px 18px;background:var(--chat-head);color:#fff}
.rtec-chat-who{flex:1;min-width:0;display:flex;flex-direction:column}
.rtec-chat-who strong{font-size:18px;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rtec-chat-who small{font-size:14px;color:rgba(255,255,255,.72);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rtec-chat-x{flex:none;display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:12px;background:rgba(255,255,255,.08);color:#fff;cursor:pointer}
.rtec-chat-x:hover{background:rgba(255,255,255,.16)}
.rtec-chat-log{flex:1;overflow-y:auto;padding:18px 18px 12px;display:flex;flex-direction:column;gap:10px;background:var(--chat-soft)}
.rtec-chat-msg{max-width:86%;padding:12px 16px;border-radius:18px;white-space:pre-wrap;overflow-wrap:anywhere}
.rtec-chat-assistant{align-self:flex-start;background:#fff;border:1px solid var(--chat-line);border-top-left-radius:6px}
.rtec-chat-visitor{align-self:flex-end;background:var(--chat-color);color:#fff;border-top-right-radius:6px}
.rtec-chat-msg a{color:inherit;text-decoration:underline}
.rtec-chat-error{border-color:#f0b4ad;color:#a8261b}.rtec-chat-wait:not(.rtec-chat-typing){opacity:.6}
.rtec-chat-note{align-self:center;background:#fff8c4;border:0;font-size:13px;color:var(--chat-muted);text-align:center}
.rtec-chat-quick{display:flex;flex-wrap:wrap;gap:10px;margin:auto 0 2px;padding-top:8px}
.rtec-chat-quick button{border:1.5px solid #d6d9f2;background:#fff;color:#3b37b8;border-radius:999px;padding:9px 16px;font:inherit;font-size:15px;font-weight:500;cursor:pointer}
.rtec-chat-quick button:hover{border-color:#3b37b8;background:#f1f0ff}
.rtec-chat-cta{display:inline-block;background:var(--chat-color);color:#fff!important;border-radius:999px;padding:9px 16px;font-weight:600;font-size:15px;text-decoration:none}
.rtec-chat-form{display:flex;align-items:flex-end;gap:10px;padding:14px 16px 10px;border-top:1px solid var(--chat-line);background:#fff}
.rtec-chat-form textarea{flex:1;resize:none;border:1.5px solid #cfd3e3;border-radius:16px;padding:13px 16px;font:inherit;color:var(--chat-ink);max-height:120px;min-height:52px;background:#fff}
.rtec-chat-form textarea:focus{outline:none;border-color:#4f46e5;box-shadow:0 0 0 3px rgba(79,70,229,.15)}
.rtec-chat-send{flex:none;display:grid;place-items:center;width:56px;height:52px;border:0;border-radius:16px;background:var(--chat-color);color:#fff;cursor:pointer;transition:transform .15s ease}
.rtec-chat-send:hover{transform:translateY(-1px)}.rtec-chat-send:disabled{opacity:.5}
.rtec-chat-foot{padding:2px 18px 14px;background:#fff;font-size:13px;line-height:1.5;color:var(--chat-muted)}
.rtec-chat-foot p{margin:0}
.rtec-chat-foot a{color:inherit;text-decoration:underline}
/* the invitation: after some seconds on the page, once per visit */
.rtec-chat-invite{position:absolute;right:0;bottom:66px;display:flex;align-items:flex-start;gap:4px;width:max-content;max-width:min(320px,calc(100vw - 32px));background:#fff;color:var(--chat-ink);border-radius:16px;box-shadow:0 10px 28px rgba(15,18,40,.2);padding:12px 8px 12px 14px}
.rtec-chat-invite-text{flex:1;min-width:0;border:0;background:none;text-align:left;font:inherit;font-size:15px;line-height:1.4;color:inherit;cursor:pointer;padding:0}
.rtec-chat-invite-x{flex:none;border:0;background:none;font-size:18px;line-height:1;color:var(--chat-muted);cursor:pointer;padding:0 4px;margin:0;min-width:0;width:auto;height:auto;box-shadow:none}
/* phones: the card fills the screen, with a small margin */
@media (max-width:520px){.rtec-chat.is-open{left:10px;right:10px;bottom:10px;top:10px}.rtec-chat-panel{width:100%;max-width:none;height:100%;max-height:none;border-radius:22px}.rtec-chat-btn-label{display:none}.rtec-chat-btn{padding:8px}.rtec-chat-cam,.rtec-chat-send{width:50px}}
/* the cookie banner (Statistics module) stays readable: the chat button moves above it; an open chat on a phone covers it */
body:has(.rtec-consent) .rtec-chat:not(.is-open){bottom:100px}
@media (max-width:520px){body:has(.rtec-consent) .rtec-chat:not(.is-open){bottom:170px}body:has(.rtec-consent) .rtec-chat.is-open{z-index:10000}}
/* the WhatsApp button (plugin) on the same side: the chat button stands above it */
body:has(.rtec-wa-right.is-on) .rtec-chat:not(.is-open){bottom:84px}body:has(.rtec-consent):has(.rtec-wa-right.is-on) .rtec-chat:not(.is-open){bottom:144px}
/* animations: the card opens and closes, the messages come in, the dots write, the button calls (none when the visitor asks for less motion) */
@keyframes rtec-chat-in{from{opacity:0;transform:translateY(16px) scale(.96)}to{opacity:1;transform:none}}
@keyframes rtec-chat-out{to{opacity:0;transform:translateY(16px) scale(.96)}}
@keyframes rtec-chat-msg{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes rtec-chat-dot{0%,80%,100%{transform:translateY(0);opacity:.35}40%{transform:translateY(-5px);opacity:1}}
@keyframes rtec-chat-ring{0%{box-shadow:0 0 0 0 rgba(99,102,241,.5),0 10px 28px rgba(15,18,40,.28)}70%{box-shadow:0 0 0 16px rgba(99,102,241,0),0 10px 28px rgba(15,18,40,.28)}100%{box-shadow:0 0 0 0 rgba(99,102,241,0),0 10px 28px rgba(15,18,40,.28)}}
@keyframes rtec-chat-pop{0%{opacity:0;transform:translateY(12px) scale(.9)}70%{opacity:1;transform:translateY(-3px) scale(1.02)}100%{opacity:1;transform:none}}
@keyframes rtec-chat-online{0%,100%{box-shadow:0 0 0 0 rgba(34,197,94,.6)}50%{box-shadow:0 0 0 5px rgba(34,197,94,0)}}
.rtec-chat-panel{transform-origin:bottom right;animation:rtec-chat-in .28s cubic-bezier(.2,.9,.3,1.2)}
.rtec-chat.is-closing .rtec-chat-panel{animation:rtec-chat-out .2s ease-in forwards}
.rtec-chat-msg,.rtec-chat-quick{animation:rtec-chat-msg .25s ease-out both}
.rtec-chat-btn{transition:transform .15s ease}.rtec-chat-btn:hover{transform:translateY(-2px)}
.rtec-chat-btn.is-calling{animation:rtec-chat-ring 1.8s ease-out 3}
.rtec-chat-online{animation:rtec-chat-online 2s ease-in-out infinite}
.rtec-chat-typing{display:inline-flex;gap:5px;align-items:center;padding:14px 16px}
.rtec-chat-typing i{width:8px;height:8px;border-radius:50%;background:#8b90a7;animation:rtec-chat-dot 1.2s infinite ease-in-out}
.rtec-chat-typing i:nth-child(2){animation-delay:.15s}.rtec-chat-typing i:nth-child(3){animation-delay:.3s}
.rtec-chat-invite{align-items:center;gap:10px;animation:rtec-chat-pop .45s cubic-bezier(.2,.9,.3,1.2) both}
.rtec-chat-invite.is-leaving{animation:rtec-chat-out .25s ease-in forwards}
.rtec-chat-invite::after{content:"";position:absolute;right:26px;bottom:-7px;width:14px;height:14px;background:#fff;transform:rotate(45deg);box-shadow:3px 3px 6px rgba(15,18,40,.08)}
@media (prefers-reduced-motion:reduce){.rtec-chat *,.rtec-chat-panel,.rtec-chat-btn{animation:none!important;transition:none!important}}
/* the picture of a design (→ a live demo) */
.rtec-chat-cam{flex:none;display:grid;place-items:center;width:52px;height:52px;border:0;border-radius:16px;background:#f2f3f7;cursor:pointer}
.rtec-chat-cam:hover{background:#e9eaf3}.rtec-chat-cam:disabled{opacity:.5}
.rtec-chat-pic{padding:4px;background:var(--chat-color);line-height:0}.rtec-chat-pic img{display:block;width:auto;max-width:220px;max-height:220px;min-width:60px;border-radius:14px;background:#fff}
.rtec-chat-demo-box{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.rtec-chat-claim{background:#17183b}
.rtec-chat-operator{align-self:flex-start;background:#eefbf3;border:1px solid #bfe8cf}
.rtec-chat-btn{position:relative}
.rtec-chat-theme{display:flex;flex-direction:column;width:100%;max-width:280px;border:1px solid var(--chat-line);border-radius:14px;overflow:hidden;background:#fff;color:var(--chat-ink)!important;text-decoration:none!important;transition:transform .15s ease,box-shadow .15s ease}
.rtec-chat-theme:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(15,18,40,.12)}
.rtec-chat-theme img{display:block;width:100%;aspect-ratio:16/10;object-fit:cover;object-position:top;background:var(--chat-soft)}
.rtec-chat-theme span{padding:10px 12px;font-weight:600;font-size:14px;color:var(--chat-color)}
.rtec-chat-msg strong{font-weight:700}
.rtec-chat-nudge{align-items:flex-start;width:min(340px,calc(100vw - 32px));max-width:none;padding-right:14px}
.rtec-chat-nudge .rtec-chat-invite-x{position:absolute;top:6px;right:6px;width:30px;height:30px;padding:0;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#fff;font-size:20px;z-index:1}
.rtec-chat-nudge .rtec-chat-invite-x:hover{background:#eef0f7}
.rtec-chat-nudge-text{padding-right:26px}
.rtec-chat-nudge-body{flex:1;min-width:0;display:grid;gap:8px}
.rtec-chat-nudge-text{margin:0;font-size:15px;line-height:1.4}
.rtec-chat-nudge-item{display:flex;align-items:center;gap:8px;padding:6px;border:1px solid #e3e6f0;border-radius:12px;color:inherit;text-decoration:none;background:#fafbff}
.rtec-chat-nudge-item:hover{border-color:var(--chat-color)}
.rtec-chat-nudge-item img{width:44px;height:44px;object-fit:cover;border-radius:8px;flex:none}
.rtec-chat-nudge-info{flex:1;min-width:0;display:grid;gap:1px;font-size:13px;line-height:1.3}
.rtec-chat-nudge-info strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}
.rtec-chat-nudge-info small{color:var(--chat-muted);font-size:12px}
.rtec-chat-nudge-price s{color:var(--chat-muted)}
.rtec-chat-nudge-price em{font-style:normal;font-weight:600;white-space:nowrap}
.rtec-chat-nudge-price .is-down,.rtec-chat-spark.is-down{color:#15803d}
.rtec-chat-nudge-price .is-up,.rtec-chat-spark.is-up{color:#b91c1c}
.rtec-chat-spark{flex:none;display:block;line-height:0}
.rtec-chat-nudge-go{justify-self:start;display:inline-block;background:var(--chat-color);color:#fff;border-radius:999px;padding:8px 16px;font-weight:600;font-size:14px;text-decoration:none}
.rtec-chat-nudge-go:hover{filter:brightness(1.08)}
@media (max-width:380px){.rtec-chat-spark{display:none}}
