/* Allsalone chat widget. Unique to allsalone.com: navy header, orange open
   button, sky-blue accents (brand palette #144f7c / #2c6f9e / #77b0d4 /
   #fa5a0c), Tahoma/Verdana stack to match the site. Classes alschat-*. */
.alschat-open {
  position: fixed; right: 18px; bottom: 18px; z-index: 9990;
  font: bold 14px Tahoma, Verdana, sans-serif;
  color: #fff; background: #fa5a0c;
  border: 2px solid #fff; border-radius: 24px;
  padding: 10px 22px; cursor: pointer;
  box-shadow: 0 2px 10px rgba(20, 79, 124, .45);
}
.alschat-open:hover, .alschat-open:focus { background: #e04f0a; }
.alschat-panel {
  position: fixed; right: 18px; bottom: 70px; z-index: 9991;
  width: 320px; max-width: calc(100vw - 36px); height: 430px; max-height: 70vh;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid #77b0d4; border-radius: 10px;
  box-shadow: 0 6px 24px rgba(20, 79, 124, .35);
  font: 13px/1.45 Tahoma, Verdana, sans-serif; color: #1a2a33;
  overflow: hidden;
}
.alschat-head {
  display: flex; justify-content: space-between; align-items: center;
  background: #144f7c; color: #fff; padding: 9px 12px;
  font-weight: bold; font-size: 13px;
}
.alschat-x {
  background: none; border: 0; color: #cfe4f2; font-size: 20px;
  cursor: pointer; line-height: 1; padding: 0 2px;
}
.alschat-x:hover, .alschat-x:focus { color: #fff; }
.alschat-log {
  flex: 1; overflow-y: auto; padding: 10px;
  background: #f4f9fc;
}
.alschat-msg {
  max-width: 85%; margin: 0 0 8px; padding: 7px 10px;
  border-radius: 10px; white-space: pre-wrap; word-wrap: break-word;
}
.alschat-msg.bot {
  background: #fff; border: 1px solid #d7e7f2; border-left: 3px solid #77b0d4;
  border-radius: 3px 10px 10px 10px; margin-right: 12%;
}
.alschat-msg.me {
  background: #2c6f9e; color: #fff;
  border-radius: 10px 3px 10px 10px; margin-left: 15%;
}
.alschat-chips {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 7px 10px; border-top: 1px solid #d7e7f2; background: #fff;
  max-height: 86px; overflow-y: auto;
}
.alschat-chip {
  font: 11px Tahoma, Verdana, sans-serif; color: #144f7c;
  background: #eaf3fa; border: 1px solid #77b0d4; border-radius: 14px;
  padding: 3px 10px; cursor: pointer;
}
.alschat-chip:hover, .alschat-chip:focus { background: #d7e9f6; }
.alschat-chip-send { color: #fff; background: #fa5a0c; border-color: #fa5a0c; }
.alschat-chip-send:hover, .alschat-chip-send:focus { background: #e04f0a; }
.alschat-form { display: flex; border-top: 1px solid #d7e7f2; }
.alschat-in {
  flex: 1; border: 0; padding: 10px 12px;
  font: 13px Tahoma, Verdana, sans-serif; color: #1a2a33;
}
.alschat-in:focus { outline: 2px solid #77b0d4; outline-offset: -2px; }
.alschat-esc {
  border-top: 1px solid #d7e7f2; padding: 9px 12px; background: #fdf6f1;
  display: flex; flex-direction: column; gap: 6px;
}
.alschat-consent { font-size: 11px; color: #555; display: flex; gap: 6px; align-items: flex-start; }
.alschat-consent input { width: auto; margin-top: 2px; }
.alschat-name, .alschat-mail {
  font: 12px Tahoma, Verdana, sans-serif; padding: 5px 8px;
  border: 1px solid #c9d9e4; border-radius: 4px; width: 100%; box-sizing: border-box;
}
.alschat-send {
  font: bold 12px Tahoma, Verdana, sans-serif; color: #fff;
  background: #144f7c; border: 0; border-radius: 4px;
  padding: 7px; cursor: pointer;
}
.alschat-send:hover, .alschat-send:focus { background: #2c6f9e; }
.alschat-status { font-size: 11px; color: #b3500e; min-height: 13px; }
@media (max-width: 480px) {
  .alschat-panel { right: 8px; bottom: 64px; width: calc(100vw - 16px); }
  .alschat-open { right: 8px; bottom: 8px; }
}
/* Explicit display rules otherwise override the native hidden attribute. */
.alschat-panel[hidden], .alschat-esc[hidden] { display: none !important; }
/* Allsalone support chat - live QA delta 2026-11-25.
   Append at the END of public/assets/chat.css (after the hidden!important rule).
   Fixes from live QA:
   1) Escalation box opening squeezed the history and visually overlapped chips
      (panel is fixed-height flex; children overflowed).
   2) "Send to support" chip sat under the chips scroll fold (13 chips) - now pinned first.
   No markup or JS changes required. */

/* Panel grows when the escalation box is open so log/chips/form/esc all fit. */
.alschat-panel:has(.alschat-esc:not([hidden])) { height: min(560px, 88vh); }

/* History keeps a readable minimum height instead of being flattened. */
.alschat-log { min-height: 120px; }

/* Escalation box scrolls internally instead of pushing siblings out. */
.alschat-esc { max-height: 200px; overflow-y: auto; flex-shrink: 0; }

/* Pin the support chip to the start of the row (flex order, no JS change). */
.alschat-chip-send { order: -1; }
