.chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: #243155;
  color: #ffbb00;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 50px rgba(36, 49, 85, 0.28);
  cursor: pointer;
  border: 2px solid #cacf9a;
  outline: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  z-index: 1000;
}

.chat-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 50px rgba(36, 49, 85, 0.4);
}

.chat-launcher span {
  font-size: 28px;
  line-height: 1;
}

.chat-widget {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 480px;
  max-height: calc(100vh - 120px);
  background: #fffdf7;
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(36, 49, 85, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(36, 49, 85, 0.12);
  z-index: 1000;
}

.chat-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, #243155, #31456f);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #f7f1c8;
}

.chat-header-left {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-widget .avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #cacf9a;
  color: #243155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.chat-title {
  font-size: 14px;
  font-weight: 700;
}

.chat-subtitle {
  font-size: 11px;
  color: #cacf9a;
}

.chat-close {
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

.chat-messages {
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 0 0, rgba(202, 207, 154, 0.28), transparent 45%),
    #fffdf7;
}

.chat-message {
  max-width: 86%;
  border-radius: 14px;
  padding: 9px 12px;
  font-size: 13px;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.chat-message.user {
  margin-left: auto;
  background: #243155;
  color: #f5f7fb;
  border-bottom-right-radius: 4px;
}

.chat-message.bot {
  margin-right: auto;
  background: rgba(202, 207, 154, 0.4);
  color: #243155;
  border-bottom-left-radius: 4px;
}

.chat-footer {
  padding: 10px;
  border-top: 1px solid rgba(36, 49, 85, 0.1);
  background: #fff;
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(36, 49, 85, 0.15);
  padding: 8px 12px;
  background: #fff;
  color: #1a2238;
  font-size: 13px;
  outline: none;
}

.chat-input:focus {
  border-color: #296d81;
}

.chat-send {
  border-radius: 999px;
  border: none;
  width: 40px;
  height: 40px;
  background: #ffbb00;
  color: #243155;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.chat-send:disabled {
  opacity: 0.6;
  cursor: default;
}

.typing-indicator {
  display: inline-flex;
  gap: 3px;
}

.typing-indicator .dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #2a3b5f;
  animation: faq-blink 1s infinite ease-in-out;
}

.typing-indicator .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes faq-blink {
  0%,
  80%,
  100% {
    opacity: 0.2;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-1px);
  }
}

@media (max-width: 480px) {
  .chat-launcher {
    right: 14px;
    bottom: 14px;
  }

  .chat-widget {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: 90px;
  }
}
