/* =====================================================================
   The ARXpert — custom support chat (replaces the HubSpot widget).
   Brand: black + white + red #DD1313 (hover #b91111), greys minimal.
   Panel is white/black-text by spec (editorial, premium — never a SaaS
   helpdesk plugin). Questrial for the title, body font for messages.
   ===================================================================== */
.arxpert-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
}
.arxpert-bubble {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.arxpert-bubble:hover {
  transform: scale(1.06);
  border-color: #dd1313;
}
.arxpert-bubble:focus-visible {
  outline: 2px solid #dd1313;
  outline-offset: 3px;
}
.arxpert-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #dd1313;
  border: 2px solid #000;
}
.arxpert-panel {
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: min(400px, calc(100vw - 40px));
  height: min(620px, calc(100vh - 120px));
  background: #fff;
  color: #14151a;
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: arxpert-in 0.18s ease-out;
}
@keyframes arxpert-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .arxpert-panel {
    animation: none;
  }
  .arxpert-bubble {
    transition: none;
  }
}
@media (max-width: 480px) {
  .arxpert-panel {
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }
  /* Full-screen sheet covers the launcher — hide it (header ✕ / Esc close). */
  .arxpert-root-open .arxpert-bubble {
    display: none;
  }
}
.arxpert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #000;
  color: #fff;
}
.arxpert-title {
  font-family: var(--font-questrial), system-ui, sans-serif;
  font-size: 19px;
  letter-spacing: 0.01em;
}
.arxpert-subtitle {
  font-size: 12px;
  color: #cccccc;
  margin-top: 2px;
}
.arxpert-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}
.arxpert-close:hover {
  color: #dd1313;
}
.arxpert-close:focus-visible,
.arxpert-panel button:focus-visible,
.arxpert-panel input:focus-visible,
.arxpert-panel textarea:focus-visible {
  outline: 2px solid #dd1313;
  outline-offset: 1px;
}
.arxpert-messages {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
}
.arxpert-msg {
  max-width: 86%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.arxpert-msg-assistant {
  align-self: flex-start;
  background: #f2f2f3;
  color: #14151a;
  border-bottom-left-radius: 4px;
}
.arxpert-msg-user {
  align-self: flex-end;
  background: #000;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.arxpert-resolved {
  display: block;
  margin-top: 8px;
  background: none;
  border: 1px solid #cccccc;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12.5px;
  cursor: pointer;
  color: #14151a;
}
.arxpert-resolved:hover {
  border-color: #dd1313;
  color: #dd1313;
}
.arxpert-inputbar {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 12px 14px;
  border-top: 1px solid #e5e5e6;
  background: #fff;
}
.arxpert-inputbar textarea {
  flex: 1;
  resize: none;
  border: 1px solid #cccccc;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14.5px;
  color: #14151a;
  background: #fff;
  max-height: 110px;
}
.arxpert-send {
  background: #dd1313;
  color: #fff;
  border: none;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}
.arxpert-send:hover:not(:disabled) {
  background: #b91111;
}
.arxpert-send:disabled {
  opacity: 0.4;
  cursor: default;
}
.arxpert-ticket-form {
  border: 1px solid #e5e5e6;
  border-top: 3px solid #dd1313;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
}
.arxpert-form-title {
  font-family: var(--font-questrial), system-ui, sans-serif;
  font-size: 16px;
  color: #14151a;
}
.arxpert-form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Identity step — the first screen of the chat. Inherits .arxpert-ticket-form. */
/* Why a field is required, shown under its label (e.g. phone on machine-down). */
.arxpert-field-why {
  display: block;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.4;
  color: #b91111;
  margin-top: 2px;
}

.arxpert-identity-why {
  font-size: 13px;
  line-height: 1.45;
  color: #5c5f66;
  margin-top: -4px;
}
.arxpert-identity-fine {
  font-size: 11.5px;
  line-height: 1.45;
  color: #7a7d85;
}
.arxpert-identity-fine a {
  color: #7a7d85;
  text-decoration: underline;
}

/* Collapsed identity on the ticket form, once the identity step has answered it. */
.arxpert-known-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #5c5f66;
  background: #f6f6f7;
  border-radius: 8px;
  padding: 9px 11px;
  overflow-wrap: anywhere;
}
.arxpert-known-identity strong {
  color: #14151a;
}

.arxpert-form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #14151a;
}

.arxpert-choice {
  display: flex;
  gap: 8px;
}

.arxpert-choicebtn {
  flex: 1;
  border: 1.5px solid #cccccc;
  background: #fff;
  color: #14151a;
  border-radius: 999px;
  padding: 9px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}

.arxpert-choicebtn:hover {
  border-color: #dd1313;
  color: #dd1313;
}

.arxpert-choicebtn.is-selected {
  background: #dd1313;
  border-color: #dd1313;
  color: #fff;
}

.arxpert-form-row {
  display: flex;
  gap: 8px;
}
.arxpert-form-row > label {
  flex: 1;
}
.arxpert-ticket-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: #14151a;
}
.arxpert-ticket-form input,
.arxpert-ticket-form textarea {
  border: 1px solid #cccccc;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: #14151a;
  background: #fff;
}
.arxpert-optional,
.arxpert-hint {
  font-weight: 400;
  color: #586273;
  font-size: 12px;
}
.arxpert-ticket-form label.arxpert-cantfind {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
  color: #586273;
  cursor: pointer;
}
.arxpert-cantfind input {
  width: auto;
  margin: 0;
  accent-color: #c11212;
}
.arxpert-linklike {
  background: none;
  border: none;
  color: #c11212;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 0;
  text-align: left;
  align-self: flex-start;
}
.arxpert-linklike:hover {
  text-decoration: underline;
}
.arxpert-upload {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.arxpert-file-list {
  list-style: none;
  font-size: 12.5px;
  color: #14151a;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0;
}
.arxpert-file-list button {
  background: none;
  border: none;
  color: #c11212;
  cursor: pointer;
  margin-left: 6px;
}
.arxpert-errors {
  list-style: none;
  padding: 8px 10px;
  border: 1px solid #dd1313;
  border-radius: 8px;
  color: #c11212;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.arxpert-form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.arxpert-submit {
  background: #dd1313;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.arxpert-submit:hover:not(:disabled) {
  background: #b91111;
}
.arxpert-submit:disabled {
  opacity: 0.6;
  cursor: default;
}
.arxpert-postticket {
  align-self: flex-start;
}
.arxpert-notice {
  font-size: 12.5px;
  color: #586273;
  text-align: center;
}

/* inline sales CTA inside chat messages */
.arxpert-msg .arxpert-cta{display:inline-flex;align-items:center;gap:8px;background:#DD1313;color:#fff;font-weight:700;font-size:14px;padding:11px 20px;border-radius:999px;text-decoration:none}
.arxpert-msg .arxpert-cta:hover{background:#b91111}
.arxpert-msg-assistant:has(.arxpert-cta){background:transparent;padding:2px 0}
.arxpert-msg a{color:#DD1313;font-weight:600}


/* auto link-chips under assistant messages */
.arxpert-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.arxpert-chip{display:inline-flex;align-items:center;border:1.5px solid #DD1313;color:#DD1313;background:#fff;border-radius:999px;padding:7px 15px;font-weight:700;font-size:13px;text-decoration:none;transition:background .15s,color .15s}
.arxpert-chip:hover{background:#DD1313;color:#fff}


/* quick replies — tap instead of type */
.arxpert-quick{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.arxpert-quickbtn{background:#fff;border:1.5px solid #DD1313;color:#DD1313;border-radius:999px;padding:9px 16px;font-size:13.5px;font-weight:700;cursor:pointer;font-family:inherit;transition:background .15s,color .15s}
.arxpert-quickbtn:hover{background:#DD1313;color:#fff}.arxpert-quickbtn--urgent{background:#DD1313;color:#fff;box-shadow:0 1px 6px rgba(221,19,19,.35)}.arxpert-quickbtn--urgent:hover{background:#b81010;border-color:#b81010;color:#fff}

