.aqlai-root {
  --aqlai-navy: #07182f;
  --aqlai-blue: #102a4d;
  --aqlai-red: #c41f32;
  --aqlai-text: #142033;
  --aqlai-muted: #607086;
  --aqlai-line: rgba(10, 25, 45, 0.12);
  --aqlai-glass: rgba(255, 255, 255, 0.88);
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--aqlai-text);
}
.aqlai-root[data-placement="bottom-left"] {
  right: auto;
  left: max(18px, env(safe-area-inset-left));
}
.aqlai-root * {
  box-sizing: border-box;
}
.aqlai-launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px 10px 10px;
  background: var(--aqlai-navy);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 14px 36px rgba(7, 24, 47, 0.28);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.aqlai-launcher:hover,
.aqlai-launcher:focus-visible {
  transform: translateY(-1px);
  background: #0b2343;
  box-shadow: 0 18px 44px rgba(7, 24, 47, 0.34);
  outline: 3px solid rgba(196, 31, 50, 0.22);
}
.aqlai-launcher-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  color: var(--aqlai-red);
  font-size: 12px;
  font-weight: 800;
}
.aqlai-panel {
  position: absolute;
  right: 0;
  bottom: 64px;
  width: min(430px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 96px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: var(--aqlai-glass);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 26px 80px rgba(7, 24, 47, 0.28);
  transform: translateY(10px) scale(0.98);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}
.aqlai-root[data-placement="bottom-left"] .aqlai-panel {
  right: auto;
  left: 0;
}
.aqlai-root.is-open .aqlai-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.aqlai-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 20px 14px;
  background: linear-gradient(135deg, var(--aqlai-navy), var(--aqlai-blue));
  color: #fff;
}
.aqlai-panel-head h2 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}
.aqlai-panel-head p {
  margin: 0;
  max-width: 320px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.35;
}
.aqlai-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 24px;
  line-height: 28px;
  cursor: pointer;
}
.aqlai-disclaimer {
  margin: 14px 16px 8px;
  padding: 12px;
  border: 1px solid rgba(196, 31, 50, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #4a5668;
  font-size: 11px;
  line-height: 1.42;
}
.aqlai-prompts {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 16px 12px;
  scrollbar-width: thin;
}
.aqlai-prompts button {
  flex: 0 0 auto;
  max-width: 250px;
  border: 1px solid var(--aqlai-line);
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--aqlai-blue);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.aqlai-prompts button:hover,
.aqlai-prompts button:focus-visible {
  border-color: rgba(196, 31, 50, 0.42);
  outline: none;
}
.aqlai-messages {
  flex: 1 1 auto;
  overflow: auto;
  padding: 0 16px 14px;
}
.aqlai-message {
  margin: 10px 0;
  padding: 12px 13px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.48;
}
.aqlai-message-user {
  margin-left: 40px;
  background: var(--aqlai-navy);
  color: #fff;
}
.aqlai-message-assistant {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--aqlai-line);
}
.aqlai-result-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.aqlai-card {
  border: 1px solid var(--aqlai-line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.aqlai-card-meta {
  color: var(--aqlai-red);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.aqlai-card h3 {
  margin: 5px 0 6px;
  font-size: 15px;
  line-height: 1.28;
  letter-spacing: 0;
}
.aqlai-card h3 a {
  color: var(--aqlai-navy);
  text-decoration: none;
}
.aqlai-card p {
  margin: 0 0 7px;
  color: #4b5a6d;
}
.aqlai-sku {
  font-weight: 700;
  color: var(--aqlai-blue) !important;
}
.aqlai-link {
  color: var(--aqlai-red);
  font-weight: 800;
}
.aqlai-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.aqlai-ctas a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--aqlai-red);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.aqlai-ctas a + a {
  background: var(--aqlai-navy);
}
.aqlai-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--aqlai-line);
  background: rgba(255, 255, 255, 0.72);
}
.aqlai-form input {
  min-width: 0;
  height: 42px;
  border: 1px solid var(--aqlai-line);
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  color: var(--aqlai-text);
  font: inherit;
}
.aqlai-form input:focus {
  border-color: rgba(196, 31, 50, 0.55);
  outline: 3px solid rgba(196, 31, 50, 0.14);
}
.aqlai-form button {
  height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 17px;
  background: var(--aqlai-red);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
@media (max-width: 520px) {
  .aqlai-root {
    right: 12px;
    left: 12px;
    bottom: 12px;
  }
  .aqlai-launcher {
    width: 100%;
    justify-content: center;
  }
  .aqlai-panel,
  .aqlai-root[data-placement="bottom-left"] .aqlai-panel {
    left: 0;
    right: 0;
    width: 100%;
    bottom: 62px;
    max-height: calc(100vh - 86px);
  }
}
