/* Auto-reply pre-qualification widget styles — warm luxury palette */
:root {
  --ar-brown: var(--brown, #6B3F23);
  --ar-gold: var(--gold, #B8902E);
  --ar-cream: var(--cream, #FBF7F0);
}

/* Launcher bubble (sits above wa-fab @20px and quote-fab @86px) */
.ar-launcher {
  position: fixed;
  right: 18px;
  bottom: calc(152px + env(safe-area-inset-bottom, 0px));
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: var(--ar-brown);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 61;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  transition: transform .18s;
}
.ar-launcher:hover { transform: translateY(-3px); }

/* Panel */
.ar-panel {
  position: fixed;
  right: 18px;
  bottom: calc(218px + env(safe-area-inset-bottom, 0px));
  width: 320px;
  max-width: calc(100vw - 24px);
  max-height: 62vh;
  background: #fff;
  border: 1px solid var(--line, #E8E0D4);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(60, 40, 20, .22);
  z-index: 62;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.ar-panel.ar-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Header */
.ar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ar-brown);
  color: #fff;
  padding: 12px 14px;
}
.ar-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ade80;
  flex: none;
}
.ar-title { font-weight: 600; font-size: 14.5px; flex: 1; }
.ar-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.ar-close:hover { background: rgba(255, 255, 255, .15); }

/* Messages */
.ar-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--ar-cream);
}
.ar-msg {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
}
.ar-bot {
  background: #fff;
  border: 1px solid var(--line, #E8E0D4);
  color: #3A2A10;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.ar-user {
  background: var(--ar-brown);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* WhatsApp CTA */
.ar-wa-cta {
  display: block;
  text-align: center;
  background: #25D366;
  color: #06381d;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  padding: 11px 14px;
  border-radius: 10px;
  align-self: stretch;
}
.ar-wa-cta:hover { filter: brightness(1.05); }

/* Quick-reply chips */
.ar-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line, #E8E0D4);
  background: #fff;
}
.ar-chip {
  background: var(--ar-cream);
  border: 1px solid var(--ar-gold);
  color: var(--ar-brown);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .15s;
}
.ar-chip:hover { background: var(--ar-gold); color: #fff; }
.ar-skip {
  background: none;
  border: none;
  color: var(--muted, #6B5D52);
  font-size: 12.5px;
  text-decoration: underline;
  cursor: pointer;
  padding: 8px 4px;
}

/* Mobile: respect iPhone safe area, tighten layout */
@media (max-width: 560px) {
  .ar-launcher { right: 12px; width: 48px; height: 48px; bottom: 152px; }
  .ar-panel { right: 12px; bottom: 210px; width: calc(100vw - 24px); max-height: 58vh; }
  .ar-panel { bottom: calc(210px + env(safe-area-inset-bottom, 0px)); }
  .ar-launcher { bottom: calc(152px + env(safe-area-inset-bottom, 0px)); }
}
