.fc-chatbot {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 99990;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #14213d;
  pointer-events: none;
}

.fc-chatbot,
.fc-chatbot * {
  box-sizing: border-box;
}

.fc-chatbot button,
.fc-chatbot a,
.fc-chatbot input {
  font: inherit;
}

.fc-chatbot__bubble {
  pointer-events: auto;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(0, 124, 255, 0.96), rgba(37, 211, 255, 0.94) 36%, rgba(150, 76, 255, 0.94) 67%, rgba(255, 143, 86, 0.96));
  box-shadow: 0 18px 42px rgba(0, 80, 170, 0.28), 0 8px 18px rgba(84, 33, 170, 0.18);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.fc-chatbot__bubble:hover,
.fc-chatbot__bubble:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 22px 52px rgba(0, 80, 170, 0.34), 0 10px 22px rgba(84, 33, 170, 0.22);
}

.fc-chatbot__bubble:focus-visible,
.fc-chatbot__icon-button:focus-visible,
.fc-chatbot__quick-reply:focus-visible,
.fc-chatbot__send:focus-visible,
.fc-chatbot__link:focus-visible,
.fc-chatbot__plain-button:focus-visible {
  outline: 3px solid rgba(0, 124, 255, 0.28);
  outline-offset: 3px;
}

.fc-chatbot__bubble-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  object-position: center;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
  pointer-events: none;
}

.fc-chatbot__panel {
  pointer-events: auto;
  position: absolute;
  right: 0;
  bottom: 82px;
  width: min(380px, calc(100vw - 32px));
  max-height: min(680px, calc(100svh - 118px));
  display: grid;
  grid-template-rows: auto minmax(160px, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(250, 253, 255, 0.78)),
    radial-gradient(circle at top left, rgba(49, 176, 255, 0.2), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 146, 113, 0.24), transparent 34%);
  box-shadow: 0 30px 80px rgba(14, 38, 76, 0.24), 0 12px 28px rgba(49, 176, 255, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform-origin: bottom right;
}

.fc-chatbot__panel[hidden] {
  display: none;
}

.fc-chatbot__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(0, 124, 255, 0.98), rgba(33, 196, 255, 0.96) 38%, rgba(137, 87, 255, 0.96) 70%, rgba(255, 146, 86, 0.98));
}

.fc-chatbot__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.fc-chatbot__avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.fc-chatbot__title {
  display: block;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-chatbot__subtitle {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
}

.fc-chatbot__icon-button {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.fc-chatbot__messages {
  min-height: 260px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.fc-chatbot__message {
  display: flex;
  flex-direction: column;
  max-width: 88%;
  gap: 5px;
}

.fc-chatbot__message--user {
  align-self: flex-end;
  align-items: flex-end;
}

.fc-chatbot__message--bot {
  align-self: flex-start;
  align-items: flex-start;
}

.fc-chatbot__bubble-text {
  padding: 11px 13px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.fc-chatbot__message--bot .fc-chatbot__bubble-text {
  color: #18223b;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(22, 49, 91, 0.1);
}

.fc-chatbot__message--user .fc-chatbot__bubble-text {
  color: #ffffff;
  background: linear-gradient(135deg, #007cff, #20c6ff);
  box-shadow: 0 10px 24px rgba(0, 124, 255, 0.22);
}

.fc-chatbot__message-link {
  color: #006fe6;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fc-chatbot__message--user .fc-chatbot__message-link {
  color: #ffffff;
}

.fc-chatbot__time {
  font-size: 10px;
  color: rgba(20, 33, 61, 0.52);
}

.fc-chatbot__feedback {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
  color: rgba(20, 33, 61, 0.62);
  font-size: 11px;
}

.fc-chatbot__feedback-button {
  min-height: 28px;
  border: 1px solid rgba(0, 124, 255, 0.16);
  border-radius: 999px;
  padding: 5px 9px;
  color: #0b60c2;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.fc-chatbot__feedback-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.fc-chatbot__quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 14px;
}

.fc-chatbot__quick-reply {
  min-height: 36px;
  border: 1px solid rgba(0, 124, 255, 0.16);
  border-radius: 999px;
  padding: 8px 12px;
  color: #0b60c2;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 20px rgba(20, 95, 180, 0.08);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.fc-chatbot__quick-reply:hover {
  background: #ffffff;
  border-color: rgba(0, 124, 255, 0.32);
}

.fc-chatbot__composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid rgba(16, 36, 64, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.fc-chatbot__input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(19, 42, 75, 0.12);
  border-radius: 999px;
  padding: 0 14px;
  color: #14213d;
  background: #ffffff;
  outline: 0;
}

.fc-chatbot__input:focus {
  border-color: rgba(0, 124, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(0, 124, 255, 0.1);
}

.fc-chatbot__send {
  min-width: 48px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #007cff, #20c6ff);
  cursor: pointer;
  font-weight: 800;
}

.fc-chatbot__send:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.fc-chatbot__footer-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px 12px;
  background: rgba(255, 255, 255, 0.72);
}

.fc-chatbot__plain-button,
.fc-chatbot__link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.fc-chatbot__plain-button {
  border: 1px solid rgba(20, 33, 61, 0.12);
  color: #304059;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
}

.fc-chatbot__link {
  appearance: none;
  color: #0f7f46;
  border: 1px solid rgba(37, 211, 102, 0.26);
  background: rgba(37, 211, 102, 0.1);
  cursor: pointer;
  font-family: inherit;
}

.fc-chatbot__cards {
  width: min(310px, 100%);
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.fc-chatbot__card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(20, 33, 61, 0.08);
}

.fc-chatbot__card-title {
  margin: 0;
  color: #14213d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.fc-chatbot__card-text {
  margin: 0;
  color: rgba(20, 33, 61, 0.72);
  font-size: 12px;
  line-height: 1.45;
}

.fc-chatbot__card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fc-chatbot__typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 52px;
}

.fc-chatbot__typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(0, 124, 255, 0.52);
  animation: fc-chatbot-typing 900ms ease-in-out infinite;
}

.fc-chatbot__typing-dot:nth-child(2) {
  animation-delay: 120ms;
}

.fc-chatbot__typing-dot:nth-child(3) {
  animation-delay: 240ms;
}

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

@keyframes fc-chatbot-typing {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

@media (max-width: 560px) {
  .fc-chatbot {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .fc-chatbot__panel {
    right: -4px;
    bottom: 78px;
    width: calc(100vw - 24px);
    max-height: min(620px, calc(100svh - 104px));
    border-radius: 22px;
  }

  .fc-chatbot__messages {
    min-height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fc-chatbot__bubble,
  .fc-chatbot__typing-dot {
    transition: none;
    animation: none;
  }

  .fc-chatbot__messages {
    scroll-behavior: auto;
  }
}
