/* Scoped styles keep the chat independent of product and editorial layouts. */
.reta-chat,.reta-chat-launch,.chat-admin-grid,.chat-settings{font-family:Arial,sans-serif;box-sizing:border-box}
.reta-chat [hidden],.reta-chat-launch[hidden],[hidden].chat-admin-grid{display:none!important}
.reta-chat-launch{position:fixed;right:24px;bottom:24px;z-index:85;display:flex;align-items:center;gap:10px;border:1px solid #a65880;border-radius:32px;background:#88305e;color:#fff;box-shadow:0 6px 24px #53203b30;padding:15px 20px;cursor:pointer;font-size:15px;font-weight:600;min-height:54px}
.reta-chat-launch:hover{background:#682248;color:#fff}.reta-chat-launch svg{width:23px;height:23px}.reta-chat-count{background:#fff;color:#88305e;border-radius:20px;min-width:20px;padding:2px 5px;font-size:12px}
.reta-chat{position:fixed;inset:auto 24px 92px auto;margin:0;width:390px;max-width:calc(100vw - 24px);height:580px;max-height:calc(100dvh - 125px);border:1px solid #e5d2dd;border-radius:22px;padding:0;background:#fffafb;color:#42253a;box-shadow:0 12px 65px #45233830;z-index:86;overflow:hidden}
.reta-chat[open]{display:flex;flex-direction:column}.reta-chat::backdrop{background:#23151f30}.reta-chat-top{padding:18px 20px;background:#88305e;color:white;display:flex;align-items:center;justify-content:space-between;gap:12px}.reta-chat-top strong{font-size:18px}.reta-chat-top p{margin:5px 0 0;font-size:12px;color:#fff}.reta-chat-close{color:white;background:transparent;border:0;border-radius:8px;padding:7px;cursor:pointer;line-height:1;font-size:25px;min-width:36px;min-height:36px}
.reta-chat-log,.chat-history{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:18px;display:flex;flex-direction:column;gap:12px;scrollbar-width:thin}.chat-bubble{align-self:flex-start;max-width:90%;padding:12px 14px;background:#f1e6ed;border-radius:16px 16px 16px 4px;overflow-wrap:anywhere}.chat-bubble.visitor{align-self:flex-end;background:#88305e;color:#fff;border-radius:16px 16px 4px 16px}.chat-bubble p{font-size:14px;line-height:1.55;margin:0;white-space:pre-wrap;color:inherit}.chat-bubble small{display:block;font-size:10px;line-height:1.5;margin-top:6px;opacity:.8}.chat-welcome{padding:5px 2px;font-size:14px;line-height:1.65;color:#66515f}.chat-welcome strong{display:block;color:#42253a;font-size:17px;margin-bottom:7px}
.reta-chat form{padding:12px 16px 16px;border-top:1px solid #eadde4;display:grid;gap:9px;background:white}.reta-chat input[type=text],.reta-chat textarea,.chat-thread textarea{font:inherit;font-size:16px;width:100%;box-sizing:border-box;border:1px solid #d9c5d1;border-radius:10px;padding:10px 12px;background:#fff;color:#42253a}.reta-chat textarea{resize:none;max-height:100px}.reta-chat-consent{display:flex;gap:7px;align-items:flex-start;font-size:11px;line-height:1.5;color:#64515f}.reta-chat-consent input{flex:0 0 auto;margin-top:3px}.reta-chat a{color:#88305e;text-decoration:underline}.reta-chat-send{display:flex;gap:10px;align-items:center;justify-content:space-between}.reta-chat button[type=submit],.reta-chat-reopen{background:#88305e;color:#fff;border:0;border-radius:25px;padding:11px 20px;font-size:14px;cursor:pointer}.reta-chat button:disabled{opacity:.55;cursor:wait}.reta-chat-status{margin:0;padding:7px 16px;font-size:12px;line-height:1.45;color:#733857;overflow-wrap:anywhere}.reta-chat :focus-visible,.reta-chat-launch:focus-visible{outline:3px solid #c082a5;outline-offset:3px}.reta-chat-ref{font-size:10px;color:#75636e}.reta-chat-reopen{margin:8px 16px 16px;align-self:center}
.chat-settings{background:#fff;border:1px solid #e6dfeb;border-radius:16px;padding:18px 22px;margin-bottom:22px}.chat-settings summary{font-weight:700;cursor:pointer}.chat-settings p{font-size:13px;line-height:1.6}.chat-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.chat-tools button:not(.button),.chat-tools a{font:inherit;font-size:12px;border:1px solid #dfd1dc;background:#fff;border-radius:9px;padding:9px 12px;color:#81315c;cursor:pointer}.chat-tools button:disabled{opacity:.4;cursor:default}.chat-tools label{font-size:13px;display:flex;gap:7px;align-items:center}.chat-tools input[type=checkbox]{width:auto}.chat-admin-grid{display:grid;grid-template-columns:minmax(240px,310px) minmax(0,1fr);gap:20px}.chat-inbox,.chat-thread{background:#fff;border:1px solid #e6dfeb;border-radius:16px;padding:20px;min-width:0}.chat-inbox select{width:100%;margin:10px 0 16px;padding:10px;border-radius:8px;border:1px solid #ddd;font-size:14px}.chat-list-item{width:100%;text-align:left;border:1px solid #ece3e9;background:#fff;border-radius:12px;padding:13px;margin-bottom:9px;cursor:pointer;color:#42253a}.chat-list-item.selected{border-color:#88305e;background:#fbf0f6}.chat-list-item strong,.chat-list-item span,.chat-list-item small{display:block;overflow-wrap:anywhere}.chat-list-item span{font-size:12px;margin:5px 0}.chat-list-item small{font-size:11px;color:#796b77}.chat-history{height:390px;background:#fcf9fc;border:1px solid #eee5eb;border-radius:12px;margin:16px 0}.chat-thread h2{font-family:Arial,sans-serif;font-size:21px;margin:0 0 8px;overflow-wrap:anywhere}.chat-thread form{display:grid;gap:10px}.chat-thread form label{font-size:13px}.chat-thread form button{justify-self:end}.chat-thread .chat-bubble.operator{align-self:flex-end;background:#88305e;color:#fff}.chat-thread .chat-bubble.visitor{align-self:flex-start;background:#f1e6ed;color:#42253a}.chat-thread .small{overflow-wrap:anywhere}
@media(max-width:760px){.reta-chat-launch{right:14px;bottom:calc(16px + env(safe-area-inset-bottom));padding:14px}.reta-chat-launch>span:not(.reta-chat-count){display:none}.reta-chat{inset:auto 10px calc(84px + env(safe-area-inset-bottom)) auto;width:calc(100% - 20px);max-width:none;height:590px;max-height:calc(100dvh - 110px - env(safe-area-inset-bottom));border-radius:18px}.reta-chat-top{padding:15px}.chat-admin-grid{grid-template-columns:1fr}.chat-inbox,.chat-thread,.chat-settings{padding:15px}.chat-history{height:340px}#chat-list{max-height:260px;overflow:auto}.chat-tools{gap:8px}.chat-settings .button{padding:10px 15px;font-size:13px}}
@media(prefers-reduced-motion:reduce){.reta-chat *{scroll-behavior:auto!important}}

.notification-options{display:flex;gap:18px;flex-wrap:wrap;margin:18px 0}.notification-options label{display:flex;gap:8px;align-items:center;min-height:44px}.notification-options input{width:18px;height:18px}.notification-history-title{font-size:18px;margin:22px 0 8px}.notification-history-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:12px 0;border-top:1px solid #ead6e1}.notification-history-row>div{flex:1;min-width:180px}.notification-history-row small{display:block;color:#79576b;margin-top:4px}.notification-history-row>p{flex-basis:100%;margin:0}.notification-state{font-size:12px;padding:5px 10px;border-radius:20px;background:#f5e9f0}.notification-state.sent{color:#326647;background:#edf6ef}.notification-state.failed{color:#8b354c;background:#fbeaf0}.notification-panel .chat-tools button,.notification-history-row button{min-height:44px}.notification-panel .chat-tools a{min-height:44px;display:inline-flex;align-items:center}.notification-panel{scroll-margin-top:100px}@media(max-width:650px){.notification-options{flex-direction:column;gap:0}.notification-panel .chat-tools button{width:100%}.notification-history-row{gap:8px}}
