/* Chat Box Styles */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: Arial, sans-serif;
}

.chat-toggle {
  width: 60px;
  height: 60px;
  background: #173b75;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  border: none;
  color: white;
  font-size: 24px;
  position: relative;
}

.chat-toggle:hover {
  background: #0f2a5a;
  transform: scale(1.1);
}

.chat-toggle.active {
  background: #173b75;
}

/* Notification badge */
.chat-toggle::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: #ff4444;
  border-radius: 50%;
  border: 2px solid white;
  animation: pulse 2s infinite;
}

.chat-toggle.active::after {
  display: none;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
  }
  
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
  }
  
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
  }
}

.chat-box {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  max-width: 90vw;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(20px) scale(0.8);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  max-height: 80vh;
  z-index: 9998;
}

.chat-box.active {
  transform: translateY(0) scale(1) !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

.chat-header {
  background: #173b75;
  color: white;
  padding: 16px 20px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.chat-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.chat-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.chat-body {
  padding: 20px;
  overflow-y: auto;
  max-height: 400px;
}

.chat-intro {
  margin-bottom: 20px;
  padding: 15px;
  background: #e3f2fd;
  border-radius: 8px;
  border-left: 3px solid #173b75;
}

.chat-intro p {
  margin: 0 0 10px 0;
  font-size: 14px;
  line-height: 1.4;
}

.chat-intro p:last-child {
  margin-bottom: 0;
}

.chat-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.success-content {
  text-align: center;
}

.success-content h4 {
  color: #173b75;
  margin: 0 0 10px 0;
}

.success-content ul {
  text-align: left;
  margin: 10px 0;
  padding-left: 20px;
}

.success-content li {
  margin-bottom: 5px;
  font-size: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.form-group input,
.form-group select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #173b75;
  box-shadow: 0 0 0 2px rgba(23, 59, 117, 0.1);
}

.chat-submit {
  background: #173b75;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top:10px;
}

.chat-submit:hover {
  background: #0f2a5a;
}

.chat-submit:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.success-message {
  background: #d4edda;
  color: #155724;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #c3e6cb;
  font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .chat-widget {
    bottom: 15px;
    right: 15px;
  }
  
  .chat-toggle {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  
  .chat-box {
    width: 300px;
    bottom: 70px;
    max-height: 70vh;
    z-index: 9998;
  }
  
  .chat-box.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
  }
  
  .chat-header {
    padding: 12px 16px;
  }
  
  .chat-body {
    padding: 16px;
    max-height: 300px;
  }
}

/* Animation for chat bubble effect */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.chat-toggle.bounce {
  animation: bounce 2s infinite;
}

/* Custom scrollbar */
.chat-body::-webkit-scrollbar {
  width: 6px;
}

.chat-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.chat-body::-webkit-scrollbar-thumb {
  background: #173b75;
  border-radius: 3px;
}

.chat-body::-webkit-scrollbar-thumb:hover {
  background: #0f2a5a;
}

.trust-text {
  color: #28a745 !important;
  font-weight: 600;
  font-size: 13px !important;
}