/* Chat bubble styles. Everything is prefixed "amc-" so it won't clash with a website's own styles. */
.amc-launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 9999;
  width: 62px; height: 62px; border-radius: 50%;
  background: #ff5a1f; color: #0b0b0b; border: 2px solid #0b0b0b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  cursor: pointer; display: grid; place-items: center;
  transition: transform 0.15s;
}
.amc-launcher:hover { transform: scale(1.06); }
.amc-launcher:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.amc-launcher svg { width: 28px; height: 28px; }
.amc-launcher .amc-dot {
  position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 2px solid #0b0b0b;
}

.amc-panel {
  position: fixed; right: 20px; bottom: 96px; z-index: 9999;
  width: min(380px, calc(100vw - 24px)); height: min(600px, calc(100vh - 120px));
  display: flex; flex-direction: column;
  background: #111; color: #fff;
  border: 1px solid #2a2a2a; border-top: 4px solid #ff5a1f;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.45;
}
.amc-panel[hidden] { display: none; }

.amc-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #0b0b0b; border-bottom: 1px solid #2a2a2a; }
.amc-avatar { width: 34px; height: 34px; border-radius: 50%; background: #ff5a1f; color: #0b0b0b; display: grid; place-items: center; font-weight: 800; font-family: "Archivo", sans-serif; flex: none; }
.amc-title { flex: 1; min-width: 0; }
.amc-title strong { display: block; font-size: 15px; }
.amc-title span { font-size: 12px; color: #9a9a9a; }
.amc-icon-btn { background: none; border: 1px solid #333; color: #fff; cursor: pointer; padding: 6px 9px; font-size: 12px; font-weight: 600; }
.amc-icon-btn:hover { border-color: #ff5a1f; color: #ff5a1f; }
.amc-icon-btn:focus-visible, .amc-panel button:focus-visible, .amc-panel input:focus-visible, .amc-panel select:focus-visible, .amc-panel textarea:focus-visible { outline: 2px solid #ff5a1f; outline-offset: 2px; }

.amc-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.amc-msg { max-width: 86%; padding: 9px 12px; white-space: normal; word-wrap: break-word; }
.amc-msg a { color: #ff7a45; }
.amc-bot { align-self: flex-start; background: #1e1e1e; border-left: 3px solid #ff5a1f; }
.amc-user { align-self: flex-end; background: #ff5a1f; color: #0b0b0b; font-weight: 500; }
.amc-user a { color: #0b0b0b; }
.amc-typing { align-self: flex-start; color: #9a9a9a; font-size: 13px; padding: 4px 2px; }
.amc-typing span { animation: amc-blink 1.2s infinite; }
.amc-typing span:nth-child(2) { animation-delay: 0.2s; }
.amc-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes amc-blink { 0%, 80%, 100% { opacity: 0.2; } 40% { opacity: 1; } }

.amc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.amc-chip { background: transparent; color: #fff; border: 1px solid #ff5a1f; padding: 5px 10px; font-size: 13px; cursor: pointer; }
.amc-chip:hover { background: #ff5a1f; color: #0b0b0b; }

.amc-form-row { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #2a2a2a; background: #0b0b0b; }
.amc-form-row textarea {
  flex: 1; resize: none; height: 42px; max-height: 110px;
  background: #1a1a1a; color: #fff; border: 1px solid #333; padding: 10px; font: inherit;
}
.amc-send { background: #ff5a1f; color: #0b0b0b; border: none; font-weight: 700; padding: 0 14px; cursor: pointer; }
.amc-send:disabled { opacity: 0.5; cursor: default; }
.amc-foot { font-size: 11px; color: #7d7d7d; text-align: center; padding: 0 10px 8px; background: #0b0b0b; }
.amc-foot a { color: #9a9a9a; }

/* Lead form inside the chat */
.amc-lead { align-self: stretch; background: #1a1a1a; border: 1px solid #ff5a1f; padding: 12px; display: grid; gap: 8px; }
.amc-lead p { margin: 0; font-weight: 600; }
.amc-lead label { font-size: 13px; color: #cfcfcf; display: grid; gap: 3px; }
.amc-lead input[type="text"], .amc-lead input[type="email"], .amc-lead input[type="tel"], .amc-lead select, .amc-lead textarea {
  background: #0b0b0b; color: #fff; border: 1px solid #333; padding: 8px; font: inherit; font-size: 14px;
}
.amc-lead textarea { resize: vertical; }
.amc-lead .amc-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.4; }
.amc-lead .amc-consent input { margin-top: 3px; accent-color: #ff5a1f; flex: none; }
.amc-lead .amc-small { font-size: 11px; color: #8a8a8a; margin: 0; font-weight: 400; }
.amc-lead .amc-error { color: #ff8a65; font-size: 13px; font-weight: 600; margin: 0; }
.amc-lead button[type="submit"] { background: #ff5a1f; color: #0b0b0b; border: none; padding: 9px; font-weight: 700; cursor: pointer; }
.amc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 480px) {
  .amc-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-top-width: 4px; }
  .amc-launcher.amc-is-open { display: none; }
}
@media (prefers-reduced-motion: reduce) { .amc-typing span { animation: none; } .amc-launcher { transition: none; } }
