:root {
  --ac-green: #0e2a20;
  --ac-green-2: #173f30;
  --ac-gold: #d5af7a;
  --ac-cream: #f4efe6;
  --ac-ink: #132019;
}

.auctaris-chat-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9998;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(213,175,122,.55);
  border-radius: 50%;
  background: linear-gradient(145deg, #173f30, #0e2a20);
  color: var(--ac-gold);
  box-shadow: 0 16px 45px rgba(6,22,16,.34);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.auctaris-chat-launcher:hover { transform: translateY(-2px); box-shadow: 0 20px 52px rgba(6,22,16,.42); }
.auctaris-chat-launcher svg { width: 27px; height: 27px; }
.auctaris-chat-launcher[aria-expanded="true"] .chat-open-icon { display:none; }
.auctaris-chat-launcher[aria-expanded="false"] .chat-close-icon { display:none; }

.auctaris-chat-panel {
  position: fixed;
  right: 22px;
  bottom: 96px;
  z-index: 9999;
  width: min(390px, calc(100vw - 28px));
  height: min(650px, calc(100vh - 125px));
  border: 1px solid rgba(213,175,122,.28);
  border-radius: 24px;
  background: #fbf8f2;
  box-shadow: 0 24px 80px rgba(5,18,13,.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform-origin: bottom right;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.auctaris-chat-panel[hidden] { display:flex; opacity:0; transform: translateY(14px) scale(.97); visibility:hidden; pointer-events:none; }

.auctaris-chat-head {
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--ac-green), var(--ac-green-2));
  color: var(--ac-cream);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.auctaris-chat-brand { display:flex; align-items:center; gap:12px; min-width:0; }
.auctaris-chat-mark { width:42px; height:42px; border-radius:50%; object-fit:cover; border:1px solid rgba(213,175,122,.45); background:#0b2119; }
.auctaris-chat-title { font: 600 20px/1.1 "Cormorant Garamond", serif; letter-spacing:.01em; }
.auctaris-chat-subtitle { margin-top:4px; font: 500 11px/1.2 "DM Sans", sans-serif; color: rgba(244,239,230,.72); }
.auctaris-chat-head button { border:0; background:transparent; color:var(--ac-cream); cursor:pointer; font-size:22px; }

.auctaris-chat-messages {
  flex:1;
  overflow:auto;
  padding:20px 16px;
  display:flex;
  flex-direction:column;
  gap:12px;
  scroll-behavior:smooth;
}
.auctaris-chat-message { max-width:86%; font: 400 14px/1.55 "DM Sans", sans-serif; }
.auctaris-chat-message > div { padding:11px 13px; border-radius:16px; white-space:pre-wrap; overflow-wrap:anywhere; }
.auctaris-chat-message.ai, .auctaris-chat-message.system, .auctaris-chat-message.human { align-self:flex-start; }
.auctaris-chat-message.ai > div { color:var(--ac-ink); background:#eee8dd; border-bottom-left-radius:5px; }
.auctaris-chat-message.human > div { color:#fff; background:var(--ac-green-2); border-bottom-left-radius:5px; }
.auctaris-chat-message.system > div { color:#52635b; background:#e7eee9; font-size:12px; }
.auctaris-chat-message.visitor { align-self:flex-end; }
.auctaris-chat-message.visitor > div { color:white; background:var(--ac-green); border-bottom-right-radius:5px; }
.auctaris-chat-message a { color:#7b572b; font-weight:700; text-decoration:underline; text-underline-offset:2px; }
.auctaris-chat-meta { margin-top:4px; color:#809087; font-size:10px; }

.auctaris-chat-quick { padding:0 16px 10px; display:flex; flex-wrap:wrap; gap:8px; }
.auctaris-chat-quick button { border:1px solid rgba(14,42,32,.2); border-radius:999px; padding:8px 11px; background:white; color:var(--ac-green); font:600 12px/1.2 "DM Sans", sans-serif; cursor:pointer; }
.auctaris-chat-quick button:hover { background:#edf2ee; }

.auctaris-chat-status { min-height:22px; padding:0 18px 6px; color:#66766e; font:500 11px/1.3 "DM Sans", sans-serif; }
.auctaris-chat-form { display:flex; gap:9px; padding:12px; border-top:1px solid #e7e0d5; background:#fff; }
.auctaris-chat-form textarea { flex:1; resize:none; min-height:44px; max-height:110px; border:1px solid #d8d1c7; border-radius:14px; padding:11px 12px; color:#15231c; font:400 14px/1.45 "DM Sans", sans-serif; outline:none; }
.auctaris-chat-form textarea:focus { border-color:var(--ac-gold); box-shadow:0 0 0 3px rgba(213,175,122,.16); }
.auctaris-chat-send { width:44px; height:44px; border:0; border-radius:13px; background:var(--ac-gold); color:var(--ac-green); cursor:pointer; font-size:19px; font-weight:700; }
.auctaris-chat-send:disabled { opacity:.45; cursor:not-allowed; }
.auctaris-chat-note { padding:0 15px 11px; background:#fff; color:#7b8982; text-align:center; font:400 10px/1.35 "DM Sans",sans-serif; }

@media (max-width: 640px) {
  .auctaris-chat-launcher { right:16px; bottom:16px; }
  .auctaris-chat-panel { inset:10px 10px 88px; width:auto; height:auto; border-radius:20px; }
}

/* v14 read receipts */
.auctaris-chat-message.visitor .auctaris-chat-meta {
  display: block;
  margin: 4px 4px 0 0;
  text-align: right;
  color: #718078;
  font-size: 10px;
  line-height: 1.2;
}
