.qr { --qr-color: #0f766e; --qr-soft: color-mix(in srgb, var(--qr-color) 12%, #fff); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #1d2433; box-sizing: border-box; }
.qr *, .qr *::before, .qr *::after { box-sizing: inherit; }
.qr button, .qr input { font: inherit; }

/* Floating mode */
.qr--floating { position: fixed; bottom: 20px; z-index: 9999; }
.qr--right { right: 20px; }
.qr--left { left: 20px; }
.qr-launcher { width: 56px; height: 56px; border: 0; border-radius: 50%; background: var(--qr-color); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.qr-launcher svg { width: 26px; height: 26px; fill: currentColor; }
.qr-launcher:focus-visible, .qr button:focus-visible, .qr input:focus-visible, .qr a:focus-visible { outline: 3px solid #1a73e8; outline-offset: 2px; }
.qr-tip { position: absolute; bottom: 8px; background: #fff; color: #1d2433; border-radius: 18px; padding: 6px 14px; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); white-space: nowrap; }
.qr--right .qr-tip { right: 68px; }
.qr--left .qr-tip { left: 68px; }
.qr-tip[hidden] { display: none; }

.qr-panel { position: absolute; bottom: 68px; width: 360px; max-width: calc(100vw - 24px); height: 520px; max-height: calc(100vh - 100px); background: #fff; border-radius: 14px; box-shadow: 0 12px 36px rgba(0, 0, 0, .28); display: flex; flex-direction: column; overflow: hidden; }
.qr--right .qr-panel { right: 0; }
.qr--left .qr-panel { left: 0; }
.qr-panel[hidden] { display: none; }

/* Inline mode */
.qr--inline .qr-panel { position: static; width: 100%; max-width: 440px; height: 560px; max-height: none; box-shadow: 0 2px 14px rgba(0, 0, 0, .16); }

.qr-head { background: var(--qr-color); color: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.qr-avatar { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; flex: none; }
.qr-avatar svg { width: 18px; height: 18px; fill: currentColor; }
.qr-who { flex: 1; min-width: 0; line-height: 1.25; }
.qr-who b { display: block; }
.qr-who small { opacity: .88; }
.qr-close { border: 0; background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.qr-close:hover { background: rgba(255, 255, 255, .2); }

.qr-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #f6f8f8; }
.qr-msg { max-width: 86%; padding: 8px 12px; border-radius: 14px; overflow-wrap: anywhere; }
.qr-msg p { margin: 0 0 .5em; }
.qr-msg p:last-child { margin-bottom: 0; }
.qr-msg img { max-width: 100%; height: auto; }
.qr-msg a { color: var(--qr-color); }
.qr-bot { background: #fff; border: 1px solid #e1e7e7; border-bottom-left-radius: 4px; align-self: flex-start; }
.qr-me { background: var(--qr-color); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.qr-typing i { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: #9aa8a6; animation: qr-b 1s infinite; }
.qr-typing i:nth-child(2) { animation-delay: .15s; }
.qr-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes qr-b { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-4px); } }

.qr-choices { display: flex; flex-direction: column; gap: 6px; align-self: stretch; }
.qr-choices button { background: #fff; border: 1px solid var(--qr-color); color: var(--qr-color); border-radius: 18px; padding: 7px 14px; text-align: left; cursor: pointer; }
.qr-choices button:hover:not(:disabled) { background: var(--qr-soft); }
.qr-choices button:disabled { opacity: .45; cursor: default; }
.qr-cta { display: inline-block; margin-top: 8px; background: var(--qr-color); color: #fff !important; border-radius: 16px; padding: 6px 14px; text-decoration: none; }
.qr-fb { align-self: flex-start; color: #667085; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.qr-fb button { border: 1px solid #d5dce8; background: #fff; border-radius: 12px; padding: 1px 10px; cursor: pointer; }

.qr-search { border-top: 1px solid #e1e7e7; padding: 8px; display: flex; gap: 6px; background: #fff; }
.qr-search input { flex: 1; min-width: 0; border: 1px solid #c9d1de; border-radius: 18px; padding: 7px 14px; }
.qr-search button { border: 0; background: var(--qr-color); color: #fff; border-radius: 18px; padding: 0 16px; cursor: pointer; }

.qr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 480px) {
  .qr--floating .qr-panel { position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; height: 78vh; max-height: none; border-radius: 14px 14px 0 0; }
}
@media (prefers-reduced-motion: reduce) { .qr-typing i { animation: none; } }

.qr-lead { max-width: 94%; width: 94%; }
.qr-lead p { margin: 0 0 .5em; }
.qr-lead label { display: block; font-size: 13px; margin: 6px 0 2px; color: #344054; }
.qr-lead input[type=text], .qr-lead input[type=tel], .qr-lead textarea { width: 100%; border: 1px solid #c9d1de; border-radius: 8px; padding: 6px 10px; font: inherit; }
.qr-lead .qr-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; margin-top: 8px; }
.qr-lead .qr-consent input { margin-top: 3px; flex: none; }
.qr-lead .qr-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.qr-lead .qr-err { color: #b42318; font-size: 13px; margin-top: 6px; min-height: 1px; }
.qr-lead button.qr-cta { border: 0; cursor: pointer; margin-top: 8px; font: inherit; }
.qr-lead button.qr-cta:disabled { opacity: .6; cursor: default; }
