/* Ask Pixie — emerald, antique gold, cream, soft pink */
.apx-root {
  --apx-emerald: #0f4d3c;
  --apx-emerald-2: #16634e;
  --apx-gold: #b8913a;
  --apx-gold-soft: #e9d9ae;
  --apx-cream: #fbf6ea;
  --apx-pink: #f6dde4;
  --apx-ink: #1f2a26;
  --apx-muted: #6b746f;
  --apx-warn: #8a3b12;
  --apx-warn-bg: #fdeee2;
  --apx-ok-bg: #e6f2ec;
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2147483000;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--apx-ink);
  font-size: 15px;
  line-height: 1.4;
}
.apx-root *, .apx-root *::before, .apx-root *::after { box-sizing: border-box; }

.apx-launcher {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto;
  padding: 12px 18px;
  border: 2px solid var(--apx-gold);
  border-radius: 999px;
  background: var(--apx-emerald);
  color: var(--apx-cream);
  font: 600 15px/1 Georgia, serif;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(15, 77, 60, .35);
}
.apx-launcher:hover { background: var(--apx-emerald-2); }
.apx-launcher:focus-visible { outline: 3px solid var(--apx-gold-soft); outline-offset: 2px; }
.apx-spark { color: var(--apx-gold-soft); font-size: 18px; }
.apx-root[data-open="1"] .apx-launch-label::after { content: " \00d7"; }

.apx-panel {
  display: none;
  flex-direction: column;
  width: 370px;
  height: min(600px, calc(100vh - 100px));
  margin-bottom: 12px;
  background: var(--apx-cream);
  border: 1px solid var(--apx-gold-soft);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(31, 42, 38, .28);
}
.apx-root[data-open="1"] .apx-panel { display: flex; }

.apx-head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 14px 12px 18px;
  background: var(--apx-emerald);
  color: var(--apx-cream);
  border-bottom: 3px solid var(--apx-gold);
}
.apx-titles { flex: 1; min-width: 0; }
.apx-title { font-size: 18px; font-weight: 700; color: #fff; }
.apx-sub { font: 12px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; opacity: .85; }
.apx-badge {
  font: 700 10px/1 -apple-system, sans-serif; letter-spacing: .08em;
  padding: 5px 7px; border-radius: 6px;
  background: var(--apx-gold); color: var(--apx-emerald);
}
.apx-close {
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: var(--apx-cream);
  font-size: 24px; line-height: 1; cursor: pointer;
}
.apx-close:hover { background: rgba(255, 255, 255, .12); }

.apx-log {
  flex: 1; overflow-y: auto;
  padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.apx-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; word-wrap: break-word; }
.apx-msg p { margin: 0 0 4px; }
.apx-msg p:last-child { margin-bottom: 0; }
.apx-bot { align-self: flex-start; background: #fff; border-left: 3px solid var(--apx-emerald); border-top-left-radius: 4px; }
.apx-user { align-self: flex-end; background: var(--apx-pink); border-top-right-radius: 4px; }
.apx-muted { color: var(--apx-muted); font-style: italic; background: transparent; border-left-color: transparent; padding-top: 0; padding-bottom: 0; }
.apx-ok { background: var(--apx-ok-bg); }
.apx-warn { background: var(--apx-warn-bg); border-left-color: var(--apx-warn); color: var(--apx-warn); }
.apx-msg a { color: var(--apx-emerald); font-weight: 600; text-decoration: underline; }

.apx-products { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.apx-product {
  display: flex; gap: 10px; align-items: center;
  padding: 8px; border: 1px solid var(--apx-gold-soft); border-radius: 10px;
  background: var(--apx-cream); text-decoration: none !important; color: var(--apx-ink) !important;
}
.apx-product:hover { border-color: var(--apx-gold); }
.apx-product img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; flex: none; }
.apx-pinfo { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.apx-pinfo strong { font-size: 14px; }
.apx-price { color: var(--apx-emerald); font-weight: 700; }
.apx-short { color: var(--apx-muted); font-size: 12px; }

.apx-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; max-height: 120px; overflow-y: auto; }
.apx-chip {
  padding: 7px 12px; border-radius: 999px;
  border: 1.5px solid var(--apx-gold); background: #fff; color: var(--apx-emerald);
  font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}
.apx-chip:hover { background: var(--apx-gold-soft); }
.apx-chip:focus-visible { outline: 2px solid var(--apx-emerald); outline-offset: 1px; }

.apx-form { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--apx-gold-soft); background: #fff; }
.apx-input {
  flex: 1; min-width: 0; padding: 10px 12px;
  border: 1px solid #d9d2c0; border-radius: 10px;
  font: 15px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--apx-ink); background: #fff;
}
.apx-input:focus { outline: 2px solid var(--apx-emerald); border-color: transparent; }
.apx-send {
  padding: 0 16px; border: 0; border-radius: 10px;
  background: var(--apx-emerald); color: #fff;
  font: 600 14px -apple-system, sans-serif; cursor: pointer;
}
.apx-send:hover { background: var(--apx-emerald-2); }
.apx-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.apx-foot { padding: 6px 12px 10px; background: #fff; font: 11px/1.3 -apple-system, sans-serif; color: var(--apx-muted); }
.apx-clear { border: 0; background: none; padding: 0; color: var(--apx-emerald); text-decoration: underline; font: inherit; cursor: pointer; }

@media (max-width: 480px) {
  .apx-root { right: 10px; bottom: 10px; left: 10px; }
  .apx-root[data-open="1"] { top: 10px; display: flex; flex-direction: column; }
  .apx-panel { width: 100%; height: auto; flex: 1; }
  .apx-input { font-size: 16px; } /* stops iOS zoom */
}
@media (prefers-reduced-motion: no-preference) {
  .apx-panel { animation: apx-in .18s ease-out; }
  @keyframes apx-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
