.browser-frame { position: relative; }
.browser-frame .store-widget-area { position: absolute; z-index: 6; inset: 0; pointer-events: none; }
.browser-frame .store-widget-area > .widget-launcher {
  right: 17px;
  bottom: 94px;
  width: 46px;
  height: 46px;
  pointer-events: auto;
  border-radius: 50%;
  background: #315cf5;
  color: #fff;
  box-shadow: 0 8px 25px #183eaa66;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.browser-frame .store-widget-area > .widget-launcher:nth-child(2) { bottom: 147px; }
.browser-frame .store-widget-area > .widget-launcher:nth-child(3) { bottom: 200px; }
.browser-frame .store-widget-area > .widget-launcher:hover { transform: translateY(-3px); background: #2448cf; box-shadow: 0 12px 28px #183eaa70; }
.browser-frame .store-widget-area > .widget-launcher i { font-size: 20px; }
.browser-frame .store-widget-area > .widget-launcher.is-whatsapp { background: #168c64; box-shadow: 0 8px 25px #07654266; }
.browser-frame .store-widget-area > .widget-launcher.is-whatsapp:hover { background: #0d7553; }
.chat-channel-switch {
  position: absolute;
  z-index: 7;
  right: 72px;
  bottom: 101px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 78px;
  height: 32px;
  padding: 3px;
  border: 1px solid #dce5f2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 5px 20px #0b1d3c38;
  color: #64738b;
  cursor: pointer;
  pointer-events: auto;
}
.chat-channel-label { position: relative; z-index: 1; font: 800 10px Inter, "DM Sans", system-ui, sans-serif; text-align: center; }
.chat-channel-label:first-child,
.chat-channel-switch.is-whatsapp .chat-channel-label:nth-child(2) { color: #fff; }
.chat-channel-switch.is-whatsapp .chat-channel-label:first-child { color: #64738b; }
.chat-channel-thumb {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 34px;
  height: 24px;
  border-radius: 13px;
  background: #315cf5;
  box-shadow: 0 1px 4px #142b6850;
  transition: transform .2s ease, background .2s ease;
}
.chat-channel-switch.is-whatsapp .chat-channel-thumb { transform: translateX(36px); background: #168c64; }

.chat-float-panel {
  position: absolute;
  z-index: 7;
  right: 17px;
  bottom: 151px;
  display: flex;
  flex-direction: column;
  width: min(365px, calc(100% - 34px));
  height: min(460px, calc(100% - 175px));
  overflow: hidden;
  border: 1px solid #dce5f2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 64px #0b1d3c52;
  color: #17243b;
  font: 14px/1.45 Inter, "DM Sans", system-ui, sans-serif;
  opacity: 0;
  transform: translateY(14px) scale(.97);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s cubic-bezier(.2,.8,.2,1);
}
.chat-float-panel[hidden] { display: none; }
.chat-float-panel.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.chat-float-header { display: flex; align-items: center; gap: 11px; min-height: 66px; padding: 11px 15px; background: #11254a; color: #fff; }
.chat-float-avatar { display: grid; flex: 0 0 36px; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #315cf5; font-size: 18px; }
.chat-float-header > div:nth-child(2) { flex: 1; min-width: 0; }
.chat-float-header strong, .chat-float-header small { display: block; }
.chat-float-header strong { font-size: 15px; font-weight: 750; }
.chat-float-header small { margin-top: 2px; color: #bac9e7; font-size: 11px; }
.chat-float-close { display: grid; place-items: center; width: 29px; height: 29px; border: 0; border-radius: 7px; background: #ffffff1d; color: #e6edff; cursor: pointer; }
.chat-float-close:hover { background: #ffffff36; }
.chat-float-messages { display: flex; flex: 1; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; padding: 14px; background: #f7f9fd; overscroll-behavior: contain; }
.chat-float-bubble { align-self: flex-start; max-width: 88%; padding: 10px 12px; border: 1px solid #e1e9f5; border-radius: 12px 12px 12px 3px; background: #fff; color: #34445f; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.chat-float-bubble.is-user { align-self: flex-end; border-color: #315cf5; border-radius: 12px 12px 3px 12px; background: #315cf5; color: #fff; }
.chat-float-composer { display: flex; gap: 8px; padding: 11px 12px; border-top: 1px solid #e6ebf3; background: #fff; }
.chat-float-composer input { flex: 1; min-width: 0; height: 39px; padding: 0 11px; border: 1px solid #dce5f1; border-radius: 9px; background: #f9fbff; color: #17243b; font: 13px Inter, "DM Sans", sans-serif; }
.chat-float-composer button { display: grid; flex: 0 0 39px; place-items: center; width: 39px; height: 39px; border: 0; border-radius: 9px; background: #315cf5; color: #fff; cursor: pointer; }
.chat-float-composer button:hover { background: #2448cf; }
.chat-float-note { padding: 0 12px 10px; background: #fff; color: #728096; font-size: 11px; text-align: center; }
.chat-float-panel :is(button, input):focus-visible,
.browser-frame .store-widget-area > .widget-launcher:focus-visible,
.chat-channel-switch:focus-visible { outline: 3px solid #8caaff; outline-offset: 2px; }
@media (max-width: 760px) {
  .browser-frame .store-widget-area > .widget-launcher { right: 10px; bottom: 88px; width: 44px; height: 44px; }
  .browser-frame .store-widget-area > .widget-launcher:nth-child(2) { bottom: 139px; }
  .browser-frame .store-widget-area > .widget-launcher:nth-child(3) { bottom: 190px; }
  .chat-channel-switch { right: 62px; bottom: 94px; }
  .chat-float-panel { right: 10px; bottom: 141px; width: min(365px, calc(100% - 20px)); height: min(460px, calc(100% - 160px)); }
}
@media (prefers-reduced-motion: reduce) {
  .browser-frame .store-widget-area > .widget-launcher, .chat-float-panel, .chat-channel-thumb { transition: none; }
}
