:root {
  --qlufw-orange: #E06E38;
  --qlufw-orange-dark: #c95e2d;
  --qlufw-ink: #1f2328;
  --qlufw-muted: #67707c;
  --qlufw-panel: rgba(255, 255, 255, 0.9);
  --qlufw-line: rgba(31, 35, 40, 0.1);
  --qlufw-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  --qlufw-radius: 18px;
  --qlufw-z: 999995;
}

.qlufw {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(106px, calc(env(safe-area-inset-bottom) + 106px));
  z-index: var(--qlufw-z);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.qlufw *, .qlufw *::before, .qlufw *::after { box-sizing: border-box; }

.qlufw__actions {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: var(--qlufw-radius);
  background: var(--qlufw-panel);
  box-shadow: var(--qlufw-shadow);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.qlufw__button,
.qlufw__toggle {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.qlufw__button {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  min-width: 154px;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid var(--qlufw-line);
  border-radius: 13px;
  background: rgba(255,255,255,.82);
  color: var(--qlufw-ink);
  text-align: left;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.qlufw__button--quakeai {
  background: var(--qlufw-orange);
  border-color: rgba(224,110,56,.62);
  color: #fff;
}

.qlufw__button:hover {
  transform: translateY(-1px);
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .1);
}

.qlufw__button--quakeai:hover { background: var(--qlufw-orange-dark); }

.qlufw__button:focus-visible,
.qlufw__toggle:focus-visible {
  outline: 3px solid rgba(224,110,56,.35);
  outline-offset: 3px;
}

.qlufw__icon,
.qlufw__toggle-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(31,35,40,.06);
}

.qlufw__button--quakeai .qlufw__icon { background: rgba(255,255,255,.18); }
.qlufw svg { width: 18px; height: 18px; fill: currentColor; }
.qlufw__label { font-size: 14px; font-weight: 750; line-height: 1; }
.qlufw__count {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--qlufw-orange);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.qlufw__button--quakeai .qlufw__count { background: #fff; color: var(--qlufw-orange); }
.qlufw__toggle { display: none; }

body .aqlai-root .aqlai-launcher,
body .xoo-wsc-basket,
body.qlufw-chat-closed #tidio-chat iframe,
body.qlufw-chat-closed iframe[title*="chat" i][src*="tidio" i] {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(8px) scale(.96) !important;
}

body.qlufw-cart-open .xoo-wsc-basket,
body.qlufw-chat-open #tidio-chat iframe,
body.qlufw-chat-open iframe[title*="chat" i][src*="tidio" i] {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

@media (max-width: 767px) {
  .qlufw {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(92px, calc(env(safe-area-inset-bottom) + 92px));
  }
  .qlufw__toggle {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 17px;
    background: var(--qlufw-orange);
    color: #fff;
    box-shadow: var(--qlufw-shadow);
  }
  .qlufw__toggle-icon { background: rgba(255,255,255,.16); }
  .qlufw__actions {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    min-width: 158px;
    transform: translateY(8px) scale(.96);
    transform-origin: bottom right;
    opacity: 0;
    pointer-events: none;
    transition: transform .18s ease, opacity .18s ease;
  }
  .qlufw.is-open .qlufw__actions {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
  }
  .qlufw__button { min-width: 150px; min-height: 44px; }
}


body .aqlai-root.is-open {
  inset: 0 !important;
  z-index: 999996 !important;
  display: grid !important;
  place-items: center !important;
  pointer-events: none !important;
  transform: none !important;
}

body .aqlai-root.is-open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(18, 22, 28, 0.36);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: auto;
}

body .aqlai-root.is-open .aqlai-panel {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: min(860px, calc(100vw - 40px)) !important;
  max-height: min(820px, calc(100vh - 56px)) !important;
  border-radius: 22px !important;
  transform-origin: center center !important;
  box-shadow: 0 34px 110px rgba(15, 23, 42, 0.38) !important;
  pointer-events: auto !important;
  z-index: 1 !important;
}

body .aqlai-root.is-open .aqlai-launcher {
  display: none !important;
}

body .aqlai-root.is-open .aqlai-messages {
  min-height: 260px;
}

@media (max-width: 767px) {
  body .aqlai-root.is-open {
    align-items: end !important;
    padding: 12px !important;
  }

  body .aqlai-root.is-open .aqlai-panel {
    width: 100% !important;
    max-height: calc(100vh - 24px) !important;
    border-radius: 18px !important;
  }

  body .aqlai-root.is-open .aqlai-messages {
    min-height: 220px;
  }
}
