/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  margin: 0;
  padding: 0;
  background-color: #f6f8fa;
  height: 100vh;
}

/* Chat Widget Container */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

/* Chat Button */
.chat-button {

  background: #004b91;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 75, 145, 0.3);
  transition: all 0.3s ease;
  border: none;
}

.chat-button:hover {
  background: #003c77;
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 75, 145, 0.4);
}

/* Chat Container */
.chat-container {
  position: absolute;
 
  right: 0;
  width: 100%;
 height: 100vh;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  visibility: hidden;
  transition: all 0.3s ease;
}

.chat-container.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

/* Chat Header */
.chat-header {
  background: #004b91;
  color: white;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-title {
  font-size: 16px;
  font-weight: 600;
}

.close-button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Chat Box */
.chat-box {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fafafa;
}

/* Messages */
.message {
  padding: 12px 16px;
  border-radius: 16px;
  max-width: 85%;
  line-height: 1.4;
  word-wrap: break-word;
  font-size: 14px;
  animation: messageAppear 0.3s ease;
}

@keyframes messageAppear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user {
  align-self: flex-end;
  background: #004b91;
  color: white;
  border-bottom-right-radius: 4px;
}

.bot {
  align-self: flex-start;
  background: white;
  color: #333;
  border: 1px solid #e1e5e9;
  border-bottom-left-radius: 4px;
}

/* Typing indicator */
.typing-indicator {
  background: white !important;
  border: 1px solid #e1e5e9 !important;
  padding: 12px 16px;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  height: 8px;
  width: 8px;
  border-radius: 50%;
  background-color: #666;
  display: inline-block;
  animation: typing 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Button layout */
.button-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
  width: 100%;
}

.button-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.button-row .option-button {
  flex: 1;
  min-width: 0;
}

.option-button {
  background: #f0f4f8;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  color: #333;
  word-wrap: break-word;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.option-button:hover {
  background: #e1e8f0;
  border-color: #004b91;
}

.option-button:active {
  background: #d0d7de;
}

/* Input Box */
.input-box {
  display: flex;
  border-top: 1px solid #e1e5e9;
  padding: 12px;
  background: white;
}

.input-box input {
  flex: 1;
  border: 1px solid #d0d7de;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.input-box input:focus {
  border-color: #004b91;
}

.input-box input:disabled {
  background-color: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
  border-color: #e9ecef;
}

.input-box button {
  background: #004b91;
  color: white;
  border: none;
  padding: 12px 16px;
  margin-left: 8px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
  min-width: 60px;
}

.input-box button:hover {
  background: #003c77;
}

.input-box button:disabled {
  background: #a0a0a0;
  cursor: not-allowed;
}

.input-box button:disabled:hover {
  background: #a0a0a0;
}

/* Style for links in messages */
.message a {
  color: #004b91;
  text-decoration: none;
  font-weight: 500;
}

.message a:hover {
  text-decoration: underline;
}

/* Scrollbar styling */
.chat-box::-webkit-scrollbar {
  width: 6px;
}

.chat-box::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.chat-box::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.chat-box::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Responsive design */
@media (max-width: 480px) {
  .chat-container {
    width: calc(100vw - 40px);
    height: 70vh;
    right: 20px;
    bottom: 80px;
  }
  
  .chat-widget {
    right: 20px;
    bottom: 20px;
  }
}