.mofc-live-chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  padding: 10px 12px;
  min-height: 72px;
  width: min(420px, calc(100vw - 26px));
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: #fff;
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 255, 255, 0.3), transparent 42%),
    linear-gradient(130deg, #15476f 0%, #123f67 52%, #0b2d4a 100%);
  box-shadow: 0 18px 34px rgba(9, 42, 68, 0.34);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.mofc-live-chat-launcher.is-hidden {
  display: none !important;
}

.mofc-live-chat-launcher.on-booking-page {
  left: 20px;
  right: auto;
  width: 58px;
  min-height: 58px;
  padding: 8px;
  border-radius: 999px;
  grid-template-columns: 1fr;
  justify-items: center;
}

.mofc-live-chat-launcher:hover,
.mofc-live-chat-launcher:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 22px 38px rgba(9, 42, 68, 0.4);
  filter: brightness(1.04);
}

.mofc-live-chat-launcher-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.46);
  box-shadow: 0 4px 12px rgba(7, 26, 42, 0.42);
  position: relative;
  flex: 0 0 40px;
}

.mofc-live-chat-launcher-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mofc-live-chat-launcher-presence {
  position: absolute;
  right: 1px;
  bottom: 2px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(12, 45, 73, 0.88);
  background: radial-gradient(circle at 36% 34%, #9bffb6 0%, #35d66e 58%, #15984a 100%);
  box-shadow: 0 0 8px rgba(72, 240, 125, 0.5);
}

.mofc-live-chat-launcher-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.mofc-live-chat-launcher-title {
  font: 700 12px/1.2 "Manrope", "Segoe UI", sans-serif;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  opacity: 0.96;
}

.mofc-live-chat-launcher-message {
  font: 600 12px/1.34 "Manrope", "Segoe UI", sans-serif;
  color: rgba(255, 255, 255, 0.94);
}

.mofc-live-chat-launcher-cta {
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  padding: 6px 10px;
  font: 700 11px/1 "Manrope", "Segoe UI", sans-serif;
  letter-spacing: 0.03em;
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
  white-space: nowrap;
}

.mofc-live-chat-launcher.on-booking-page .mofc-live-chat-launcher-copy,
.mofc-live-chat-launcher.on-booking-page .mofc-live-chat-launcher-cta {
  display: none;
}

.mofc-live-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 78px;
  width: min(390px, calc(100vw - 24px));
  height: min(620px, calc(100vh - 110px));
  display: none;
  flex-direction: column;
  gap: 0;
  z-index: 1201;
  border-radius: 20px;
  border: 1px solid rgba(18, 63, 103, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 255, 0.96) 100%),
    #fff;
  box-shadow: 0 28px 52px rgba(12, 42, 70, 0.36);
  overflow: hidden;
  padding: 0;
}

.mofc-live-chat-panel.on-booking-page {
  left: 20px;
  right: auto;
}

.mofc-live-chat-panel.is-open {
  display: flex;
}

.mofc-live-chat-head {
  margin: 0;
  padding: 14px 14px 13px;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.2), transparent 40%),
    linear-gradient(132deg, #103b5f 0%, #123f67 54%, #0b2d4a 100%);
  color: #ffffff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mofc-live-chat-kicker {
  font: 700 10px/1.2 "Manrope", "Segoe UI", sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.86;
}

.mofc-live-chat-title {
  margin-top: 3px;
  font: 700 20px/1.12 "Playfair Display", Georgia, serif;
}

.mofc-live-chat-title-row {
  margin-top: 3px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mofc-live-chat-avatar-wrap {
  width: 23px;
  height: 23px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 3px 10px rgba(5, 23, 38, 0.45);
  flex: 0 0 23px;
}

.mofc-live-chat-avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.mofc-live-chat-live-indicator {
  display: inline-flex;
  align-items: center;
}

.mofc-live-chat-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle at 36% 34%, #9bffb6 0%, #35d66e 58%, #15984a 100%);
  box-shadow:
    0 0 0 0 rgba(72, 240, 125, 0.55),
    0 0 10px rgba(72, 240, 125, 0.45);
  animation: mofc-live-chat-live-pulse 1.45s ease-out infinite;
}

.mofc-live-chat-subtitle {
  margin-top: 4px;
  max-width: 280px;
  font: 500 11px/1.35 "Manrope", "Segoe UI", sans-serif;
  opacity: 0.92;
}

.mofc-live-chat-close {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 9px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font: 700 14px/1 "Manrope", "Segoe UI", sans-serif;
}

.mofc-live-chat-identity {
  padding: 12px;
  border-bottom: 1px solid #e0e8f1;
  display: grid;
  gap: 8px;
  margin: 0;
  grid-template-columns: 1fr;
}

.mofc-live-chat-identity input {
  width: 100%;
  border: 1px solid #c9d9e8;
  border-radius: 11px;
  padding: 10px 11px;
  font: 500 13px/1.25 "Manrope", "Segoe UI", sans-serif;
  color: #153756;
  background: #fff;
}

.mofc-live-chat-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.mofc-live-chat-identity button {
  border: 1px solid rgba(18, 63, 103, 0.36);
  border-radius: 11px;
  padding: 10px 11px;
  font: 700 13px/1 "Manrope", "Segoe UI", sans-serif;
  color: #fff;
  background: linear-gradient(130deg, #184f7e 0%, #123f67 50%, #0e324f 100%);
  cursor: pointer;
  grid-column: 1 / -1;
}

.mofc-live-chat-booking-context {
  border: 1px solid rgba(18, 63, 103, 0.2);
  border-radius: 10px;
  padding: 9px 10px;
  background: linear-gradient(170deg, #f7fbff 0%, #edf5fe 100%);
  color: #234766;
  font: 600 11px/1.45 "Manrope", "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
}

.mofc-live-chat-messages {
  padding: 12px;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(245, 250, 255, 0.98) 0%, rgba(239, 246, 253, 0.96) 100%);
  min-height: 0;
  flex: 1 1 auto;
  margin: 0;
}

.mofc-live-chat-bubble {
  margin-bottom: 10px;
  max-width: 88%;
  border-radius: 14px;
  padding: 9px 10px;
  font: 500 13px/1.45 "Manrope", "Segoe UI", sans-serif;
  color: #123755;
  background: #fff;
  border: 1px solid #d4e1ee;
}

.mofc-live-chat-message-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.mofc-live-chat-message-row.owner {
  justify-content: flex-start;
}

.mofc-live-chat-message-row.guest {
  justify-content: flex-end;
}

.mofc-live-chat-bubble-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(18, 63, 103, 0.24);
  box-shadow: 0 3px 8px rgba(8, 30, 49, 0.2);
  flex: 0 0 24px;
  margin-bottom: 10px;
}

.mofc-live-chat-bubble-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mofc-live-chat-bubble.owner {
  background: #f1f7ff;
  border-color: #bfd4ea;
  margin-left: 0;
}

.mofc-live-chat-bubble.guest {
  margin-left: auto;
  background: linear-gradient(130deg, #184f7e 0%, #123f67 55%, #0f3351 100%);
  color: #fff;
  border-color: rgba(18, 63, 103, 0.66);
}

.mofc-live-chat-meta {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  letter-spacing: 0.03em;
  opacity: 0.78;
}

.mofc-live-chat-body {
  white-space: pre-line;
}

.mofc-live-chat-compose {
  border-top: 1px solid #dce6f1;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: #fff;
  margin: 0;
}

.mofc-live-chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px 10px 0;
  background: #fff;
  margin: 0;
}

.mofc-live-chat-quick-reply {
  border: 1px solid rgba(18, 63, 103, 0.26);
  border-radius: 999px;
  padding: 7px 11px;
  font: 700 12px/1 "Manrope", "Segoe UI", sans-serif;
  color: #123f67;
  background: linear-gradient(180deg, #f9fcff 0%, #eef5fd 100%);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.mofc-live-chat-quick-reply:hover,
.mofc-live-chat-quick-reply:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(13, 47, 75, 0.16);
}

.mofc-live-chat-quick-reply:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.mofc-live-chat-compose textarea {
  width: 100%;
  resize: none;
  border: 1px solid #c9d9e8;
  border-radius: 11px;
  padding: 10px 11px;
  min-height: 72px;
  font: 500 13px/1.4 "Manrope", "Segoe UI", sans-serif;
  color: #153756;
  background: #fff;
}

.mofc-live-chat-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mofc-live-chat-send {
  border: 1px solid rgba(18, 63, 103, 0.36);
  border-radius: 11px;
  padding: 9px 13px;
  font: 700 13px/1 "Manrope", "Segoe UI", sans-serif;
  color: #fff;
  background: linear-gradient(130deg, #184f7e 0%, #123f67 50%, #0e324f 100%);
  cursor: pointer;
}

.mofc-live-chat-note {
  font: 500 11px/1.35 "Manrope", "Segoe UI", sans-serif;
  color: #5b748d;
  grid-column: 1 / -1;
}

.mofc-live-chat-bubble.typing {
  opacity: 0.95;
}

.mofc-live-chat-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 14px;
}

.mofc-live-chat-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #4f6f8c;
  opacity: 0.35;
  animation: mofc-live-chat-dot-pulse 1s infinite ease-in-out;
}

.mofc-live-chat-typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.mofc-live-chat-typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes mofc-live-chat-dot-pulse {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  40% {
    transform: translateY(-2px);
    opacity: 0.9;
  }
}

@keyframes mofc-live-chat-live-pulse {
  0% {
    box-shadow:
      0 0 0 0 rgba(72, 240, 125, 0.52),
      0 0 10px rgba(72, 240, 125, 0.42);
  }
  70% {
    box-shadow:
      0 0 0 8px rgba(72, 240, 125, 0),
      0 0 14px rgba(72, 240, 125, 0.5);
  }
  100% {
    box-shadow:
      0 0 0 0 rgba(72, 240, 125, 0),
      0 0 10px rgba(72, 240, 125, 0.42);
  }
}

.mofc-live-chat-status {
  font: 600 12px/1.3 "Manrope", "Segoe UI", sans-serif;
  color: #3f6284;
}

.mofc-live-chat-closed-card {
  margin-top: 8px;
  border: 1px solid #d3deea;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(2px);
  padding: 10px 11px;
  position: sticky;
  bottom: 0;
  z-index: 2;
  box-shadow: 0 -8px 18px rgba(10, 39, 64, 0.08);
}

.mofc-live-chat-closed-title {
  font: 700 13px/1.35 "Manrope", "Segoe UI", sans-serif;
  color: #123f67;
}

.mofc-live-chat-closed-copy {
  margin-top: 4px;
  font: 500 12px/1.45 "Manrope", "Segoe UI", sans-serif;
  color: #5a738b;
}

.mofc-live-chat-closed-btn {
  margin-top: 10px;
  border: 1px solid rgba(18, 63, 103, 0.36);
  border-radius: 11px;
  padding: 9px 12px;
  font: 700 13px/1 "Manrope", "Segoe UI", sans-serif;
  color: #fff;
  background: linear-gradient(130deg, #184f7e 0%, #123f67 50%, #0e324f 100%);
  cursor: pointer;
}

@media (max-width: 640px) {
  .mofc-live-chat-launcher {
    right: 12px;
    left: auto;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: 58px;
    min-height: 58px;
    padding: 8px;
    border-radius: 999px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0;
  }

  .mofc-live-chat-launcher-copy,
  .mofc-live-chat-launcher-cta {
    display: none !important;
  }

  .mofc-live-chat-panel {
    right: 8px;
    left: 8px;
    top: calc(8px + env(safe-area-inset-top, 0px));
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    width: auto;
    height: auto;
    max-height: none;
    border-radius: 16px;
  }

  .mofc-live-chat-panel.on-booking-page {
    left: 8px;
    right: 8px;
  }

  .mofc-live-chat-title {
    font-size: 18px;
  }
}

@media (min-width: 520px) {
  .mofc-live-chat-identity {
    grid-template-columns: 1fr 1fr;
  }
}
