:root {
  --background-color: #f5f5f5;
  --primary-color: #2c3e50;
  --accent-color: #e67e22;
  --border-color: #bdc3c7;
}

/* Dark mode variables (used when .dark-mode is applied) */
body.dark-mode {
  --background-color: #2c3e50;
  --primary-color: #ecf0f1;
  --accent-color: #e67e22;
  --border-color: #7f8c8d;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  background-color: var(--background-color);
  color: var(--primary-color);
}

/* Modal covers full viewport */
.modal {
  display: flex;
  position: fixed;
  z-index: 2;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: #092b5a;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 95%;
  height: 95%;
  background-color: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-sizing: border-box;
}

.header-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 20px;
}

.chat-header {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 10px;
}

body.dark-mode .modal-content {
  background-color: #34495e;
  color: var(--primary-color);
}

/* Profile Card */
.profile-card {
  display: flex;
  align-items: center;
  background-color: var(--background-color);
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  width: 100%;
  max-width: 350px;
  margin-bottom: 10px;
}

.profile-photo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
}

.profile-info h2 {
  margin: 0;
  font-size: 18px;
}

.profile-info p {
  margin: 2px 0;
  font-size: 14px;
}

.profile-links a {
  margin-right: 5px;
  font-size: 14px;
  color: var(--accent-color);
  text-decoration: none;
}

/* Chat Section */
.chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #ecf0f1;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 20px;
  overflow-y: auto;
}

.chat-history {
  flex: 1;
  overflow-y: auto;
}

/* Input Section */
.input-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

/* Input styling */
#userInput {
  flex: 1;
  padding: 10px;
  font-size: 16px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.mic-icon{
  height:30px;
  width:30px;
}

.search-button {
  padding: 10px;
  background-color: var(--accent-color);
  border: 1px solid var(--border-color);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.search-button:hover {
  background-color: #c05b16; 
}

/* Button styling for input section and dark mode toggle */
.header-row {
  display: flex;
  justify-content: space-between; /* pushes items to the ends */
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
}

#darkModeToggle {
  padding: 10px 20px;
  background-color: var(--accent-color);
  border: none;
  cursor: pointer;
  font-weight: bold;
  color: #fff;
  border-radius: 5px;
}


/* Action Buttons */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.action-buttons button {
  padding: 8px 12px;
  background-color: var(--accent-color);
  border: none;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

/* Chat messages */
.chat-message {
  margin-bottom: 10px;
  opacity: 0;
  animation: fadeIn 0.5s forwards;
}

.user-message {
  font-size: 18px;
  font-weight: 300;
  text-align: right;
  color: black;
}

.ai-message {
  font-size: 18px;
  font-weight: 300;
  text-align: left;
  color: black;
}

/* Fade-in animation */
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.typing-indicator {
  font-style: italic;
}

.typing-indicator .dot {
  display: inline-block;
  animation: blink 1.4s infinite both;
}

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

@keyframes blink {
  0% { opacity: .2; }
  20% { opacity: 1; }
  100% { opacity: .2; }
}
