.chatbot {
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.8rem;
  pointer-events: none;
}

.chatbot > * {
  pointer-events: auto;
}

.chatbot-toggle {
  min-width: 156px;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(230, 238, 252, 0.96));
  color: #0f2e63;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 22px 38px rgba(5, 14, 32, 0.22);
  border-radius: 22px;
}

.chatbot-panel {
  width: min(380px, calc(100vw - 24px));
  max-height: min(72vh, 640px);
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  overflow: hidden;
  border: 1px solid rgba(13, 33, 79, 0.18);
  background:
    radial-gradient(circle at 88% 14%, rgba(24, 194, 241, 0.16), transparent 22%),
    radial-gradient(circle at 16% 82%, rgba(239, 49, 70, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(248, 252, 255, 0.98), rgba(231, 241, 248, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 28px 54px rgba(5, 14, 32, 0.2);
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
  border-radius: 28px;
}

.chatbot.open .chatbot-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chatbot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.8rem;
  border-bottom: 1px solid rgba(13, 33, 79, 0.08);
}

.chatbot-header strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #0f2e63;
}

.chatbot-header p {
  color: rgba(15, 46, 99, 0.7);
  font-size: 0.88rem;
  line-height: 1.5;
}

.chatbot-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(13, 33, 79, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: #0f2e63;
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 12px;
}

.chatbot-messages {
  min-height: 180px;
  max-height: 260px;
  overflow: auto;
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
}

.chatbot-bubble {
  max-width: 88%;
  padding: 0.8rem 0.9rem;
  line-height: 1.6;
  font-size: 0.92rem;
}

.chatbot-bubble.bot {
  justify-self: start;
  background: rgba(255, 255, 255, 0.85);
  color: #0f2e63;
  border: 1px solid rgba(13, 33, 79, 0.08);
  border-radius: 18px 18px 18px 6px;
}

.chatbot-bubble.user {
  justify-self: end;
  background: linear-gradient(135deg, rgba(239, 49, 70, 0.92), rgba(197, 32, 50, 0.9));
  color: #fff6f7;
  font-weight: 600;
  border-radius: 18px 18px 6px 18px;
}

.chatbot-bubble.thinking {
  min-width: 74px;
  text-align: center;
  color: #4b6b8e;
  letter-spacing: 0.24em;
}

.chatbot-bubble.thinking::after {
  content: '...';
  display: inline-block;
  animation: chatbotThinking 1s infinite steps(3, end);
}

.chatbot-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
}

.chatbot-chip {
  padding: 0.58rem 0.78rem;
  border: 1px solid rgba(13, 33, 79, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: #0f2e63;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 999px;
}

.chatbot-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  padding: 0 1rem 1rem;
}

.chatbot-input {
  min-height: 46px;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(13, 33, 79, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: #0f2e63;
  outline: none;
  border-radius: 16px;
}

.chatbot-input::placeholder {
  color: rgba(15, 46, 99, 0.4);
}

.chatbot-send {
  min-width: 88px;
  border: 1px solid rgba(239, 49, 70, 0.3);
  background: linear-gradient(135deg, rgba(239, 49, 70, 0.92), rgba(197, 32, 50, 0.9));
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  border-radius: 16px;
}

.chatbot-botmark,
.chatbot-toggle-bot {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  width: 42px;
  height: 48px;
}

.chatbot-toggle-bot {
  width: 34px;
  height: 40px;
}

.chatbot-antenna {
  position: absolute;
  top: 1px;
  width: 3px;
  height: 11px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(24, 194, 241, 0.48), rgba(15, 46, 99, 0.92));
}

.chatbot-antenna::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, #ffffff 0%, #8cc5ff 35%, #18c2f1 100%);
  box-shadow: 0 0 12px rgba(111, 187, 255, 0.45);
}

.chatbot-face {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.34rem;
  width: 42px;
  height: 33px;
  border-radius: 14px 14px 18px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(222, 236, 248, 0.96));
  border: 1px solid rgba(24, 194, 241, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 8px 18px rgba(27, 75, 124, 0.16);
}

.chatbot-face::before,
.chatbot-face::after {
  content: '';
  position: absolute;
  top: 12px;
  width: 6px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(209, 227, 244, 0.95), rgba(179, 207, 233, 0.92));
}

.chatbot-face::before {
  left: -3px;
}

.chatbot-face::after {
  right: -3px;
}

.chatbot-eye {
  position: relative;
  width: 7px;
  height: 7px;
  margin-top: -2px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #bfe4ff 20%, #18c2f1 58%, #0f2e63 100%);
  box-shadow: 0 0 12px rgba(24, 194, 241, 0.3);
}

.chatbot-mouth {
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 12px;
  height: 6px;
  border-bottom: 2px solid rgba(15, 46, 99, 0.7);
  border-radius: 0 0 10px 10px;
  transform: translateX(-50%);
}

@keyframes chatbotThinking {
  0% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(-1px); opacity: 1; }
  100% { transform: translateY(0); opacity: 0.35; }
}
