.myrhem-chat {
  --chat-ink: #18211b;
  --chat-muted: #6d766d;
  --chat-surface: rgba(255, 253, 248, 0.96);
  --chat-soft: #f6f1e8;
  --chat-soft-2: #fbf7ef;
  --chat-border: rgba(35, 48, 40, 0.12);
  --chat-accent: #294636;
  --chat-accent-soft: rgba(41, 70, 54, 0.1);
  --chat-warm: #9a6b3f;
  --chat-danger: #b9553f;
  --chat-shadow: 0 18px 46px rgba(25, 35, 28, 0.18);
  --chat-soft-shadow: 0 10px 28px rgba(25, 35, 28, 0.14);
  --chat-launcher-size: 48px;
  --chat-launcher-gap: 10px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  color: var(--chat-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  left: auto;
  position: fixed;
  right: calc(18px + env(safe-area-inset-right));
  width: max-content;
  z-index: 2147482400;
}

.myrhem-chat button,
.myrhem-chat input,
.myrhem-chat textarea {
  font: inherit;
}

.myrhem-chat [hidden] {
  display: none !important;
}

.myrhem-chat__sr {
  clip: rect(0 0 0 0);
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.myrhem-chat__launcher-group {
  display: grid;
  justify-items: end;
  pointer-events: auto;
  position: relative;
  width: max-content;
}

.myrhem-chat__pillow {
  align-items: center;
  appearance: none;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  bottom: calc(var(--chat-launcher-size) + var(--chat-launcher-gap));
  box-shadow: 0 12px 28px rgba(25, 35, 28, 0.13);
  color: var(--chat-accent);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 760;
  gap: 7px;
  line-height: 1.2;
  max-width: min(220px, calc(100vw - 36px - env(safe-area-inset-right)));
  opacity: 0;
  padding: 8px 12px;
  pointer-events: none;
  position: absolute;
  right: 0;
  transform: translateY(7px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
  text-align: left;
  white-space: nowrap;
}

.myrhem-chat.has-pillow:not(.is-open) .myrhem-chat__pillow {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.myrhem-chat__pillow::after {
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  border-right: 1px solid rgba(255, 255, 255, 0.72);
  bottom: -5px;
  content: "";
  height: 10px;
  position: absolute;
  right: 20px;
  transform: rotate(45deg);
  width: 10px;
}

.myrhem-chat__pillow-dot {
  background: #7f9a76;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(127, 154, 118, 0.12);
  flex: 0 0 auto;
  height: 7px;
  width: 7px;
}

.myrhem-chat__pillow [data-chat-pillow-text] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.myrhem-chat__launcher {
  align-items: center;
  appearance: none;
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.98), rgba(244, 239, 228, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  box-shadow: var(--chat-soft-shadow);
  color: var(--chat-accent);
  cursor: pointer;
  display: inline-grid;
  height: var(--chat-launcher-size);
  justify-content: center;
  margin-left: auto;
  padding: 0;
  position: relative;
  transition: transform 170ms ease, box-shadow 170ms ease, background 170ms ease;
  width: var(--chat-launcher-size);
}

.myrhem-chat__launcher:hover,
.myrhem-chat__launcher:focus-visible {
  background: #fffdf8;
  box-shadow: 0 14px 34px rgba(25, 35, 28, 0.18);
  outline: none;
  transform: translateY(-2px);
}

.myrhem-chat__launcher-icon {
  align-items: center;
  background: rgba(41, 70, 54, 0.08);
  border-radius: 999px;
  color: var(--chat-accent);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.myrhem-chat__launcher-icon svg {
  display: block;
  height: 20px;
  width: 20px;
}

.myrhem-chat__launcher em {
  align-items: center;
  background: var(--chat-danger);
  border: 2px solid #fffdf8;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 820;
  justify-content: center;
  min-height: 18px;
  min-width: 18px;
  padding: 0 4px;
  position: absolute;
  right: -2px;
  top: -3px;
}

.myrhem-chat__panel {
  backdrop-filter: blur(16px);
  background: var(--chat-surface);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 18px;
  bottom: 62px;
  box-shadow: var(--chat-shadow);
  display: grid;
  grid-template-rows: auto minmax(150px, 1fr) auto auto auto;
  max-height: min(620px, calc(100dvh - 104px));
  opacity: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  right: 0;
  transform: translateY(12px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 180ms ease, transform 180ms ease;
  width: min(360px, calc(100vw - 28px));
}

.myrhem-chat.is-open .myrhem-chat__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.myrhem-chat__header {
  align-items: start;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(35, 48, 40, 0.08);
  border-radius: 14px;
  display: grid;
  gap: 9px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin: 10px 10px 0;
  padding: 10px;
}

.myrhem-chat__brand-mark {
  align-items: center;
  background: rgba(41, 70, 54, 0.07);
  border: 1px solid rgba(41, 70, 54, 0.09);
  border-radius: 999px;
  color: var(--chat-accent);
  display: inline-flex;
  height: 30px;
  justify-content: center;
  margin-top: 1px;
  width: 30px;
}

.myrhem-chat__brand-mark svg {
  height: 17px;
  width: 17px;
}

.myrhem-chat__header-copy {
  min-width: 0;
}

.myrhem-chat__title-row {
  align-items: center;
  display: flex;
  gap: 6px;
  min-width: 0;
  position: relative;
}

.myrhem-chat__header strong {
  color: var(--chat-accent);
  display: inline-block;
  font-size: 0.98rem;
  line-height: 1.18;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.myrhem-chat__header small {
  color: var(--chat-muted);
  display: block;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.32;
  margin-top: 4px;
}

.myrhem-chat__info,
.myrhem-chat__close {
  align-items: center;
  appearance: none;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(35, 48, 40, 0.1);
  border-radius: 999px;
  color: var(--chat-ink);
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  line-height: 1;
}

.myrhem-chat__info {
  color: var(--chat-muted);
  flex: 0 0 auto;
  height: 22px;
  width: 22px;
}

.myrhem-chat__info svg {
  height: 14px;
  width: 14px;
}

.myrhem-chat__close {
  color: var(--chat-accent);
  font-size: 1rem;
  height: 30px;
  width: 32px;
}

.myrhem-chat__info:hover,
.myrhem-chat__info:focus-visible,
.myrhem-chat__close:hover,
.myrhem-chat__close:focus-visible {
  background: #fff;
  outline: none;
}

.myrhem-chat__tooltip {
  background: #fffdf8;
  border: 1px solid rgba(35, 48, 40, 0.12);
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(25, 35, 28, 0.14);
  color: var(--chat-ink);
  font-size: 0.72rem;
  font-weight: 650;
  left: 0;
  line-height: 1.35;
  max-width: min(240px, calc(100vw - 80px));
  opacity: 0;
  padding: 8px 9px;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 8px);
  transform: translateY(-3px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 3;
}

.myrhem-chat__info:hover + .myrhem-chat__tooltip,
.myrhem-chat__info:focus-visible + .myrhem-chat__tooltip,
.myrhem-chat.has-info-open .myrhem-chat__tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.myrhem-chat__messages {
  align-content: start;
  display: grid;
  gap: 9px;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  scroll-behavior: smooth;
}

.myrhem-chat__connection {
  background: rgba(138, 103, 50, 0.1);
  border-bottom: 1px solid rgba(138, 103, 50, 0.16);
  color: #6e552d;
  font-size: 0.72rem;
  font-weight: 760;
  margin: 0;
  padding: 7px 14px;
}

.myrhem-chat__message {
  display: grid;
  gap: 4px;
  max-width: 84%;
}

.myrhem-chat__message > span,
.myrhem-chat__meta {
  color: var(--chat-muted);
  font-size: 0.68rem;
  font-weight: 780;
  letter-spacing: 0;
}

.myrhem-chat__meta {
  align-items: center;
  display: flex;
  gap: 6px;
}

.myrhem-chat__meta time {
  color: rgba(109, 118, 109, 0.78);
  font-size: 0.66rem;
  font-weight: 720;
}

.myrhem-chat__message > p,
.myrhem-chat__bubble {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(35, 48, 40, 0.08);
  border-radius: 14px;
  color: var(--chat-ink);
  display: grid;
  gap: 7px;
  padding: 9px 11px;
}

.myrhem-chat__message p {
  line-height: 1.42;
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.myrhem-chat__message p a,
.chat-message-link {
  color: var(--chat-accent);
  font-weight: 760;
  overflow-wrap: anywhere;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.myrhem-chat__message.is-visitor {
  justify-self: end;
}

.myrhem-chat__message.is-visitor > span,
.myrhem-chat__message.is-visitor .myrhem-chat__meta {
  justify-content: flex-end;
  text-align: right;
}

.myrhem-chat__message.is-visitor > p,
.myrhem-chat__message.is-visitor .myrhem-chat__bubble {
  background: #e8efe8;
  border-color: rgba(41, 70, 54, 0.16);
}

.myrhem-chat__message.is-system > p,
.myrhem-chat__message.is-system .myrhem-chat__bubble {
  background: var(--chat-soft-2);
  color: #445146;
}

.myrhem-chat__message.is-payment {
  max-width: min(88%, 310px);
}

.myrhem-chat__message.is-payment .myrhem-chat__bubble {
  background: transparent;
  border: 0;
  padding: 0;
}

.myrhem-chat__message.is-sending {
  opacity: 0.74;
}

.myrhem-chat__sending {
  color: var(--chat-muted);
  display: block;
  font-size: 0.66rem;
  font-weight: 760;
  margin-top: 4px;
}

.chat-payment-card {
  background: #fffdf8;
  border: 1px solid rgba(41, 70, 54, 0.13);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(25, 35, 28, 0.09);
  color: var(--chat-ink);
  display: grid;
  gap: 7px;
  padding: 13px;
}

.chat-payment-card__eyebrow,
.chat-payment-card__status,
.chat-payment-card__note {
  color: var(--chat-muted);
  font-size: 0.7rem;
  font-weight: 760;
  line-height: 1.25;
}

.chat-payment-card__title {
  color: var(--chat-accent);
  font-size: 0.9rem;
  line-height: 1.25;
}

.chat-payment-card__amount {
  color: var(--chat-ink);
  font-size: 1.22rem;
  font-weight: 840;
  line-height: 1.1;
}

.chat-payment-card__details {
  display: grid;
  gap: 4px 10px;
  grid-template-columns: max-content minmax(0, 1fr);
  margin: 0;
}

.chat-payment-card__details dt,
.chat-payment-card__details dd {
  font-size: 0.72rem;
  line-height: 1.3;
  margin: 0;
}

.chat-payment-card__details dt {
  color: var(--chat-muted);
}

.chat-payment-card__details dd {
  color: var(--chat-ink);
  font-weight: 760;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.chat-booking-card__reference {
  justify-self: end;
  line-height: 1.22;
  max-width: 17ch;
  word-break: break-word;
}

.chat-payment-card__status {
  background: rgba(41, 70, 54, 0.08);
  border-radius: 999px;
  justify-self: start;
  padding: 4px 8px;
}

.chat-payment-card[data-payment-status="paid"] .chat-payment-card__status {
  background: rgba(78, 130, 84, 0.13);
  color: #386f43;
}

.chat-payment-card[data-payment-status="expired"] .chat-payment-card__status,
.chat-payment-card[data-payment-status="failed"] .chat-payment-card__status,
.chat-payment-card[data-payment-status="cancelled"] .chat-payment-card__status {
  background: rgba(154, 107, 63, 0.12);
  color: #805934;
}

.chat-payment-card__note {
  border-top: 1px solid rgba(35, 48, 40, 0.08);
  padding-top: 7px;
}

.chat-payment-card__button {
  align-items: center;
  background: var(--chat-accent);
  border-radius: 999px;
  color: #fffaf0;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 820;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  text-decoration: none;
}

.chat-payment-card__button:hover,
.chat-payment-card__button:focus-visible {
  background: #20392b;
  outline: none;
}

.chat-payment-card__button.is-disabled {
  background: rgba(41, 70, 54, 0.09);
  color: var(--chat-muted);
}

.myrhem-chat__prompts {
  border-top: 1px solid rgba(35, 48, 40, 0.07);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  opacity: 1;
  padding: 4px 14px 11px;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
}

.myrhem-chat__prompts:empty {
  display: none;
}

.myrhem-chat__prompts.is-hiding {
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
}

.myrhem-chat__prompts button {
  appearance: none;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(41, 70, 54, 0.14);
  border-radius: 999px;
  color: var(--chat-accent);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 740;
  line-height: 1.15;
  min-height: 30px;
  padding: 6px 9px;
}

.myrhem-chat__prompts button:hover,
.myrhem-chat__prompts button:focus-visible {
  background: var(--chat-accent-soft);
  outline: none;
}

.myrhem-chat__contact {
  background: rgba(250, 246, 237, 0.72);
  border-top: 1px solid rgba(35, 48, 40, 0.08);
  display: grid;
  gap: 7px;
  padding: 11px 14px;
}

.myrhem-chat__contact strong {
  color: var(--chat-accent);
  font-size: 0.82rem;
}

.myrhem-chat__contact input {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(35, 48, 40, 0.11);
  border-radius: 10px;
  color: var(--chat-ink);
  min-height: 36px;
  padding: 8px 10px;
  width: 100%;
}

.myrhem-chat__contact button,
.myrhem-chat__composer button {
  align-items: center;
  appearance: none;
  background: var(--chat-accent);
  border: 0;
  border-radius: 999px;
  color: #fffaf0;
  cursor: pointer;
  display: inline-flex;
  font-weight: 780;
  justify-content: center;
}

.myrhem-chat__contact button {
  min-height: 36px;
  padding: 8px 13px;
}

.myrhem-chat__composer {
  align-items: end;
  background: rgba(255, 253, 248, 0.82);
  border-top: 1px solid rgba(35, 48, 40, 0.08);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 11px 12px 10px;
}

.myrhem-chat__composer input[name="company"] {
  height: 1px;
  left: -10000px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.myrhem-chat__composer textarea {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(35, 48, 40, 0.11);
  border-radius: 16px;
  color: var(--chat-ink);
  line-height: 1.38;
  max-height: 112px;
  min-height: 40px;
  overflow-y: hidden;
  padding: 10px 12px;
  resize: none;
  width: 100%;
}

.myrhem-chat__composer button {
  height: 40px;
  padding: 0;
  width: 40px;
}

.myrhem-chat__composer button svg {
  height: 17px;
  width: 17px;
}

.myrhem-chat__composer button:disabled {
  cursor: progress;
  opacity: 0.62;
}

.myrhem-chat__composer textarea:focus,
.myrhem-chat__contact input:focus {
  border-color: rgba(41, 70, 54, 0.36);
  box-shadow: 0 0 0 3px rgba(41, 70, 54, 0.09);
  outline: none;
}

.myrhem-chat__privacy {
  color: var(--chat-muted);
  font-size: 0.68rem;
  line-height: 1.35;
  margin: 0;
  padding: 0 14px 12px;
}

@media (prefers-reduced-motion: reduce) {
  .myrhem-chat__launcher,
  .myrhem-chat__panel,
  .myrhem-chat__pillow,
  .myrhem-chat__prompts,
  .myrhem-chat__tooltip {
    transition: none;
  }

  .myrhem-chat__messages {
    scroll-behavior: auto;
  }
}

@media (max-width: 520px) {
  .myrhem-chat {
    --chat-launcher-size: 46px;
    --chat-launcher-gap: 9px;
    bottom: calc(20px + env(safe-area-inset-bottom));
    left: auto;
    right: calc(16px + env(safe-area-inset-right));
  }

  .myrhem-chat__launcher {
    height: var(--chat-launcher-size);
    min-height: var(--chat-launcher-size);
    min-width: var(--chat-launcher-size);
    width: var(--chat-launcher-size);
  }

  .myrhem-chat__pillow {
    bottom: calc(var(--chat-launcher-size) + var(--chat-launcher-gap));
    font-size: 0.78rem;
    line-height: 1.2;
    max-width: calc(100vw - 32px - env(safe-area-inset-right));
    padding: 8px 10px;
    white-space: nowrap;
  }

  .myrhem-chat__panel {
    bottom: calc(var(--chat-launcher-size) + 12px);
    max-height: min(580px, calc(100dvh - 82px));
    width: min(360px, calc(100vw - 32px));
  }

  .myrhem-chat__header {
    margin: 8px 8px 0;
    padding: 9px;
  }

  .myrhem-chat__tooltip {
    left: auto;
    max-width: min(230px, calc(100vw - 76px));
    right: -36px;
  }

  .myrhem-chat__messages {
    padding: 12px;
  }

  .myrhem-chat__message {
    max-width: 88%;
  }

  .myrhem-chat__prompts {
    gap: 5px;
    padding: 3px 12px 10px;
  }

  .myrhem-chat__composer {
    padding: 10px;
  }
}
