/* Chatbot Styles */

/* Chatbot Button */
.chatbot-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #003366, #0055aa);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 51, 102, 0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.chatbot-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(0, 85, 170, 0.6);
}

.chatbot-button.active {
  background: linear-gradient(135deg, #0055aa, #003366);
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 4px 20px rgba(0, 51, 102, 0.4);
  }
  50% {
    box-shadow: 0 6px 30px rgba(0, 85, 170, 0.6);
  }
}

/* Chatbot Container */
.chatbot-container {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 550px;
  max-height: calc(100vh - 150px);
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 9998;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

.chatbot-container.show {
  display: flex;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Chatbot Header */
.chatbot-header {
  background: linear-gradient(135deg, #003366, #0055aa);
  color: white;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 20px 20px 0 0;
}

.chatbot-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chatbot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.chatbot-header-text h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.chatbot-header-text p {
  margin: 0;
  font-size: 12px;
  opacity: 0.9;
}

.chatbot-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.chatbot-close:hover {
  transform: rotate(90deg);
}

/* Chatbot Messages */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f5f7fa;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: #e0e0e0;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: #003366;
  border-radius: 3px;
}

/* Message Bubble */
.message {
  display: flex;
  gap: 10px;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.bot {
  justify-content: flex-start;
}

.message.user {
  justify-content: flex-end;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #003366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.message.user .message-avatar {
  background: #0055aa;
  order: 2;
}

.message-content {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
}

.message.bot .message-content {
  background: white;
  color: #333;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.message.user .message-content {
  background: linear-gradient(135deg, #003366, #0055aa);
  color: rgb(2, 2, 2);
  border-bottom-right-radius: 4px;
}

/* Quick Options */
.quick-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.option-button {
  background: white;
  border: 2px solid #003366;
  color: #003366;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.option-button:hover {
  background: #003366;
  color: white;
  transform: translateX(5px);
}

.option-button::before {
  content: "→";
  font-size: 16px;
  transition: transform 0.2s;
}

.option-button:hover::before {
  transform: translateX(3px);
}

/* Contact Info in Chat */
.contact-info {
  background: linear-gradient(135deg, #040405, #000000);
  padding: 16px;
  border-radius: 12px;
  border-left: 4px solid #003366;
}

.contact-info h4 {
  margin: 0 0 12px 0;
  color: #003366;
  font-size: 15px;
  font-weight: 600;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  font-size: 13px;
  color: #333;
}

.contact-item i {
  color: #003366;
  font-size: 16px;
  width: 20px;
}

.contact-item a {
  color: #0055aa;
  text-decoration: none;
  font-weight: 500;
}

.contact-item a:hover {
  text-decoration: underline;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  background: white;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  max-width: fit-content;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #003366;
  animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .chatbot-container {
    width: calc(100vw - 20px);
    height: calc(100vh - 120px);
    right: 10px;
    bottom: 80px;
  }

  .chatbot-button {
    width: 55px;
    height: 55px;
    right: 15px;
    bottom: 15px;
  }

  .message-content {
    max-width: 85%;
  }
}
