/* Clean Water Project System - Chatbot Styles */

:root {
  --primary-blue: #1E3A8A;
  --accent-blue: #0EA5E9;
  --accent-green: #10B981;
  --light-bg: #F3F4F6;
  --dark-text: #1F2937;
  --white: #FFFFFF;
  --gray-100: #F9FAFB;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --border-radius: 0.375rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--dark-text);
  background-color: var(--light-bg);
  line-height: 1.5;
}

/* Chat Launcher */
.chat-launcher {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--accent-blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  transition: all 0.3s ease;
}

.chat-launcher:hover {
  transform: scale(1.05);
  background-color: var(--primary-blue);
}

.chat-launcher-icon {
  font-size: 1.5rem;
}

/* Chat Container */
.chat-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 350px;
  height: 500px;
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  display: none;
}

.chat-container.active {
  display: flex;
}

/* Chat Header */
.chat-header {
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-logo {
  display: flex;
  align-items: center;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
}

.chat-logo i {
  margin-right: 0.5rem;
  font-size: 1.25rem;
}

.chat-minimize-btn {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.chat-minimize-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Chat Body */
.chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.message {
  margin-bottom: 1rem;
  max-width: 80%;
  display: flex;
  flex-direction: column;
}

.bot-message {
  align-self: flex-start;
}

.user-message {
  align-self: flex-end;
}

.message-content {
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.bot-message .message-content {
  background-color: var(--light-bg);
  border-top-left-radius: 0;
}

.user-message .message-content {
  background-color: var(--accent-blue);
  color: var(--white);
  border-top-right-radius: 0;
}

.message p {
  margin: 0;
}

.message ul {
  margin: 0.5rem 0 0 1.5rem;
}

.message-time {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
  align-self: flex-end;
}

/* Chat Input */
.chat-input {
  padding: 1rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
}

.chat-input input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.chat-input input:focus {
  border-color: var(--accent-blue);
}

.chat-input button {
  background-color: var(--accent-blue);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  width: 40px;
  height: 40px;
  margin-left: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.chat-input button:hover {
  background-color: var(--primary-blue);
}

.chat-input button:disabled {
  background-color: var(--gray-400);
  cursor: not-allowed;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background-color: var(--gray-400);
  border-radius: 50%;
  margin: 0 2px;
  display: inline-block;
  animation: typing 1.4s infinite both;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Quick Reply Buttons */
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.quick-reply-btn {
  background-color: var(--light-bg);
  border: 1px solid var(--gray-300);
  border-radius: 1rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quick-reply-btn:hover {
  background-color: var(--accent-blue);
  color: var(--white);
  border-color: var(--accent-blue);
}

/* Responsive Styles */
@media (max-width: 576px) {
  .chat-container {
    width: 100%;
    height: 100%;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }
  
  .chat-launcher {
    bottom: 1rem;
    right: 1rem;
  }
}
