/* Chatbot Styles */
.chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2878c0 0%, #1e5f99 100%);
  border: none;
  box-shadow: 0 4px 20px rgba(40, 120, 192, 0.4);
  cursor: pointer;
  z-index: 9999;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.chat-fab:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(40, 120, 192, 0.6);
}

.chat-fab svg {
  width: 28px;
  height: 28px;
  fill: white;
}

.chat-notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e87722;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.chat-overlay.active {
  opacity: 1;
  visibility: visible;
}

.chat-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 420px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 150px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.chat-window.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chat-header {
  background: linear-gradient(135deg, #2878c0 0%, #1e5f99 100%);
  padding: 1.25rem;
  border-radius: 16px 16px 0 0;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-logo {
  height: 32px;
  width: auto;
}

.chat-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.chat-subtitle {
  font-size: 0.875rem;
  opacity: 0.9;
  margin: 0;
}

.chat-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
}

.chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.chat-close-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.chat-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.chat-step {
  display: none;
}

.chat-step.active {
  display: block;
}

.chat-topics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 1.5rem;
}

.chat-topic-btn {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.chat-topic-btn:hover {
  border-color: #2878c0;
  background: rgba(40, 120, 192, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(40, 120, 192, 0.2);
}

.chat-topic-btn svg {
  width: 32px;
  height: 32px;
  color: #2878c0;
}

.chat-topic-btn span {
  font-weight: 600;
  font-size: 0.875rem;
  color: #0d1b2a;
}

.chat-topic-btn p {
  font-size: 0.75rem;
  color: #6b6b6b;
  margin: 0;
}

.chat-selected-topic {
  padding: 1rem 1.5rem;
  background: rgba(40, 120, 192, 0.1);
  border-left: 4px solid #2878c0;
  margin: 1.5rem 1.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

.chat-selected-topic strong {
  color: #2878c0;
  font-weight: 600;
}

.chat-answer-content {
  padding: 1.5rem;
}

.chat-answer-question {
  padding: 1rem;
  background: rgba(40, 120, 192, 0.1);
  border-left: 4px solid #2878c0;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.chat-answer-question strong {
  color: #2878c0;
  font-weight: 600;
  font-size: 0.9375rem;
}

.chat-answer-text {
  background: #f9fafb;
  padding: 1.25rem;
  border-radius: 8px;
  line-height: 1.6;
  color: #0d1b2a;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.chat-answer-actions {
  display: flex;
  gap: 0.75rem;
}

#chatbot-form {
  padding: 0 1.5rem 1.5rem;
}

.chat-form-group {
  margin-bottom: 1rem;
}

.chat-form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: #0d1b2a;
}

.chat-form-group input,
.chat-form-group textarea,
.chat-form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.chat-form-group input:focus,
.chat-form-group textarea:focus,
.chat-form-group select:focus {
  outline: none;
  border-color: #2878c0;
  box-shadow: 0 0 0 3px rgba(40, 120, 192, 0.1);
}

.chat-form-group select {
  appearance: auto;
  background-color: #fff;
  cursor: pointer;
}

.chat-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.chat-form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.chat-btn-primary,
.chat-btn-secondary {
  flex: 1;
  padding: 0.875rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.chat-btn-primary {
  background: #2878c0;
  color: white;
}

.chat-btn-primary:hover {
  background: #1e5f99;
  box-shadow: 0 4px 15px rgba(40, 120, 192, 0.3);
}

.chat-btn-secondary {
  background: white;
  color: #2878c0;
  border: 2px solid #2878c0;
}

.chat-btn-secondary:hover {
  background: rgba(40, 120, 192, 0.05);
}

.chat-success-content {
  padding: 3rem 1.5rem;
  text-align: center;
}

.chat-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  color: #16a34a;
}

.chat-success-content h3 {
  font-size: 1.5rem;
  color: #0d1b2a;
  margin: 0 0 0.75rem;
}

.chat-success-content p {
  color: #6b6b6b;
  margin: 0 0 1.5rem;
  line-height: 1.6;
}

.chat-success-content .chat-btn-primary {
  width: 100%;
}

@media (max-width: 768px) {
  .chat-window {
    bottom: 0;
    right: 0;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .chat-topics-grid {
    grid-template-columns: 1fr;
  }

  .chat-header {
    border-radius: 0;
  }
}
