:root {
  --ashc-navy-950: #071d31;
  --ashc-navy-900: #0b2943;
  --ashc-navy-800: #103c5c;
  --ashc-teal-700: #047a75;
  --ashc-teal-600: #07958f;
  --ashc-teal-500: #0bb0a7;
  --ashc-teal-100: #daf5f2;
  --ashc-teal-50: #eefaf8;
  --ashc-white: #ffffff;
  --ashc-surface: #f6f9fb;
  --ashc-text: #1f3140;
  --ashc-muted: #697985;
  --ashc-border: #dce7eb;
  --ashc-danger: #a83a32;
  --ashc-danger-soft: #fff5f3;
  --ashc-shadow:
    0 28px 80px rgba(7, 29, 49, 0.22),
    0 8px 24px rgba(7, 29, 49, 0.1);
}

.ashc-root,
.ashc-root *,
.ashc-root *::before,
.ashc-root *::after {
  box-sizing: border-box;
}

.ashc-root {
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 2147482500;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

.ashc-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(7, 29, 49, 0.26);
  backdrop-filter: blur(2px);
}

.ashc-root[data-state="open"] .ashc-backdrop {
  display: block;
  animation: ashc-fade 0.2s ease both;
}

.ashc-launcher {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 22px;
  gap: 12px;
  align-items: center;
  min-width: 244px;
  min-height: 66px;
  padding: 9px 14px 9px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(11, 176, 167, 0.24),
      transparent 38%
    ),
    linear-gradient(
      135deg,
      var(--ashc-navy-950),
      var(--ashc-navy-800)
    );
  color: #ffffff;
  box-shadow:
    0 18px 48px rgba(7, 29, 49, 0.28),
    inset 0 1px rgba(255, 255, 255, 0.08);
  cursor: pointer;
  text-align: left;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.ashc-launcher:hover {
  transform: translateY(-3px);
  box-shadow:
    0 24px 60px rgba(7, 29, 49, 0.34),
    inset 0 1px rgba(255, 255, 255, 0.1);
}

.ashc-launcher-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(
    145deg,
    var(--ashc-teal-600),
    var(--ashc-teal-500)
  );
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.25),
    0 8px 20px rgba(7, 149, 143, 0.28);
}

.ashc-launcher-icon svg {
  width: 25px;
  height: 25px;
  fill: #ffffff;
}

.ashc-presence-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 13px;
  height: 13px;
  border: 3px solid var(--ashc-navy-900);
  border-radius: 50%;
  background: #45d48b;
  box-shadow: 0 0 0 3px rgba(69, 212, 139, 0.16);
}

.ashc-launcher-copy {
  display: block;
  min-width: 0;
}

.ashc-launcher-copy strong {
  display: block;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.ashc-launcher-copy small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 10px;
  line-height: 1.3;
}

.ashc-launcher-arrow {
  color: var(--ashc-teal-100);
  font-size: 18px;
  font-weight: 700;
}

.ashc-panel {
  position: absolute;
  right: 0;
  bottom: 82px;
  display: none;
  width: min(460px, calc(100vw - 36px));
  max-height: min(760px, calc(100vh - 110px));
  overflow: hidden;
  border: 1px solid rgba(220, 231, 235, 0.95);
  border-radius: 28px;
  background: var(--ashc-white);
  box-shadow: var(--ashc-shadow);
}

.ashc-root[data-state="open"] .ashc-panel {
  display: flex;
  flex-direction: column;
  animation: ashc-panel-enter 0.25s ease both;
}

.ashc-root[data-state="open"] .ashc-launcher {
  visibility: hidden;
  pointer-events: none;
}

.ashc-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 23px 22px 21px;
  background:
    radial-gradient(
      circle at 95% 0%,
      rgba(11, 176, 167, 0.23),
      transparent 35%
    ),
    linear-gradient(
      135deg,
      var(--ashc-navy-950),
      var(--ashc-navy-800)
    );
}

.ashc-brand {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.ashc-brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    var(--ashc-teal-600),
    var(--ashc-teal-500)
  );
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.24),
    0 12px 28px rgba(7, 149, 143, 0.24);
}

.ashc-brand-mark svg {
  width: 27px;
  height: 27px;
  fill: #ffffff;
}

.ashc-status {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 5px;
  color: var(--ashc-teal-100);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.55px;
  text-transform: uppercase;
}

.ashc-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #45d48b;
  box-shadow: 0 0 0 3px rgba(69, 212, 139, 0.14);
}

.ashc-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 21px;
  font-weight: 850;
  letter-spacing: -0.35px;
  line-height: 1.2;
}

.ashc-header p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.4;
}

.ashc-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  cursor: pointer;
  font: 300 25px/1 Arial, sans-serif;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.ashc-close:hover {
  transform: rotate(3deg);
  background: rgba(255, 255, 255, 0.13);
}

.ashc-safety {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 10px 17px;
  border-bottom: 1px solid #f0d7d3;
  background: var(--ashc-danger-soft);
  color: #85423c;
  font-size: 10px;
  line-height: 1.45;
}

.ashc-safety svg {
  width: 18px;
  height: 18px;
  fill: #b65c53;
}

.ashc-messages {
  flex: 1 1 auto;
  min-height: 230px;
  overflow-y: auto;
  padding: 20px 18px 13px;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(7, 149, 143, 0.065),
      transparent 30%
    ),
    var(--ashc-surface);
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 60, 92, 0.24) transparent;
}

.ashc-messages::-webkit-scrollbar,
.ashc-actions::-webkit-scrollbar {
  width: 7px;
}

.ashc-messages::-webkit-scrollbar-thumb,
.ashc-actions::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(16, 60, 92, 0.22);
}

.ashc-message {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 13px;
}

.ashc-message--user {
  justify-content: flex-end;
}

.ashc-message-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: linear-gradient(
    145deg,
    var(--ashc-teal-600),
    var(--ashc-teal-500)
  );
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
}

.ashc-bubble {
  max-width: 84%;
  padding: 12px 14px;
  border-radius: 17px;
  font-size: 12.5px;
  line-height: 1.58;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ashc-message--assistant .ashc-bubble {
  border: 1px solid var(--ashc-border);
  border-bottom-left-radius: 6px;
  background: #ffffff;
  color: var(--ashc-text);
  box-shadow: 0 8px 20px rgba(16, 60, 92, 0.055);
}

.ashc-message--user .ashc-bubble {
  border-bottom-right-radius: 6px;
  background: linear-gradient(
    145deg,
    var(--ashc-navy-900),
    var(--ashc-navy-800)
  );
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(7, 29, 49, 0.15);
}

.ashc-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-height: 240px;
  overflow-y: auto;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--ashc-border);
  background: #ffffff;
  scrollbar-width: thin;
}

.ashc-actions:empty {
  display: none;
}

.ashc-action {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 14px;
  gap: 9px;
  align-items: center;
  min-width: 0;
  min-height: 67px;
  padding: 10px;
  border: 1px solid var(--ashc-border);
  border-radius: 16px;
  background: #ffffff;
  color: var(--ashc-text);
  cursor: pointer;
  text-align: left;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.ashc-action:hover {
  transform: translateY(-2px);
  border-color: rgba(7, 149, 143, 0.42);
  background: var(--ashc-teal-50);
  box-shadow: 0 10px 26px rgba(7, 149, 143, 0.09);
}

.ashc-action--wide {
  grid-column: 1 / -1;
}

.ashc-action--primary {
  border-color: transparent;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(255, 255, 255, 0.14),
      transparent 34%
    ),
    linear-gradient(
      135deg,
      var(--ashc-teal-700),
      var(--ashc-teal-500)
    );
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(7, 149, 143, 0.2);
}

.ashc-action--primary:hover {
  border-color: transparent;
  background: linear-gradient(
    135deg,
    var(--ashc-teal-700),
    var(--ashc-teal-600)
  );
  box-shadow: 0 15px 32px rgba(7, 149, 143, 0.28);
}

.ashc-action--danger {
  border-color: #efd2ce;
  background: var(--ashc-danger-soft);
  color: #8b3c35;
}

.ashc-action-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--ashc-teal-50);
  color: var(--ashc-teal-700);
  font-size: 10px;
  font-weight: 900;
}

.ashc-action--primary .ashc-action-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.ashc-action--danger .ashc-action-icon {
  background: #fbe5e2;
  color: var(--ashc-danger);
}

.ashc-action-copy {
  min-width: 0;
}

.ashc-action-copy strong {
  display: block;
  color: inherit;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
}

.ashc-action-copy small {
  display: block;
  margin-top: 3px;
  color: var(--ashc-muted);
  font-size: 8.8px;
  line-height: 1.35;
}

.ashc-action--primary .ashc-action-copy small {
  color: rgba(255, 255, 255, 0.7);
}

.ashc-action--danger .ashc-action-copy small {
  color: #a66a65;
}

.ashc-action-arrow {
  color: #8aa0ad;
  font-size: 18px;
}

.ashc-action--primary .ashc-action-arrow {
  color: rgba(255, 255, 255, 0.75);
}

.ashc-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 45px;
  gap: 9px;
  padding: 13px 16px;
  border-top: 1px solid var(--ashc-border);
  background: #ffffff;
}

.ashc-input-row[hidden] {
  display: none !important;
}

.ashc-input-row input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--ashc-border);
  border-radius: 15px;
  outline: 0;
  background: #f9fbfc;
  color: var(--ashc-text);
  font: 400 13px/1.4 inherit;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.ashc-input-row input:focus {
  border-color: var(--ashc-teal-600);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(7, 149, 143, 0.1);
}

.ashc-input-row button {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  padding: 0;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(
    145deg,
    var(--ashc-teal-700),
    var(--ashc-teal-500)
  );
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 9px 20px rgba(7, 149, 143, 0.2);
}

.ashc-input-row button svg {
  width: 21px;
  height: 21px;
  fill: #ffffff;
}

.ashc-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--ashc-border);
  background: #ffffff;
}

.ashc-footer button {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ashc-teal-700);
  cursor: pointer;
  font: 800 10px/1.4 inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ashc-footer span {
  color: var(--ashc-muted);
  font-size: 9px;
  line-height: 1.35;
  text-align: right;
}

.ashc-loading {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-height: 16px;
}

.ashc-loading i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ashc-teal-600);
  animation: ashc-dot 1s infinite ease-in-out;
}

.ashc-loading i:nth-child(2) {
  animation-delay: 0.14s;
}

.ashc-loading i:nth-child(3) {
  animation-delay: 0.28s;
}

.ashc-prefill-notice {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 2147482600;
  width: min(590px, calc(100vw - 28px));
  padding: 15px 18px;
  border: 1px solid rgba(7, 149, 143, 0.22);
  border-radius: 17px;
  background: #ffffff;
  color: var(--ashc-navy-900);
  box-shadow: 0 20px 60px rgba(7, 29, 49, 0.22);
  font: 700 12px/1.55 inherit;
  transform: translateX(-50%);
}

.ashc-root button:focus-visible,
.ashc-root input:focus-visible {
  outline: 3px solid rgba(7, 149, 143, 0.3);
  outline-offset: 3px;
}

@keyframes ashc-panel-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.975);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ashc-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes ashc-dot {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@media (max-width: 540px) {
  body.ashc-chat-open {
    overflow: hidden;
  }

  .ashc-root {
    right: 12px;
    bottom: 12px;
  }

  .ashc-launcher {
    grid-template-columns: 46px 1fr;
    min-width: 0;
    width: 176px;
    min-height: 60px;
    border-radius: 20px;
  }

  .ashc-launcher-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .ashc-launcher-copy small,
  .ashc-launcher-arrow {
    display: none;
  }

  .ashc-panel {
    position: fixed;
    inset: 9px;
    width: auto;
    max-height: none;
    border-radius: 24px;
  }

  .ashc-header {
    padding: 19px 17px 18px;
  }

  .ashc-brand {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .ashc-brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .ashc-header h2 {
    font-size: 18px;
  }

  .ashc-actions {
    grid-template-columns: 1fr;
    max-height: 255px;
  }

  .ashc-action--wide {
    grid-column: auto;
  }

  .ashc-messages {
    min-height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ashc-root *,
  .ashc-root *::before,
  .ashc-root *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   RESPONSIVE STABILITY PATCH — VERSION 1.2.1
   CSS only. Chatbot workflow and functionality are unchanged.
========================================================= */

/*
 * Give the flex layout a real available height. In version 1.2 the panel
 * only had max-height, allowing long conversations to compress the action
 * cards near the footer.
 */
.ashc-panel {
  height: min(760px, calc(100vh - 126px));
  height: min(760px, calc(100dvh - 126px));
  max-height: none;
  min-height: 430px;
}

/* Fixed sections must not shrink. */
.ashc-header,
.ashc-safety,
.ashc-input-row,
.ashc-footer {
  flex: 0 0 auto;
}

/*
 * The conversation receives the remaining space and scrolls internally.
 * Removing the previous 230px minimum prevents buttons from being clipped.
 */
.ashc-messages {
  flex: 1 1 0;
  min-height: 0;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

/*
 * Action cards retain their natural height. Long service menus scroll
 * independently, while two-button consent screens remain fully visible.
 */
.ashc-actions {
  flex: 0 0 auto;
  min-height: 0;
  max-height: min(240px, 32vh);
  max-height: min(240px, 32dvh);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

/* Prevent long labels or user content from forcing horizontal overflow. */
.ashc-brand,
.ashc-brand > div,
.ashc-launcher-copy,
.ashc-action-copy,
.ashc-bubble,
.ashc-footer span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ashc-action {
  width: 100%;
}

.ashc-action-copy strong,
.ashc-action-copy small {
  overflow-wrap: anywhere;
}

/* Laptop and tablet widths. */
@media (max-width: 1100px) {
  .ashc-root {
    right: 16px;
    bottom: 16px;
  }

  .ashc-panel {
    bottom: 78px;
    width: min(450px, calc(100vw - 32px));
    height: min(730px, calc(100vh - 110px));
    height: min(730px, calc(100dvh - 110px));
  }
}

/* Tablet portrait and narrow desktop windows. */
@media (min-width: 541px) and (max-width: 820px) {
  .ashc-root {
    right: 14px;
    bottom: 14px;
  }

  .ashc-panel {
    bottom: 76px;
    width: min(440px, calc(100vw - 28px));
    height: min(710px, calc(100vh - 104px));
    height: min(710px, calc(100dvh - 104px));
    min-height: 400px;
    border-radius: 25px;
  }

  .ashc-header {
    padding: 20px 18px 18px;
  }

  .ashc-actions {
    max-height: min(230px, 34vh);
    max-height: min(230px, 34dvh);
  }
}

/* Short laptop screens and landscape tablets/phones. */
@media (max-height: 720px) and (min-width: 541px) {
  .ashc-root {
    right: 10px;
    bottom: 10px;
  }

  .ashc-panel {
    position: fixed;
    top: 8px;
    right: 8px;
    bottom: 8px;
    width: min(450px, calc(100vw - 16px));
    height: auto;
    min-height: 0;
    max-height: none;
    border-radius: 22px;
  }

  .ashc-header {
    padding: 14px 15px 13px;
  }

  .ashc-brand {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
  }

  .ashc-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .ashc-brand-mark svg {
    width: 23px;
    height: 23px;
  }

  .ashc-status {
    margin-bottom: 3px;
    font-size: 8.5px;
  }

  .ashc-header h2 {
    font-size: 18px;
  }

  .ashc-header p {
    font-size: 10px;
  }

  .ashc-close {
    width: 34px;
    height: 34px;
  }

  .ashc-safety {
    padding: 7px 13px;
    font-size: 9px;
  }

  .ashc-messages {
    padding: 13px 14px 8px;
  }

  .ashc-message {
    margin-bottom: 9px;
  }

  .ashc-bubble {
    padding: 9px 11px;
    font-size: 11.5px;
    line-height: 1.48;
  }

  .ashc-actions {
    max-height: min(205px, 35vh);
    max-height: min(205px, 35dvh);
    padding: 9px 12px 11px;
  }

  .ashc-action {
    min-height: 56px;
    padding: 8px;
  }

  .ashc-footer {
    padding: 7px 13px 8px;
  }
}

/* Phones: use the complete safe viewport instead of a calculated popup. */
@media (max-width: 540px) {
  .ashc-root {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .ashc-panel {
    position: fixed;
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    width: auto;
    height: auto;
    min-height: 0;
    max-height: none;
    border-radius: 23px;
  }

  .ashc-header {
    padding: 17px 15px 15px;
  }

  .ashc-safety {
    padding: 8px 13px;
  }

  .ashc-messages {
    min-height: 0;
    padding: 15px 13px 9px;
  }

  .ashc-bubble {
    max-width: calc(100% - 37px);
  }

  .ashc-actions {
    grid-template-columns: 1fr;
    max-height: min(285px, 38vh);
    max-height: min(285px, 38dvh);
    padding: 10px 12px 12px;
  }

  .ashc-action--wide {
    grid-column: auto;
  }

  .ashc-input-row {
    padding: 10px 12px;
  }

  .ashc-footer {
    padding: 8px 12px 10px;
  }
}

/* Very small phones. */
@media (max-width: 380px) {
  .ashc-launcher {
    grid-template-columns: 44px minmax(0, 1fr);
    width: 166px;
    min-height: 58px;
    padding: 7px 10px 7px 7px;
  }

  .ashc-launcher-icon {
    width: 44px;
    height: 44px;
  }

  .ashc-panel {
    top: max(5px, env(safe-area-inset-top));
    right: max(5px, env(safe-area-inset-right));
    bottom: max(5px, env(safe-area-inset-bottom));
    left: max(5px, env(safe-area-inset-left));
    border-radius: 20px;
  }

  .ashc-brand {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 9px;
  }

  .ashc-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .ashc-header h2 {
    font-size: 17px;
  }

  .ashc-header p {
    font-size: 9.5px;
  }

  .ashc-safety {
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 7px;
    font-size: 8.8px;
  }

  .ashc-safety svg {
    width: 16px;
    height: 16px;
  }

  .ashc-message-avatar {
    flex-basis: 25px;
    width: 25px;
    height: 25px;
  }

  .ashc-bubble {
    max-width: calc(100% - 33px);
    padding: 10px 11px;
    font-size: 11.5px;
  }

  .ashc-action {
    grid-template-columns: 33px minmax(0, 1fr) 12px;
    min-height: 60px;
  }

  .ashc-action-icon {
    width: 33px;
    height: 33px;
  }

  .ashc-footer span {
    max-width: 180px;
    font-size: 8.3px;
  }
}

/* Mobile landscape and extremely short browser windows. */
@media (max-width: 900px) and (max-height: 500px) {
  .ashc-panel {
    position: fixed;
    top: max(4px, env(safe-area-inset-top));
    right: max(4px, env(safe-area-inset-right));
    bottom: max(4px, env(safe-area-inset-bottom));
    left: auto;
    width: min(460px, calc(100vw - 8px));
    height: auto;
    min-height: 0;
    border-radius: 18px;
  }

  .ashc-header {
    padding: 10px 12px 9px;
  }

  .ashc-brand {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
  }

  .ashc-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .ashc-brand-mark svg {
    width: 20px;
    height: 20px;
  }

  .ashc-status,
  .ashc-header p {
    display: none;
  }

  .ashc-header h2 {
    font-size: 16px;
  }

  .ashc-close {
    width: 31px;
    height: 31px;
    border-radius: 10px;
  }

  .ashc-safety {
    padding: 5px 10px;
    font-size: 8px;
  }

  .ashc-messages {
    padding: 9px 11px 5px;
  }

  .ashc-message {
    margin-bottom: 7px;
  }

  .ashc-bubble {
    padding: 7px 9px;
    font-size: 10.5px;
    line-height: 1.42;
  }

  .ashc-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(170px, 39vh);
    max-height: min(170px, 39dvh);
    padding: 7px 9px 8px;
  }

  .ashc-action--wide {
    grid-column: 1 / -1;
  }

  .ashc-action {
    min-height: 48px;
    border-radius: 12px;
  }

  .ashc-action-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .ashc-input-row {
    grid-template-columns: minmax(0, 1fr) 39px;
    padding: 7px 9px;
  }

  .ashc-input-row input {
    min-height: 39px;
  }

  .ashc-input-row button {
    width: 39px;
    height: 39px;
  }

  .ashc-footer {
    padding: 5px 10px 6px;
  }
}

/* Browser zoom and narrow embedded windows. */
@media (max-width: 320px) {
  .ashc-launcher {
    grid-template-columns: 44px;
    width: 58px;
    min-width: 58px;
    padding: 7px;
  }

  .ashc-launcher-copy,
  .ashc-launcher-arrow {
    display: none;
  }

  .ashc-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .ashc-footer span {
    max-width: none;
    text-align: left;
  }
}

/* =========================================================
   WELCOME ANIMATION + HEADER ICON ALIGNMENT — VERSION 1.2.2
   Visual changes only. Functionality remains unchanged.
========================================================= */

/* The header plus was optically a little high inside its teal square. */
.ashc-brand-mark svg {
  transform: translateY(1.5px);
  transform-origin: center;
}

/*
 * Animate only the two initial welcome messages whenever the chatbot
 * changes from closed to open.
 */
.ashc-root.ashc-animate-welcome
.ashc-messages
> .ashc-message:nth-child(1) {
  opacity: 0;
  animation: ashc-welcome-message 0.48s
    cubic-bezier(0.22, 1, 0.36, 1) 0.08s forwards;
}

.ashc-root.ashc-animate-welcome
.ashc-messages
> .ashc-message:nth-child(2) {
  opacity: 0;
  animation: ashc-welcome-message 0.48s
    cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
}

/* Add a small secondary reveal to the bubble for a more natural feel. */
.ashc-root.ashc-animate-welcome
.ashc-messages
> .ashc-message:nth-child(1)
.ashc-bubble,
.ashc-root.ashc-animate-welcome
.ashc-messages
> .ashc-message:nth-child(2)
.ashc-bubble {
  transform-origin: left bottom;
  animation: ashc-welcome-bubble 0.5s
    cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ashc-root.ashc-animate-welcome
.ashc-messages
> .ashc-message:nth-child(2)
.ashc-bubble {
  animation-delay: 0.17s;
}

@keyframes ashc-welcome-message {
  from {
    opacity: 0;
    transform: translate3d(-12px, 10px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes ashc-welcome-bubble {
  from {
    opacity: 0.78;
    transform: scale(0.965);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Respect the existing reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
  .ashc-root[data-state="open"]
  .ashc-messages
  > .ashc-message:nth-child(1),
  .ashc-root[data-state="open"]
  .ashc-messages
  > .ashc-message:nth-child(2),
  .ashc-root[data-state="open"]
  .ashc-messages
  > .ashc-message:nth-child(1)
  .ashc-bubble,
  .ashc-root[data-state="open"]
  .ashc-messages
  > .ashc-message:nth-child(2)
  .ashc-bubble {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}

/* =========================================================
   LONG ACTION TEXT RESPONSIVENESS — VERSION 1.2.4
   Presentation only. No chatbot workflow changes.
========================================================= */

/*
 * Program names and contact details need more horizontal space than the
 * normal service cards. Only these two action groups use one full-width
 * card per row. The main service menu keeps its existing two-column design.
 */
.ashc-actions[data-layout="programs"],
.ashc-actions[data-layout="contact"] {
  grid-template-columns: minmax(0, 1fr);
}

/*
 * Keep the full-width cards compact while allowing their text to wrap at
 * natural word boundaries instead of splitting words or email domains.
 */
.ashc-actions[data-layout="programs"] .ashc-action,
.ashc-actions[data-layout="contact"] .ashc-action {
  grid-column: auto;
  grid-template-columns: 38px minmax(0, 1fr) 14px;
  min-height: 60px;
  padding: 10px 12px;
}

.ashc-actions[data-layout="programs"] .ashc-action-copy,
.ashc-actions[data-layout="contact"] .ashc-action-copy {
  min-width: 0;
  overflow: hidden;
}

.ashc-actions[data-layout="programs"] .ashc-action-copy strong,
.ashc-actions[data-layout="programs"] .ashc-action-copy small,
.ashc-actions[data-layout="contact"] .ashc-action-copy strong,
.ashc-actions[data-layout="contact"] .ashc-action-copy small {
  max-width: 100%;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}

.ashc-actions[data-layout="programs"] .ashc-action-copy strong,
.ashc-actions[data-layout="contact"] .ashc-action-copy strong {
  font-size: 11px;
  line-height: 1.3;
}

.ashc-actions[data-layout="programs"] .ashc-action-copy small,
.ashc-actions[data-layout="contact"] .ashc-action-copy small {
  margin-top: 2px;
  font-size: 8.8px;
  line-height: 1.3;
}

/* Give these lists enough visible room without affecting other menus. */
.ashc-actions[data-layout="programs"] {
  max-height: min(300px, 39vh);
  max-height: min(300px, 39dvh);
}

.ashc-actions[data-layout="contact"] {
  max-height: min(280px, 37vh);
  max-height: min(280px, 37dvh);
}

/* Tablet and short laptop refinement. */
@media (max-width: 820px), (max-height: 720px) {
  .ashc-actions[data-layout="programs"],
  .ashc-actions[data-layout="contact"] {
    max-height: min(270px, 38vh);
    max-height: min(270px, 38dvh);
  }

  .ashc-actions[data-layout="programs"] .ashc-action,
  .ashc-actions[data-layout="contact"] .ashc-action {
    grid-template-columns: 36px minmax(0, 1fr) 13px;
    min-height: 58px;
    padding: 9px 11px;
  }
}

/* Phones already use a single column; retain clean natural wrapping. */
@media (max-width: 540px) {
  .ashc-actions[data-layout="programs"],
  .ashc-actions[data-layout="contact"] {
    max-height: min(315px, 42vh);
    max-height: min(315px, 42dvh);
  }

  .ashc-actions[data-layout="programs"] .ashc-action,
  .ashc-actions[data-layout="contact"] .ashc-action {
    grid-template-columns: 36px minmax(0, 1fr) 13px;
    min-height: 58px;
  }
}

/* Very narrow phones: preserve complete words and usable card spacing. */
@media (max-width: 380px) {
  .ashc-actions[data-layout="programs"] .ashc-action,
  .ashc-actions[data-layout="contact"] .ashc-action {
    grid-template-columns: 33px minmax(0, 1fr) 12px;
    gap: 8px;
    padding: 9px;
  }

  .ashc-actions[data-layout="programs"] .ashc-action-copy strong,
  .ashc-actions[data-layout="contact"] .ashc-action-copy strong {
    font-size: 10.5px;
  }

  .ashc-actions[data-layout="programs"] .ashc-action-copy small,
  .ashc-actions[data-layout="contact"] .ashc-action-copy small {
    font-size: 8.4px;
  }
}

