/* Modern Font Stack */
* {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin: 0;
  padding: 0;
  background: #f5f7fa;
  min-height: 100vh;
  color: #1a1a1a;
  line-height: 1.6;
}

/* Focus styles */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(75, 107, 251, 0.25);
}


/* Footer */
footer {
  background: transparent !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
  padding: 24px 0;
  margin-top: 40px;
}

footer .container {
  color: #6b7280;
  font-size: 14px;
}

/* Chat Container Styles */
.chat-container {
  max-width: 900px;
  margin: 40px auto;
  height: calc(100vh - 160px);
  min-height: 600px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.chat-header {
  background: linear-gradient(135deg, #4b6bfb 0%, #5b7cff 100%);
  color: white;
  padding: 24px 32px;
  text-align: center;
  border-bottom: none;
}

.chat-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.chat-subtitle {
  margin: 6px 0 0 0;
  font-size: 14px;
  opacity: 0.95;
  font-weight: 400;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.message {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-message {
  justify-content: flex-end;
}

.bot-message {
  justify-content: flex-start;
}

.message-content {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 16px;
  word-wrap: break-word;
  line-height: 1.5;
  font-size: 15px;
}

.user-message .message-content {
  background: #4b6bfb;
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(75, 107, 251, 0.2);
}

.bot-message .message-content {
  background: #ffffff;
  color: #1a1a1a;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.message-content p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.chat-input-container {
  padding: 20px 24px;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.input-wrapper {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  max-width: 100%;
}

.chat-input {
  flex: 1;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  resize: none;
  max-height: 120px;
  font-family: inherit;
  transition: all 0.2s ease;
  background: #ffffff;
  color: #1a1a1a;
  line-height: 1.5;
}

.chat-input::placeholder {
  color: #9ca3af;
}

.chat-input:focus {
  outline: none;
  border-color: #4b6bfb;
  box-shadow: 0 0 0 3px rgba(75, 107, 251, 0.1);
}

.chat-input:disabled {
  background: #f9fafb;
  cursor: not-allowed;
}

.send-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  border: none;
  background: #4b6bfb;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(75, 107, 251, 0.2);
}

.send-button:hover:not(:disabled) {
  background: #3b5be8;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(75, 107, 251, 0.3);
}

.send-button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(75, 107, 251, 0.2);
}

.send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.send-button svg {
  width: 18px;
  height: 18px;
}

/* Scrollbar styling - Modern and unobtrusive */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Typing indicator */
.typing-indicator {
  display: inline-flex;
  gap: 5px;
  padding: 4px 0;
  align-items: center;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9ca3af;
  animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* Chat Suggestions */
.chat-suggestions {
  padding: 20px 24px;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  animation: fadeIn 0.3s ease-in;
  max-height: 200px;
  overflow-y: auto;
}

.chat-input-container {
  border-bottom: none;
}

.chat-suggestions.hidden {
  display: none;
}

.suggestions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  max-width: 100%;
}

.suggestion-button {
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  color: #374151;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  font-weight: 400;
}

.suggestion-button:hover {
  border-color: #4b6bfb;
  background: #f0f4ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(75, 107, 251, 0.12);
  color: #1a1a1a;
}

.suggestion-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(75, 107, 251, 0.1);
}

.suggestion-button span {
  display: block;
  line-height: 1.4;
}

/* Responsive design */
@media (max-width: 768px) {
  .chat-container {
    margin: 16px;
    height: calc(100vh - 100px);
    min-height: 500px;
    border-radius: 12px;
  }
  
  .chat-header {
    padding: 20px 24px;
  }
  
  .chat-title {
    font-size: 20px;
  }
  
  .chat-subtitle {
    font-size: 13px;
  }
  
  .chat-messages {
    padding: 20px 16px;
    gap: 12px;
  }
  
  .message-content {
    max-width: 85%;
    padding: 10px 14px;
    font-size: 14px;
  }
  
  .chat-input-container {
    padding: 16px;
  }
  
  .chat-input {
    font-size: 14px;
    padding: 10px 14px;
  }
  
  .send-button {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }
  
  .send-button svg {
    width: 16px;
    height: 16px;
  }
  
  .suggestions-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .chat-suggestions {
    padding: 16px;
  }
  
  .suggestion-button {
    padding: 10px 14px;
    font-size: 13px;
  }
  
  footer {
    padding: 20px 0;
    margin-top: 24px;
  }
}

@media (max-width: 480px) {
  .chat-container {
    margin: 12px;
    height: calc(100vh - 80px);
  }
  
  .chat-header {
    padding: 16px 20px;
  }
  
  .chat-title {
    font-size: 18px;
  }
  
  .chat-messages {
    padding: 16px 12px;
  }
  
  .message-content {
    max-width: 90%;
  }
}
