/* AI Chat Widget */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
}

.chat-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #054095;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(5, 64, 149, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.chat-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(5, 64, 149, 0.5);
}

.chat-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 48px);
  max-height: 480px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.chat-panel-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #054095;
  color: #fff;
}

.chat-title {
  font-weight: 600;
}

.chat-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  opacity: 0.9;
}

.chat-close:hover {
  opacity: 1;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  min-height: 200px;
  max-height: 320px;
}

.chat-msg {
  margin-bottom: 12px;
}

.chat-msg p {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  line-height: 1.5;
}

.chat-msg-bot p {
  background: #f0f4f8;
  color: #333;
  border-bottom-left-radius: 4px;
}

.chat-msg-user p {
  background: #054095;
  color: #fff;
  margin-left: 24px;
  border-bottom-right-radius: 4px;
}

.chat-input-wrap {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #eee;
}

.chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

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

.chat-send {
  padding: 10px 18px;
  background: #054095;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
}

.chat-send:hover:not(:disabled) {
  background: #043a7a;
}

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