.mighty-chat-widget {
  --chat-accent: #f29848;
  --chat-orange: #f29848;
  --chat-cream: #fff4e7;
  --chat-muted: #c4b9ac;
  --chat-bg: #202124;
  --chat-head: #292a2d;
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: calc(64px + env(safe-area-inset-bottom));
  z-index: 100;
  display: grid;
  justify-items: end;
  font-family: Montserrat, Arial, sans-serif;
  color: var(--chat-cream);
}
.mighty-chat-launcher {
  position: relative;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 244, 231, 0.34);
  border-radius: 50%;
  background: var(--chat-accent);
  color: #18191b;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}
.mighty-chat-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.46);
}
.mighty-chat-launcher svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mighty-chat-launcher-badge {
  position: absolute;
  top: -3px;
  right: -1px;
  min-width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  padding: 0 0.28rem;
  border: 2px solid #202124;
  border-radius: 99px;
  background: #dc4e3d;
  color: #fff;
  font:
    700 0.62rem/1 Montserrat,
    Arial,
    sans-serif;
}
.mighty-chat-launcher-badge[hidden] {
  display: none;
}
.mighty-chat-panel {
  position: absolute;
  right: 0;
  bottom: 82px;
  width: min(390px, calc(100vw - 32px));
  height: min(660px, calc(100dvh - 168px));
  min-height: 390px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  overflow: hidden;
  border: 1px solid rgba(255, 244, 231, 0.2);
  border-radius: 1.05rem;
  background: rgba(31, 32, 35, 0.97);
  color: var(--chat-cream);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(22px);
  animation: chatOpen 0.24s ease-out;
}
.mighty-chat-panel[hidden] {
  display: none !important;
}
@keyframes chatOpen {
  from {
    opacity: 0.15;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.mighty-chat-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 72px;
  padding: 0.72rem 0.95rem;
  border-bottom: 1px solid rgba(255, 244, 231, 0.13);
  background: var(--chat-head);
}
.mighty-chat-avatar {
  position: relative;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(242, 152, 72, 0.8);
  border-radius: 50%;
  background: #393a3d;
  color: var(--chat-accent);
  font-size: 0.76rem;
  font-weight: 750;
}
.mighty-chat-avatar img,
.mighty-chat-staff-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mighty-chat-avatar-fallback[hidden] {
  display: none;
}
.mighty-chat-header-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 0.45rem;
  row-gap: 0.04rem;
}
.mighty-chat-header h2 {
  grid-column: 1/-1;
  margin: 0;
  color: #fff8ef;
  font-size: 0.82rem;
  letter-spacing: 0;
}
.mighty-chat-header-copy > p {
  margin: 0;
  color: #e2d4c4;
  font-size: 0.64rem;
}
.mighty-chat-online {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  color: #b8dfc3;
  font-size: 0.6rem;
}
.mighty-chat-online i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #62c585;
  box-shadow: 0 0 0 3px rgba(98, 197, 133, 0.13);
}
.mighty-chat-close {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--chat-cream);
  font-size: 1.38rem;
  line-height: 1;
  cursor: pointer;
}
.mighty-chat-close:hover,
.mighty-chat-handoff-close:hover {
  background: rgba(255, 255, 255, 0.08);
}
.mighty-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
  min-height: 0;
  overflow-y: auto;
  padding: 0.85rem 0.85rem 0.72rem;
  overscroll-behavior: contain;
  overflow-anchor: none;
  scroll-behavior: auto;
  scrollbar-color: rgba(242, 152, 72, 0.35) transparent;
}
.mighty-chat-message {
  flex-shrink: 0;
  max-width: 88%;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}
.mighty-chat-message.is-assistant {
  align-self: flex-start;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  align-items: end;
  column-gap: 0.4rem;
  max-width: 94%;
}
.mighty-chat-message.is-user {
  align-self: flex-end;
  max-width: 82%;
}
.mighty-chat-message-copy {
  min-width: 0;
  display: grid;
  gap: 0.22rem;
}
.mighty-chat-message.is-user .mighty-chat-message-copy {
  justify-items: end;
}
.mighty-chat-speaker {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0 0.05rem;
  color: #c8c0b6;
  font-size: 0.57rem;
  font-weight: 650;
  line-height: 1.25;
}
.mighty-chat-message.is-user .mighty-chat-speaker {
  justify-content: flex-end;
  color: #d8cbbc;
}
.mighty-chat-speaker small {
  color: #aaa198;
  font-size: 0.52rem;
  font-weight: 450;
}
.mighty-chat-bubble {
  width: fit-content;
  max-width: 100%;
  padding: 0.54rem 0.66rem;
  border: 1px solid rgba(255, 244, 231, 0.055);
  border-radius: 0.78rem 0.78rem 0.78rem 0.25rem;
  background: #35363a;
}
.mighty-chat-message.is-user .mighty-chat-bubble {
  border-color: rgba(255, 244, 231, 0.06);
  border-radius: 0.78rem 0.25rem 0.78rem 0.78rem;
  background: #45464a;
}
.mighty-chat-bubble p {
  margin: 0;
  color: #fff6eb;
  font-size: 0.69rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.mighty-chat-attachment {
  display: block;
  width: min(240px, 100%);
  max-height: 190px;
  margin: 0 0 0.35rem;
  border-radius: 0.48rem;
  object-fit: contain;
  background: #191a1c;
}
.mighty-chat-status {
  min-height: 0.85rem;
  margin: 0;
  padding: 0 0.88rem;
  color: #c0b6a9;
  font-size: 0.58rem;
  line-height: 1.35;
}
.mighty-chat-status:empty {
  min-height: 0.28rem;
}
.mighty-chat-handoff {
  max-height: 46%;
  overflow: auto;
  margin: 0 0.65rem 0.45rem;
  padding: 0.62rem;
  border: 1px solid rgba(242, 152, 72, 0.34);
  border-radius: 0.68rem;
  background: rgba(242, 152, 72, 0.07);
}
.mighty-chat-handoff[hidden] {
  display: none !important;
}
.mighty-chat-handoff-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.42rem;
}
.mighty-chat-handoff-heading strong {
  font-size: 0.68rem;
}
.mighty-chat-handoff-heading p {
  margin: 0.18rem 0 0;
  color: var(--chat-muted);
  font-size: 0.58rem;
  line-height: 1.4;
}
.mighty-chat-handoff-close {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--chat-cream);
  font-size: 1.05rem;
  cursor: pointer;
}
.mighty-chat-staff-list {
  display: flex;
  gap: 0.4rem;
  max-width: 100%;
  overflow-x: auto;
  margin: 0 0 0.45rem;
  padding-bottom: 0.12rem;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(242, 152, 72, 0.4) transparent;
}
.mighty-chat-staff:only-child {
  min-width: min(100%, 180px);
}
.mighty-chat-staff {
  min-width: 138px;
  max-width: 180px;
  display: flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.36rem 0.44rem;
  border: 1px solid rgba(255, 244, 231, 0.13);
  border-radius: 0.58rem;
  background: rgba(255, 255, 255, 0.035);
  color: var(--chat-cream);
  text-align: left;
  cursor: pointer;
}
.mighty-chat-staff:hover,
.mighty-chat-staff.is-selected {
  border-color: rgba(242, 152, 72, 0.72);
  background: rgba(242, 152, 72, 0.12);
}
.mighty-chat-staff-avatar {
  position: relative;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #3d3b38;
  color: #fff4e7;
  font-size: 0.53rem;
  font-weight: 700;
}
.mighty-chat-staff > span:last-child {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
}
.mighty-chat-staff strong,
.mighty-chat-staff small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mighty-chat-staff strong {
  font-size: 0.57rem;
}
.mighty-chat-staff small {
  color: #bcb4aa;
  font-size: 0.5rem;
}
.mighty-chat-handoff-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.38rem;
}
.mighty-chat-handoff-form[hidden] {
  display: none !important;
}
.mighty-chat-handoff-form label {
  display: grid;
  gap: 0.2rem;
  color: #d9d0c5;
  font-size: 0.54rem;
}
.mighty-chat-handoff-form label:nth-of-type(3),
.mighty-chat-handoff-form > button,
.mighty-chat-handoff-status {
  grid-column: 1/-1;
}
.mighty-chat-handoff-form input,
.mighty-chat-handoff-form textarea {
  width: 100%;
  min-width: 0;
  padding: 0.43rem 0.5rem;
  border: 1px solid rgba(255, 244, 231, 0.16);
  border-radius: 0.42rem;
  background: rgba(15, 16, 18, 0.72);
  color: #fff4e7;
  font:
    500 0.62rem Montserrat,
    Arial,
    sans-serif;
}
.mighty-chat-handoff-form textarea {
  resize: vertical;
  max-height: 62px;
}
.mighty-chat-handoff-form > button {
  justify-self: start;
  padding: 0.46rem 0.72rem;
  border: 0;
  border-radius: 0.45rem;
  background: var(--chat-accent);
  color: #171719;
  font:
    700 0.6rem Montserrat,
    Arial,
    sans-serif;
  cursor: pointer;
}
.mighty-chat-handoff-form > button:disabled {
  opacity: 0.55;
}
.mighty-chat-handoff-status {
  margin: 0;
  color: #f5e5c4;
  font-size: 0.58rem;
  line-height: 1.45;
}
.mighty-chat-handoff-status.is-success {
  color: #b8e2c7;
}
.mighty-chat-footer {
  padding: 0 0.68rem max(0.58rem, env(safe-area-inset-bottom));
  background: rgba(32, 33, 36, 0.97);
}
.mighty-chat-footer-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.48rem;
  padding: 0.42rem 0.08rem 0.48rem;
  border-bottom: 1px solid rgba(255, 244, 231, 0.13);
}
.mighty-chat-footer-links button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--chat-accent);
  font:
    650 0.59rem Montserrat,
    Arial,
    sans-serif;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.mighty-chat-form {
  margin: 0;
}
.mighty-chat-image-preview {
  position: relative;
  width: 68px;
  height: 52px;
  margin: 0 0 0.35rem 2.55rem;
}
.mighty-chat-image-preview[hidden] {
  display: none !important;
}
.mighty-chat-image-preview img {
  width: 100%;
  height: 100%;
  border-radius: 0.38rem;
  object-fit: cover;
}
.mighty-chat-image-preview button {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  border: 1px solid #202124;
  border-radius: 50%;
  background: var(--chat-accent);
  color: #171719;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}
.mighty-chat-compose {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
}
.mighty-chat-tools {
  display: flex;
  align-items: center;
  justify-content: center;
}
.mighty-chat-attach {
  width: 30px;
  height: 32px;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--chat-cream);
  font:
    300 1.55rem/1 Montserrat,
    Arial,
    sans-serif;
  cursor: pointer;
}
.mighty-chat-attach:hover {
  background: rgba(255, 255, 255, 0.08);
}
.mighty-chat-compose textarea {
  width: 100%;
  min-height: 38px;
  max-height: 92px;
  resize: vertical;
  padding: 0.55rem 0.6rem;
  border: 1px solid rgba(255, 244, 231, 0.58);
  border-radius: 0.48rem;
  outline: 0;
  background: #28292c;
  color: var(--chat-cream);
  font:
    400 0.68rem/1.35 Montserrat,
    Arial,
    sans-serif;
}
.mighty-chat-compose textarea::placeholder {
  color: #b6aca1;
}
.mighty-chat-compose textarea:focus {
  border-color: var(--chat-accent);
  box-shadow: 0 0 0 2px rgba(242, 152, 72, 0.18);
}
.mighty-chat-send {
  min-width: 54px;
  min-height: 36px;
  padding: 0.45rem 0.67rem;
  border: 0;
  border-radius: 0.48rem;
  background: var(--chat-accent);
  color: #18191b;
  font:
    700 0.62rem Montserrat,
    Arial,
    sans-serif;
  cursor: pointer;
}
.mighty-chat-send:disabled {
  opacity: 0.55;
  cursor: wait;
}
.mighty-chat-panel :focus-visible,
.mighty-chat-launcher:focus-visible {
  outline: 2px solid #f6ae6c;
  outline-offset: 3px;
}
@media (max-width: 560px) {
  .mighty-chat-widget {
    right: max(0px, env(safe-area-inset-right));
    bottom: calc(52px + env(safe-area-inset-bottom));
  }
  .mighty-chat-launcher {
    width: 60px;
    height: 60px;
    margin: 0 12px 12px 0;
  }
  .mighty-chat-launcher svg {
    width: 27px;
    height: 27px;
  }
  .mighty-chat-panel {
    position: fixed;
    inset: max(3px, env(safe-area-inset-top)) max(3px, env(safe-area-inset-right))
      max(3px, env(safe-area-inset-bottom)) max(3px, env(safe-area-inset-left));
    width: auto;
    height: auto;
    min-height: 0;
    border-radius: 0.5rem;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  }
  .mighty-chat-header {
    min-height: 62px;
    padding: 0.58rem 0.7rem;
  }
  .mighty-chat-avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
  .mighty-chat-messages {
    gap: 0.68rem;
    padding: 0.72rem 0.58rem;
  }
  .mighty-chat-footer {
    padding: 0 0.48rem max(0.5rem, env(safe-area-inset-bottom));
  }
  .mighty-chat-handoff {
    max-height: 43vh;
    grid-row: 4;
  }
  .mighty-chat-footer-links {
    margin-bottom: 0.38rem;
    padding-top: 0.38rem;
    padding-bottom: 0.42rem;
  }
  .mighty-chat-compose {
    grid-template-columns: 29px minmax(0, 1fr) auto;
    gap: 0.38rem;
  }
  .mighty-chat-compose textarea {
    min-height: 37px;
    padding: 0.5rem 0.55rem;
  }
  .mighty-chat-send {
    min-width: 51px;
    min-height: 34px;
    padding: 0.4rem 0.58rem;
  }
  .mighty-chat-handoff-form {
    grid-template-columns: 1fr;
  }
  .mighty-chat-handoff-form label:nth-of-type(3),
  .mighty-chat-handoff-form > button,
  .mighty-chat-handoff-status {
    grid-column: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mighty-chat-panel {
    animation: none;
  }
  .mighty-chat-launcher {
    transition: none;
  }
}
.mighty-chat-message.is-human {
  align-self: flex-start;
  max-width: 94%;
}
.mighty-chat-message.is-human .mighty-chat-bubble {
  border-color: rgba(242, 152, 72, 0.22);
  background: #303033;
}
.mighty-chat-message.is-human .mighty-chat-speaker {
  color: #f3b67e;
}
.mighty-chat-inline-link {
  color: #ffc18b;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.mighty-chat-profile-avatar {
  position: relative;
  display: block;
  flex: 0 0 43px;
  width: 43px;
  height: 43px;
  overflow: visible;
}
.mighty-chat-profile-avatar > .mighty-chat-avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  flex: initial;
}
.mighty-chat-profile-presence {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--chat-head);
  border-radius: 50%;
  background: #62c585;
}
.mighty-chat-header-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
}
.mighty-chat-header h2 {
  margin: 0;
  color: #fff8ef;
  font-size: 0.84rem;
  line-height: 1.15;
}
.mighty-chat-header-copy > p {
  margin: 0;
  color: var(--chat-accent);
  font-size: 0.64rem;
  line-height: 1.2;
}
.mighty-chat-online {
  display: block;
  margin-top: 0;
  color: #62c585;
  font-size: 0.61rem;
  line-height: 1.2;
}
.mighty-chat-status:not(:empty) {
  color: #e0c8ae;
}
.mighty-chat-status.is-typing {
  color: #f3bb88;
}
@media (max-width: 560px) {
  .mighty-chat-profile-avatar {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }
}

/* Brand-colored chat launcher with a glass assistance prompt. */
.mighty-chat-launcher {
  background: #cf823f;
  border-color: rgba(255, 244, 231, 0.22);
  color: #111;
}
.mighty-chat-launcher svg {
  display: none;
}
.mighty-chat-icon {
  width: 44px;
  height: 40px;
  display: grid;
  place-items: center;
}
.mighty-chat-icon-bubble {
  position: relative;
  width: 40px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 50%;
  background: #050505;
}
.mighty-chat-icon-bubble::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: -3px;
  width: 13px;
  height: 13px;
  background: #050505;
  clip-path: polygon(100% 0, 0 100%, 74% 80%);
}
.mighty-chat-icon-bubble i {
  position: relative;
  z-index: 1;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #cf823f;
}
.mighty-chat-invite {
  position: absolute;
  right: 82px;
  bottom: 17px;
  z-index: 1;
  width: max-content;
  max-width: min(285px, calc(100vw - 112px));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  padding: 0.58rem 0.72rem;
  border: 1px solid rgba(255, 244, 231, 0.22);
  border-radius: 999px;
  background: rgba(24, 24, 24, 0.76);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff4e7;
  text-align: left;
  white-space: nowrap;
  font:
    500 0.61rem/1.2 Montserrat,
    Arial,
    sans-serif;
  cursor: pointer;
  animation: chat-invite-arrive 0.35s ease both;
}
.mighty-chat-invite strong {
  color: #f1a35e;
  font-size: 0.61rem;
  font-weight: 700;
}
.mighty-chat-invite:hover {
  border-color: rgba(241, 163, 94, 0.62);
  background: rgba(18, 18, 18, 0.86);
}
.mighty-chat-invite:focus-visible {
  outline: 2px solid #f6ae6c;
  outline-offset: 3px;
}
.mighty-chat-invite[hidden] {
  display: none !important;
}
.mighty-chat-invite-wrap {
  position: absolute;
  right: 82px;
  bottom: 17px;
  width: max-content;
  max-width: min(285px, calc(100vw - 112px));
}
.mighty-chat-invite-wrap[hidden] {
  display: none !important;
}
.mighty-chat-invite-wrap .mighty-chat-invite {
  position: relative;
  right: auto;
  bottom: auto;
  max-width: 100%;
}
.mighty-chat-invite-dismiss {
  position: absolute;
  top: -36px;
  left: 3px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 5px;
  border: 1px solid rgba(255, 244, 231, 0.25);
  border-radius: 50%;
  color: #fff4e7;
  background: rgba(24, 24, 24, 0.9);
  cursor: pointer;
}
.mighty-chat-invite-dismiss svg {
  width: 14px;
  height: 14px;
}
.mighty-chat-invite-dismiss:hover {
  background: #373431;
}
.mighty-chat-invite-dismiss:focus-visible {
  outline: 1px solid #f1a35e;
  outline-offset: 2px;
}
/* Taps keep the launcher clean. Keyboard users get a subtle colour cue. */
.mighty-chat-widget .mighty-chat-launcher:focus,
.mighty-chat-widget .mighty-chat-launcher:focus-visible {
  outline: none !important;
}
.mighty-chat-widget .mighty-chat-launcher:focus-visible {
  background: #ffc487;
}
@media (max-width: 560px) {
  .mighty-chat-invite-wrap { right: 80px; }
}
@keyframes chat-invite-arrive {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 560px) {
  .mighty-chat-icon {
    width: 40px;
    height: 36px;
  }
  .mighty-chat-icon-bubble {
    width: 36px;
    height: 30px;
  }
  .mighty-chat-icon-bubble::after {
    width: 12px;
    height: 12px;
  }
  .mighty-chat-icon-bubble i {
    width: 3.5px;
    height: 3.5px;
  }
  .mighty-chat-invite {
    right: 80px;
    bottom: 17px;
    max-width: calc(100vw - 112px);
    padding: 0.58rem 0.64rem;
    gap: 0.3rem;
    font-size: 0.58rem;
  }
  .mighty-chat-invite strong {
    font-size: 0.58rem;
  }
}
@media (max-width: 360px) {
  .mighty-chat-invite {
    white-space: normal;
    flex-wrap: wrap;
    justify-content: flex-start;
    border-radius: 0.8rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mighty-chat-invite {
    animation: none;
  }
}

/* Conversation roles: visitors, the assistant and staff each have a clear visual voice. */
.mighty-chat-panel {
  grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
}
.mighty-chat-message.is-assistant,
.mighty-chat-message.is-human {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: end;
  column-gap: 0.42rem;
  max-width: 96%;
}
.mighty-chat-message .mighty-chat-avatar {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
}
.mighty-chat-message.is-assistant .mighty-chat-bubble {
  background: #35363a;
  border-color: rgba(255, 244, 231, 0.1);
}
.mighty-chat-message.is-human .mighty-chat-bubble {
  background: #3d3026;
  border-color: rgba(242, 152, 72, 0.42);
}
.mighty-chat-message.is-human .mighty-chat-speaker {
  color: #f3b67e;
}
.mighty-chat-message.is-human .mighty-chat-speaker small {
  color: #d6b99e;
}
.mighty-chat-message.is-user .mighty-chat-bubble {
  background: #494744;
  border-color: rgba(255, 244, 231, 0.14);
}
.mighty-chat-message.is-user .mighty-chat-speaker {
  color: #fff0dc;
}
.mighty-chat-visitor-details {
  margin: 0 0.78rem 0.28rem;
  padding: 0.58rem 0.68rem;
  border: 1px solid rgba(242, 152, 72, 0.36);
  border-radius: 0.72rem;
  background: rgba(43, 39, 35, 0.94);
}
.mighty-chat-visitor-details[hidden] {
  display: none !important;
}
.mighty-chat-visitor-details > p {
  margin: 0 0 0.45rem;
  color: #fff4e7;
  font-size: 0.63rem;
  line-height: 1.45;
}
.mighty-chat-visitor-details-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.42rem 0.5rem;
  align-items: end;
}
.mighty-chat-visitor-details-form label {
  display: grid;
  gap: 0.2rem;
  color: #d4c6b7;
  font-size: 0.55rem;
}
.mighty-chat-visitor-details-form input {
  width: 100%;
  min-width: 0;
  padding: 0.42rem 0.48rem;
  border: 1px solid rgba(255, 244, 231, 0.22);
  border-radius: 0.4rem;
  background: #242426;
  color: #fff4e7;
  font:
    500 0.62rem Montserrat,
    Arial,
    sans-serif;
}
.mighty-chat-visitor-details-form input:focus {
  outline: 2px solid rgba(242, 152, 72, 0.5);
  outline-offset: 1px;
}
.mighty-chat-visitor-details-form button {
  grid-column: 1/-1;
  justify-self: start;
  padding: 0.4rem 0.68rem;
  border: 0;
  border-radius: 0.42rem;
  background: #f29848;
  color: #191919;
  font:
    700 0.58rem Montserrat,
    Arial,
    sans-serif;
  cursor: pointer;
}
.mighty-chat-visitor-details-form button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.mighty-chat-visitor-details-status {
  grid-column: 1/-1;
  color: #b8dfc3;
  font-size: 0.55rem;
}
.mighty-chat-visitor-details-status:empty {
  display: none;
}
@media (max-width: 560px) {
  .mighty-chat-panel {
    grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
  }
  .mighty-chat-message.is-assistant,
  .mighty-chat-message.is-human {
    grid-template-columns: 32px minmax(0, 1fr);
  }
  .mighty-chat-message .mighty-chat-avatar {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
  .mighty-chat-visitor-details {
    margin-right: 0.55rem;
    margin-left: 0.55rem;
  }
}

/* Compact contact prompts leave room for the conversation and phone keyboard. */
.mighty-chat-visitor-details,
.mighty-chat-handoff {
  max-height: min(42vh, 230px);
  overflow: auto;
  margin: 0.35rem 0.65rem 0.45rem;
  padding: 0.6rem;
  border: 1px solid rgba(242, 152, 72, 0.4);
  border-radius: 0.85rem;
  background: #292621;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    max-height 0.22s ease,
    margin 0.22s ease,
    padding 0.22s ease,
    border-width 0.22s ease;
}
.mighty-chat-visitor-details[hidden],
.mighty-chat-handoff[hidden] {
  display: none !important;
}
.mighty-chat-visitor-details.is-dismissed {
  max-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}
.mighty-chat-visitor-details.is-opening {
  opacity: 0;
  transform: translateY(-6px);
}
.mighty-chat-visitor-details > p {
  margin: 0 0 0.45rem;
  color: #fff4e7;
  font-size: 0.75rem;
  line-height: 1.4;
}
.mighty-chat-visitor-details-form,
.mighty-chat-handoff-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}
.mighty-chat-visitor-details-form label,
.mighty-chat-handoff-form label {
  display: grid;
  min-width: 0;
  gap: 0.2rem;
  color: #e6d9ca;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.3;
}
.mighty-chat-visitor-details-form input,
.mighty-chat-handoff-form input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(255, 244, 231, 0.26);
  border-radius: 0.55rem;
  background: #1d1d1e;
  color: #fff4e7;
  font:
    500 16px Montserrat,
    Arial,
    sans-serif;
}
.mighty-chat-visitor-details-form input:focus,
.mighty-chat-handoff-form input:focus {
  outline: 2px solid rgba(242, 152, 72, 0.58);
  outline-offset: 1px;
}
.mighty-chat-visitor-details-form button,
.mighty-chat-handoff-form > button {
  grid-column: 1/-1;
  justify-self: end;
  min-height: 36px;
  margin-top: 0;
  padding: 0.4rem 0.7rem;
  border: 0;
  border-radius: 0.55rem;
  background: #f29848;
  color: #191919;
  font:
    700 0.75rem Montserrat,
    Arial,
    sans-serif;
  cursor: pointer;
}
.mighty-chat-visitor-details-status,
.mighty-chat-handoff-status {
  grid-column: 1/-1;
  margin: 0;
  color: #c5e3ce;
  font-size: 0.72rem;
  line-height: 1.45;
}
.mighty-chat-visitor-details-status:empty,
.mighty-chat-handoff-status:empty {
  display: none;
}
.mighty-chat-handoff-heading {
  margin-bottom: 0.45rem;
}
.mighty-chat-handoff-heading strong {
  font-size: 0.82rem;
}
.mighty-chat-handoff-heading p {
  font-size: 0.7rem;
  line-height: 1.4;
}
@media (max-width: 359px) {
  .mighty-chat-visitor-details-form,
  .mighty-chat-handoff-form {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mighty-chat-visitor-details,
  .mighty-chat-visitor-details.is-dismissed,
  .mighty-chat-visitor-details.is-opening {
    transition: none;
    transform: none;
  }
}

.mighty-chat-footer-links button[hidden] {
  display: none !important;
}
.mighty-chat-message-time {
  display: block;
  margin-top: 0.32rem;
  color: #a8a095;
  font-size: 0.58rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

/* A live indicator replaces the old static status text and only appears while someone is composing. */
.mighty-chat-panel {
  grid-template-rows: auto minmax(0, 1fr) auto auto auto auto auto;
}
/* Hidden prompts keep their own row, so the composer always stays at the bottom. */
.mighty-chat-header { grid-row: 1; }
.mighty-chat-messages { grid-row: 2; }
.mighty-chat-typing { grid-row: 3; }
.mighty-chat-visitor-details { grid-row: 4; }
.mighty-chat-status { grid-row: 5; }
.mighty-chat-handoff { grid-row: 6; }
.mighty-chat-footer { grid-row: 7; }
.mighty-chat-typing {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  min-height: 1.15rem;
  margin: 0 0.88rem 0.36rem;
  color: #ded3c5;
  font-size: 0.58rem;
  line-height: 1.2;
}
.mighty-chat-typing[hidden] {
  display: none !important;
}
.mighty-chat-typing-dots,
.chat-thread-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.mighty-chat-typing-dots i,
.chat-thread-typing-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f29848;
  animation: chatTypingPulse 1.1s ease-in-out infinite;
}
.mighty-chat-typing-dots i:nth-child(2),
.chat-thread-typing-dots i:nth-child(2) {
  animation-delay: 0.15s;
}
.mighty-chat-typing-dots i:nth-child(3),
.chat-thread-typing-dots i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes chatTypingPulse {
  0%,
  60%,
  100% {
    opacity: 0.32;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-2px);
  }
}
@media (max-width: 560px) {
  .mighty-chat-panel {
    grid-template-rows: auto minmax(0, 1fr) auto auto auto auto auto;
  }
  .mighty-chat-handoff {
    grid-row: 6;
  }
  .mighty-chat-typing {
    margin-right: 0.62rem;
    margin-left: 0.62rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mighty-chat-typing-dots i,
  .chat-thread-typing-dots i {
    animation: none;
    opacity: 0.75;
  }
}

/* Mobile conversation: one stable viewport, even when Safari opens the keyboard. */
.mighty-chat-header-copy { gap: 1px; }
.mighty-chat-header-copy > h2 { margin: 0; line-height: 1.15; }
.mighty-chat-header-copy > p,
.mighty-chat-header-copy > .mighty-chat-online { margin: 0; line-height: 1.2; }
.mighty-chat-compose textarea:focus,
.mighty-chat-panel input:focus { outline: none; box-shadow: none; border-color: rgba(255, 244, 231, 0.65); }
@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  html.mighty-chat-is-open { overflow: hidden; overscroll-behavior: none; }
  .mighty-chat-widget.is-open { z-index: 1000; }
  .mighty-chat-widget.is-open .mighty-chat-launcher { visibility: hidden; }
  .mighty-chat-panel {
    position: fixed;
    inset: auto;
    top: var(--chat-viewport-top, 0px);
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: var(--chat-viewport-height, 100dvh);
    min-height: 0;
    max-height: none;
    border-radius: 0;
    overscroll-behavior: none;
    animation: none;
  }
  .mighty-chat-header { padding-top: max(0.65rem, env(safe-area-inset-top)); }
  .mighty-chat-messages {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y pinch-zoom;
  }
  .mighty-chat-panel :is(input, textarea, select) { font-size: 16px !important; }
  .mighty-chat-compose textarea { min-height: 44px; line-height: 1.4; resize: none; }
  .mighty-chat-visitor-details,
  .mighty-chat-handoff { max-height: min(230px, calc(var(--chat-viewport-height, 100dvh) * 0.42)); }
  .mighty-chat-footer { padding-bottom: max(0.65rem, env(safe-area-inset-bottom)); }
}
