/* Live chat. The public button sits above the mobile booking bar. */

.asq-chat-dock {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: var(--font, 'Inclusive Sans', sans-serif);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink, #15255a);
}

.asq-chat-panel {
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 32px));
  max-height: min(640px, calc(100dvh - 120px - env(safe-area-inset-bottom)));
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line, #dce2eb);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgb(21 37 90 / 18%);
}

.asq-chat-dock [hidden],
.asq-chat-page [hidden] {
  display: none !important;
}

.asq-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 10px 14px 16px;
  background: var(--sky-soft, #e3f4fd);
  border-bottom: 1px solid var(--line, #dce2eb);
}
.asq-chat-head-main { min-width: 0; flex: 1; }
.asq-chat-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.asq-chat-head h2,
.asq-chat-thread-head h2 {
  margin: 0;
  font-family: var(--heading, 'DM Sans', sans-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.asq-chat-sub {
  margin: 2px 0 0;
  color: var(--muted, #59627c);
  font-size: 13px;
  line-height: 1.35;
  text-wrap: pretty;
}

.asq-chat-back,
.asq-chat-icon,
.asq-chat-text {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--sky-deep, #1e78b8);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.asq-chat-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  font-size: 13px;
}

.asq-chat-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.asq-chat-icon:hover,
.asq-chat-send:hover,
.asq-chat-toggle:hover {
  background: #18608f;
}

.asq-chat-icon:hover {
  background: rgb(255 255 255 / 70%);
  color: var(--ink, #15255a);
}

.asq-chat-icon svg,
.asq-chat-send svg,
.asq-chat-toggle svg,
.asq-chat-photo svg,
.asq-chat-back svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.asq-chat-toggle svg { width: 26px; height: 26px; }

.asq-chat-live,
.asq-chat-away {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.asq-chat-live { background: #e5f6ea; color: #146c36; }
.asq-chat-away { background: #eef1f6; color: #59627c; }

.asq-chat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.asq-chat-live .asq-chat-dot { box-shadow: 0 0 0 0 rgb(20 108 54 / 50%); }

@media (prefers-reduced-motion: no-preference) {
  .asq-chat-live .asq-chat-dot { animation: asq-chat-ping 1.8s ease-out infinite; }
  .asq-chat-typing i { animation: asq-chat-bounce 1s ease-in-out infinite; }
  .asq-chat-typing i:nth-child(2) { animation-delay: 0.15s; }
  .asq-chat-typing i:nth-child(3) { animation-delay: 0.3s; }
}

@keyframes asq-chat-ping {
  70% { box-shadow: 0 0 0 6px transparent; }
}

@keyframes asq-chat-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-3px); }
}

.asq-chat-note {
  margin: 0;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line, #dce2eb);
  color: var(--ink, #15255a);
  font-size: 12.5px;
}

.asq-chat-body { min-height: 0; overflow: auto; padding: 14px; }
.asq-chat-body p { margin: 0 0 12px; color: var(--muted, #59627c); }

.asq-chat-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.asq-chat-list button,
.asq-chat-side button.asq-chat-row {
  width: 100%;
  border: 1px solid var(--line, #dce2eb);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.asq-chat-list button:hover,
.asq-chat-side button.asq-chat-row:hover,
.asq-chat-row.is-active { border-color: #9cc6e4; background: #f4fbff; }

.asq-chat-row { display: flex; flex-direction: column; gap: 2px; }
.asq-chat-row strong { font-size: 14px; }
.asq-chat-row span { color: var(--muted, #59627c); font-size: 12px; }

.asq-chat-unread {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--sky-deep, #1e78b8);
}

.asq-chat-primary,
.asq-chat-send,
.asq-chat-toggle {
  border: 0;
  color: #fff;
  background: var(--sky-deep, #1e78b8);
  cursor: pointer;
}

.asq-chat-primary {
  width: 100%;
  min-height: 44px;
  border-radius: 100px;
  font-family: var(--heading, 'DM Sans', sans-serif);
  font-size: 15px;
  font-weight: 600;
}

.asq-chat-primary:disabled,
.asq-chat-send:disabled { opacity: 0.45; cursor: default; }

.asq-chat-field {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  border: 1px solid #c9d3e0;
  border-radius: 8px;
  padding: 10px 12px;
  color: inherit;
  background: #fff;
  font: inherit;
  resize: none;
}

.asq-chat-label { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 600; }

.asq-chat-thread { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.asq-chat-log {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
  max-height: 320px;
  overflow: auto;
  padding: 14px;
  background: #f6f8fb;
}

.asq-chat-bubble { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; }
.asq-chat-bubble.is-mine { align-items: flex-end; }
.asq-chat-bubble article {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 16px;
  box-shadow: 0 1px 0 rgb(21 37 90 / 4%);
}
.asq-chat-bubble.is-mine article {
  border-bottom-right-radius: 4px;
  color: #fff;
  background: var(--ink, #15255a);
}
.asq-chat-bubble.is-theirs article {
  border: 1px solid var(--line, #dce2eb);
  border-bottom-left-radius: 4px;
  background: #fff;
}
.asq-chat-who {
  margin: 0 0 2px;
  color: var(--sky-deep, #1e78b8);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.asq-chat-bubble p { margin: 0; color: inherit; white-space: pre-wrap; }
.asq-chat-time,
.asq-chat-receipt {
  margin: 4px 0 0;
  font-size: 10px;
}
.asq-chat-bubble.is-mine .asq-chat-time { color: rgb(255 255 255 / 72%); }
.asq-chat-bubble.is-theirs .asq-chat-time,
.asq-chat-receipt { color: var(--muted, #59627c); }
.asq-chat-receipt { text-align: right; font-weight: 700; }
.asq-chat-receipt.is-seen { color: var(--sky-deep, #1e78b8); }

.asq-chat-photos { display: grid; gap: 6px; margin-top: 8px; }
.asq-chat-photos.is-grid { grid-template-columns: 1fr 1fr; }
.asq-chat-photos button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #eef1f6;
  cursor: zoom-in;
}
.asq-chat-photos img,
.asq-chat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.asq-chat-photos img { max-height: 180px; }

.asq-chat-compose {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border-top: 1px solid var(--line, #dce2eb);
}
.asq-chat-compose-row { display: flex; align-items: flex-end; gap: 8px; }
.asq-chat-compose .asq-chat-field { flex: 1; margin: 0; min-height: 44px; max-height: 120px; }
.asq-chat-photo,
.asq-chat-send {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.asq-chat-photo {
  position: relative;
  overflow: hidden;
  border: 1px solid #c9d3e0;
  background: #fff;
  color: var(--ink, #15255a);
  cursor: pointer;
}
.asq-chat-photo-wide {
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 100px;
}
.asq-chat-file {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  font-size: 0;
  cursor: pointer;
}
.asq-chat-pending { display: flex; flex-wrap: wrap; gap: 8px; }
.asq-chat-thumb { position: relative; width: 64px; height: 64px; overflow: hidden; border-radius: 8px; border: 1px solid var(--line, #dce2eb); }
.asq-chat-thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgb(0 0 0 / 60%);
  cursor: pointer;
}
.asq-chat-thumb svg { width: 12px; height: 12px; stroke: currentColor; fill: none; }

.asq-chat-error { margin: 0; color: #9d1744; font-size: 13px; }
.asq-chat-typing { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 8px 12px; border: 1px solid var(--line, #dce2eb); border-radius: 16px; background: #fff; color: var(--muted, #59627c); font-size: 12px; }
.asq-chat-typing i { width: 6px; height: 6px; border-radius: 50%; background: #8b95ab; }

.asq-chat-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgb(21 37 90 / 22%);
}
.asq-chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 100px;
  background: #d21f45;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.asq-chat-dossier {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line, #dce2eb);
  color: var(--sky-deep, #1e78b8);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.asq-chat-lightbox {
  width: auto;
  max-width: min(96vw, 960px);
  padding: 0;
  border: 0;
  background: transparent;
}
.asq-chat-lightbox::backdrop { background: rgb(8 12 20 / 82%); }
.asq-chat-lightbox img { display: block; max-width: min(96vw, 960px); max-height: 90vh; object-fit: contain; }
.asq-chat-lightbox button {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgb(255 255 255 / 16%);
  cursor: pointer;
}

body:has(#chat-app) .asq-chat-dock { display: none; }
.asq-chat-inbox {
  display: flex;
  height: min(640px, calc(100dvh - 200px));
  min-height: 480px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line, #dce2eb);
  border-radius: 22px;
}
.asq-chat-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border: 0;
  border-radius: 100px;
  background: var(--sky-deep, #1e78b8);
  color: #fff;
  font-family: var(--heading, 'DM Sans', sans-serif);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.asq-chat-new:hover { background: #18608f; }
.asq-chat-page .asq-chat-side-head:has(.asq-chat-new) {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 16px;
}
.asq-chat-page .asq-chat-side-head strong {
  font-family: var(--heading, 'DM Sans', sans-serif);
  font-size: 16px;
  font-weight: 600;
}
.asq-chat-page .asq-chat-side-head .asq-chat-new { width: 100%; }
.asq-chat-side {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #f6f8fb;
}
.asq-chat-side-head,
.asq-chat-thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border-bottom: 1px solid var(--line, #dce2eb);
}
.asq-chat-filters { display: flex; gap: 6px; }
.asq-chat-filters button,
.asq-chat-small {
  border: 0;
  border-radius: 100px;
  padding: 6px 10px;
  background: #fff;
  color: var(--ink, #15255a);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.asq-chat-filters button.is-on { background: var(--sky-deep, #1e78b8); color: #fff; }
.asq-chat-side-list { flex: 1; overflow: auto; }
.asq-chat-side .asq-chat-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line, #dce2eb);
  border-radius: 0;
  background: transparent;
  padding: 12px 14px;
}
.asq-chat-main { display: flex; min-width: 0; flex: 1; flex-direction: column; background: #f6f8fb; }
.asq-chat-main .asq-chat-log { max-height: none; }
.asq-chat-empty {
  display: grid;
  flex: 1;
  align-content: center;
  justify-items: center;
  gap: 16px;
  padding: 28px 24px;
  color: var(--muted, #59627c);
  text-align: center;
}
.asq-chat-empty p { max-width: 28rem; margin: 0; font-size: 16px; line-height: 1.45; }
.asq-chat-new:disabled { opacity: 0.45; cursor: default; }
.asq-chat-new svg { width: 18px; height: 18px; margin-left: 8px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.asq-chat-setup {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 22px;
  padding: 28px 32px 32px;
  background: #fff;
}
.asq-chat-setup > * { width: 100%; max-width: 640px; }
.asq-chat-setup .asq-chat-hello { margin: 0; color: var(--muted, #59627c); font-size: 16px; line-height: 1.5; }
.asq-chat-setup .asq-chat-label { margin: 0; font-size: 15px; }
.asq-chat-setup .asq-chat-field {
  margin-top: 8px;
  min-height: 50px;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 16px;
}
.asq-chat-setup .asq-chat-field:focus { outline: none; border-color: var(--sky-deep, #1e78b8); box-shadow: 0 0 0 4px rgb(30 120 184 / 14%); }
.asq-chat-message { display: flex; flex-direction: column; }
.asq-chat-compose.is-wide { gap: 14px; margin: 0; padding: 0; background: transparent; border-top: 0; }
.asq-chat-compose.is-wide .asq-chat-field { min-height: 160px; max-height: none; resize: vertical; line-height: 1.5; }
.asq-chat-compose-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.asq-chat-compose-actions .asq-chat-photo-wide {
  flex: none;
  min-height: 46px;
  padding: 10px 18px;
  font-family: var(--heading, 'DM Sans', sans-serif);
  font-size: 15px;
  font-weight: 550;
}
.asq-chat-compose-actions .asq-chat-new { min-width: 160px; }

.asq-chat-page .asq-chat-thread-head { min-height: 64px; padding: 12px 20px; }
.asq-chat-page .asq-chat-thread-head h2 { font-size: 18px; }

.asq-chat-side-list { overflow-x: hidden; overflow-y: auto; }
.asq-chat-side-list button.asq-chat-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 14px 16px 14px 13px;
  border: 0;
  border-bottom: 1px solid var(--line, #dce2eb);
  border-left: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  text-align: left;
}
.asq-chat-side-list button.asq-chat-row:hover { background: #fff; }
.asq-chat-side-list button.asq-chat-row.is-active { background: #fff; border-left-color: var(--sky-deep, #1e78b8); }
.asq-chat-row .asq-chat-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.asq-chat-row-top strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink, #15255a);
  font-family: var(--heading, 'DM Sans', sans-serif);
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asq-chat-row-top time { flex: none; color: var(--muted, #59627c); font-size: 12px; }
.asq-chat-row .asq-chat-row-preview { overflow: hidden; color: var(--muted, #59627c); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.asq-chat-row .asq-chat-row-meta { color: var(--sky-deep, #1e78b8); font-size: 12px; font-weight: 600; }

.asq-chat-page .asq-chat-log { gap: 12px; padding: 20px; }
.asq-chat-page .asq-chat-bubble article { max-width: min(70%, 520px); padding: 10px 14px; }
.asq-chat-page .asq-chat-compose:not(.is-wide) { padding: 12px 16px; }
.asq-chat-page .asq-chat-compose:not(.is-wide) .asq-chat-field { min-height: 46px; padding: 11px 16px; border-radius: 23px; font-size: 15px; }
.asq-chat-page .asq-chat-compose-row .asq-chat-photo,
.asq-chat-page .asq-chat-compose-row .asq-chat-send { flex-basis: 46px; width: 46px; height: 46px; }
.asq-chat-guest {
  display: flex;
  min-height: min(72vh, 680px);
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line, #dce2eb);
  border-radius: 22px;
}
.asq-chat-guest .asq-chat-log { max-height: none; }
.asq-chat-drop { outline: 2px dashed var(--sky-deep, #1e78b8); outline-offset: -6px; }
.asq-chat-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (max-width: 760px) {
  .asq-chat-dock { bottom: calc(92px + env(safe-area-inset-bottom)); }
  body:not(:has(.mobile-book)) .asq-chat-dock,
  body:has(.mobile-book.is-hidden) .asq-chat-dock { bottom: calc(16px + env(safe-area-inset-bottom)); }
}

@media (min-width: 800px) {
  .asq-chat-side { width: 300px; flex: none; border-right: 1px solid var(--line, #dce2eb); }
  .asq-chat-inbox.is-open .asq-chat-back { display: none; }
}

@media (max-width: 799px) {
  .asq-chat-inbox.is-open .asq-chat-side { display: none; }
  .asq-chat-inbox:not(.is-open) .asq-chat-main { display: none; }
  .asq-chat-setup { padding: 22px 18px 24px; }
  .asq-chat-compose-actions .asq-chat-new { flex: 1; }
}

.asq-chat-inbox.is-solo { height: auto; min-height: 420px; }
.asq-chat-inbox.is-solo .asq-chat-side { display: none; }
.asq-chat-inbox.is-solo .asq-chat-main { display: flex; }

@media print {
  .asq-chat-dock { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .asq-chat-dock *,
  .asq-chat-page * { animation: none !important; }
}
