:root{font-family:Arial,sans-serif;color:#162b36;background:#f0f5fc}*{box-sizing:border-box}body{margin:0}main{max-width:820px;margin:40px auto;padding:0 20px}h1{font-size:32px;margin-bottom:12px}header p,footer{color:#536873;line-height:1.5}.badge{font-size:11px;letter-spacing:1px;font-weight:700;color:#235f9f}.chat{background:white;border:1px solid #d5e1e5;border-radius:18px;overflow:hidden;box-shadow:0 12px 45px #183c4b12;margin-top:24px}.chat-head{background:#4a90e2;color:#10233b;padding:20px;display:flex;justify-content:space-between;gap:16px}.chat-head span{font-size:12px;color:#10233b}#messages{height:300px;overflow:auto;padding:20px;display:flex;flex-direction:column;gap:12px}.message{max-width:85%;padding:12px 16px;border-radius:12px;background:#eef3f5;overflow-wrap:anywhere}.message.visitor{align-self:flex-end;background:#e2efff}.message strong{font-size:12px}.message p{white-space:pre-wrap;margin:7px 0 0;line-height:1.5}.empty{color:#637680}form{border-top:1px solid #e5edf0;padding:20px}label{display:block;font-size:13px;font-weight:700;margin-bottom:8px}textarea,select{width:100%;border:1px solid #bccfd6;border-radius:8px;padding:12px;font:inherit}textarea:focus,select:focus{outline:2px solid #3478bf}.actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}small{color:#647881;font-size:12px}button{background:#4a90e2;color:#10233b;border:0;border-radius:8px;padding:13px 24px;font-weight:700;cursor:pointer}button:disabled{opacity:.5}#status{font-size:13px;margin:0;padding:0 20px 16px;color:#526871}footer{font-size:13px;margin-top:18px}@media(max-width:600px){main{margin:20px auto;padding:0 12px}h1{font-size:26px}.chat-head{padding:16px;flex-direction:column;gap:5px}#messages{height: min(42dvh,340px);padding:12px}.message{max-width:93%}form{padding:14px}.actions{align-items:flex-start}button{min-height:44px}small{max-width:55%}}


.embedded { background: #fff; }
.embedded main { display: flex; height: 100dvh; margin: 0; max-width: none; padding: 0; }
.embedded header, .embedded footer, .embedded form label, .embedded form small { display: none; }
.embedded .chat { display: flex; flex: 1; flex-direction: column; min-width: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.embedded .chat-head { flex-direction: column; gap: 3px; padding: 14px 56px 14px 16px; }
.embedded #messages { flex: 1; min-height: 0; height: auto; padding: 16px; }
.embedded .empty { align-self: flex-start; max-width: 90%; margin: 0; padding: 12px; background: #eef3f5; color: #162b36; border-radius: 12px; line-height: 1.45; }
.embedded form { display: flex; align-items: end; gap: 8px; padding: 12px; }
.embedded textarea { min-width: 0; min-height: 44px; max-height: 100px; resize: vertical; }
.embedded .actions { flex: none; margin: 0; }
.embedded button { min-height: 44px; padding: 10px 12px; }
.embedded #status { padding: 0 12px 8px; }
.embedded #status:empty { display: none; }

.embedded form { flex-wrap: wrap; }
.embedded textarea { flex: 1; }
#offline-contact { flex: 0 0 100%; min-width: 0; margin: 0; padding: 0; border: 0; }
#offline-contact[hidden] { display: none; }
#offline-contact legend { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
#offline-contact input { box-sizing: border-box; width: 100%; min-height: 40px; border: 1px solid #bccfd6; border-radius: 8px; padding: 8px; margin-bottom: 4px; font: inherit; }

.quick-chat { display:grid; grid-template-columns:1fr 1fr; padding:10px 12px; gap:6px; flex:none; }
.quick-chat button { text-align:left; background:#fff; border:1px solid #d7e3ee; color:#18364f; border-radius:10px; }
.quick-chat button[aria-pressed="true"], .quick-chat button:hover { background:#eaf4ff; border-color:#4a90e2; }
.embedded form:has(#installation) { max-height:56%; overflow:auto; }
#installation { flex:0 0 100%; min-width:0; border:0; padding:0; margin:0; }
#installation input { width:100%; padding:8px; border:1px solid #bccfd6; border-radius:8px; font:inherit; margin-top:4px; }

.compact-dark .chat { background:#2b2f36; color:#f5f7fa; color-scheme:dark; }
.compact-dark .chat-head { position:relative; padding:15px 56px 15px 65px; min-height:70px; color:#101f32; }
.compact-dark .chat-head::before { content:"✓"; position:absolute; left:14px; top:14px; width:40px; height:40px; display:grid; place-items:center; border-radius:12px; background:#fff; color:#2163aa; font-weight:800; }
.compact-content { flex:1; min-height:0; overflow:auto; }
.compact-dark #messages { height:auto; padding:12px 12px 8px; }
.compact-dark .empty { margin-left:28px; background:#17191e; color:#f5f7fa; font-size:14px; }
.compact-dark .empty strong { display:block; font-size:15px; margin-bottom:4px; }
.compact-dark .message { background:#1d2026; }
.compact-dark .message.visitor { background:#243d57; }
.quick-label { padding:3px 12px 0; font-size:12px; color:#ccd6e2; }
.compact-dark .quick-chat { grid-template-columns:1fr; padding-top:8px; }
.compact-dark .quick-chat button { position:relative; background:transparent; border-color:#555d6a; color:#f5f7fa; padding-right:28px; }
.compact-dark .quick-chat button::after { content:"›"; position:absolute; right:12px; color:#9bcaff; }
.compact-dark .quick-chat button:hover,.compact-dark .quick-chat button[aria-pressed="true"] { background:#263c53; border-color:#79b5f5; }
.compact-dark form { border-color:#4c535e; }
.compact-dark textarea,.compact-dark select,.compact-dark input { color:#f5f7fa; background:#22262d; border-color:#66717e; }
.compact-dark textarea { border-radius:20px; min-height:42px; max-height:70px; padding:9px 12px; resize:none; }
.compact-dark .actions button { width:44px; border-radius:12px; }
.compact-dark #status { color:#dcecff; }

.compact-dark .chat { background:#2e2e2e; }
.compact-dark .chat-head { min-height:76px; }
.compact-dark .chat-head::before { content:none; }
.compact-dark .chat-head .brand-icon { position:absolute; left:12px; top:16px; width:42px; height:42px; display:grid; place-items:center; border-radius:12px; background:#fff; color:#2163aa; font-size:24px; }
.compact-dark #availability::before { content:""; display:inline-block; width:9px; height:9px; margin-right:5px; border-radius:50%; background:#243951; }
.compact-dark #availability[data-online="true"]::before { background:#b0f0c3; }
.compact-dark .empty { position:relative; background:#151515; margin-left:32px; overflow:visible; }
.compact-dark .empty::before { content:"☏"; position:absolute; top:0; left:-34px; display:grid; place-items:center; width:26px; height:26px; border-radius:50%; background:#222; }
.compact-dark .quick-chat { gap:7px; }
.compact-dark .quick-chat button { display:flex; align-items:center; min-height:45px; gap:7px; border-color:#505050; }
.compact-dark .quick-chat button span { flex:0 0 16px; color:#79bdff; text-align:center; }
.compact-signature { padding:0 10px 10px; text-align:center; font-size:12px; color:#d0d8e3; }

.compact-dark .quick-chat[hidden] { display:none; }

.compact-dark .chat-head img.brand-icon { display:block; padding:3px; object-fit:contain; }

.embedded.compact-dark .chat-head,
.embedded.compact-dark .actions button { background: #FCB900; color: #211900; }
.embedded.compact-dark .chat-head strong,
.embedded.compact-dark .chat-head #availability,
.embedded.compact-dark .chat-head #availability[data-online] { color: #211900; }

.compact-dark .chat { background:#fff; color:#27231b; color-scheme:light; }
.compact-dark .empty { background:#fff7df; color:#27231b; }
.compact-dark .empty::before { background:#fff0c4; color:#6b4d00; }
.compact-dark .message { background:#f1f4f7; }
.compact-dark .message.visitor { background:#fff0c4; }
.compact-dark form { border-color:#e2e9f0; }
.compact-dark textarea,.compact-dark select,.compact-dark input { color:#27231b; background:#fff; border-color:#bccfdc; }
.compact-dark #status,.compact-signature { color:#425b70; }
