.c24-chatbot {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  font-family: Inter, "Kantumruy Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.c24-chatbot * {
  box-sizing: border-box;
}

.c24-chatbot-greeting {
  position: absolute;
  right: 56px;
  bottom: 104px;
  min-width: 74px;
  max-width: 190px;
  padding: 8px 12px;
  border: 1px solid #dbe6f5;
  border-radius: 999px 999px 8px 999px;
  background: #fff;
  color: #002f6c;
  box-shadow: 0 12px 30px rgba(0, 47, 108, 0.18);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  animation: c24-chatbot-greeting-float 3s ease-in-out infinite;
}

@keyframes c24-chatbot-greeting-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.c24-chatbot-toggle {
  width: 112px;
  height: 112px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
  box-shadow: none;
  cursor: pointer;
}

.c24-chatbot-toggle::before {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(0, 47, 108, 0.24);
}

.c24-chatbot-ant {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

.c24-chatbot-panel {
  position: absolute;
  right: 0;
  bottom: 126px;
  width: min(370px, calc(100vw - 28px));
  height: min(590px, calc(100vh - 120px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dbe6f5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

.c24-chatbot.is-open .c24-chatbot-panel {
  display: flex;
}

.c24-chatbot-head {
  padding: 14px 14px 12px;
  background: #002f6c;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.c24-chatbot-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.c24-chatbot-title {
  flex: 1;
  min-width: 0;
}

.c24-chatbot-title strong,
.c24-chatbot-title span {
  display: block;
}

.c24-chatbot-title strong {
  font-size: 14px;
  line-height: 1.2;
}

.c24-chatbot-title span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.c24-chatbot-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.c24-chatbot-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  background: #f7faff;
}

.c24-chatbot-msg {
  max-width: 88%;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.45;
}

.c24-chatbot-msg.bot {
  margin-right: auto;
  background: #fff;
  color: #172033;
  border: 1px solid #e1e9f5;
}

.c24-chatbot-msg.user {
  margin-left: auto;
  background: #002f6c;
  color: #fff;
}

.c24-chatbot-msg.error {
  background: #fff5f5;
  border-color: #fecaca;
  color: #991b1b;
}

.c24-chatbot-provider {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.c24-chatbot-msg a {
  color: #0056b3;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.c24-chatbot-msg.user a {
  color: #fff;
}

.c24-chatbot-suggestions {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px 12px;
  border-top: 1px solid #e6eef9;
  background: #fff;
}

.c24-chatbot-suggestion {
  flex: 0 0 auto;
  border: 1px solid #dbe6f5;
  border-radius: 999px;
  background: #fff;
  color: #002f6c;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.c24-chatbot-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #e6eef9;
  background: #fff;
}

.c24-chatbot-input {
  flex: 1;
  min-width: 0;
  resize: none;
  height: 42px;
  max-height: 110px;
  border: 1px solid #dbe6f5;
  border-radius: 12px;
  padding: 10px 11px;
  color: #172033;
  font: inherit;
  outline: none;
}

.c24-chatbot-input:focus {
  border-color: #002f6c;
}

.c24-chatbot-send {
  width: 44px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #002f6c;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.c24-chatbot-send:disabled,
.c24-chatbot-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .c24-chatbot {
    right: 6px;
    bottom: 6px;
  }

  .c24-chatbot-panel {
    position: fixed;
    left: auto;
    right: 10px;
    bottom: 68px;
    width: min(340px, calc(100vw - 32px));
    max-width: 340px;
    height: min(500px, calc(100vh - 150px));
    height: min(500px, calc(100dvh - 150px));
    border-radius: 16px;
  }

  .c24-chatbot-toggle {
    width: 78px;
    height: 78px;
  }

  .c24-chatbot-toggle::before {
    inset: 20px;
  }

  .c24-chatbot-greeting {
    right: 38px;
    bottom: 70px;
    max-width: min(210px, calc(100vw - 108px));
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .c24-chatbot-panel {
    left: auto;
    right: 8px;
    bottom: 68px;
    width: calc(100vw - 28px);
    max-width: 330px;
    height: min(460px, calc(100vh - 150px));
    height: min(460px, calc(100dvh - 150px));
    border-radius: 16px;
  }

  .c24-chatbot-head {
    padding: 11px 12px;
  }

  .c24-chatbot-messages {
    padding: 10px;
  }

  .c24-chatbot-msg {
    max-width: 92%;
    padding: 8px 10px;
    font-size: 12px;
  }

  .c24-chatbot-suggestions {
    padding: 7px 9px;
  }

  .c24-chatbot-form {
    padding: 8px;
  }
}
