/* ==================== GENERAL RESET ==================== */
body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  width: 100%;
  padding: 0;
  color: #231f20;
  background-color: white;
}

.outer-box {
  max-width: 900px;
  margin: auto;
  padding: 20px;
}

/* ==================== HEADER ==================== */
#main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: none;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

#main-header h1 {
  font-size: 28px;
  color: #0076cf;
  margin: 0;
}

.header-logo {
  height: 80px;
  max-width: 100%;
}

/* ==================== CHAT LABEL ==================== */
.chat-label-box {
  border: 2px solid #000;
  margin: 15px 0;
  padding: 8px 15px;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
  background-color: #f5f5f5;
}

.chat-label {
  display: block;
}

/* ==================== INTRO TEXT ==================== */
.intro {
  font-size: 14px;
  line-height: 1.5;
}

.intro p {
  margin-bottom: 15px;
  text-align: justify;
}

/* ==================== CONTACT INFO ==================== */
.contact-info {
  margin-top: 10px;
  font-size: 14px;
}

.email-btn {
  display: inline-block;
  background-color: #2e2a85;
  color: white;
  padding: 5px 10px;
  text-decoration: none;
  font-weight: bold;
}

.email-btn:hover {
  opacity: 0.85;
}

/* ==================== SUGGESTED TOPICS GRID ==================== */
.chat-wrapper {
  transition: all 0.4s ease;
}
.chat-layout-active {
  display: flex;
  flex-direction: column;
}
.chat-layout-active .chat-window {
  order: 1;
}
.chat-layout-active .chat-wrapper {
  order: 2;
  margin-top: 10px;
}

/* Style for each question container */
.question-box {
  border: 2px solid #2e2a85;
  color: #2e2a85;
  text-align: left;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 6px;
  background: none;
  position: relative;
  cursor: pointer;
}

/* On hover over question box, change background and button text color */
.question-box:hover {
  background-color: #2e2a85; /* blue */
}

.question-box:hover button {
  color: white;
}

/* Style buttons to fill the box width and keep consistent */
.question-box button {
  width: 100%;
  font-size: 14px;
  padding: 4px 6px;
  cursor: pointer;
  background-color: transparent; /* transparent so background color is from box */
  color: #2e2a85; 
  border: none;
  text-align: left;
  transition: color 0.3s ease;

}
/* Remove button hover background because box hover covers it */
.question-box button:hover {
  background-color: transparent;
  color: white;
}

/* Style for the inline answer inside the same box */
.inline-answer {
  margin-top: 0.75em;
  font-size: 1em;
  color: #444;
  background: #f9f9f9;
  padding: 10px;
  border-radius: 4px;
  border-top: 1px solid #ccc;
  white-space: pre-line; /* preserve line breaks */
}

.suggested-questions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}


.suggested-questions button::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg); /* pointing down */
  border: solid #2e2a85;
  border-width: 0 2px 2px 0;
  padding: 3px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.suggested-questions button:hover {
  background-color: #2e2a85;
  color: white;
}

.suggested-questions button:hover::after {
  border-color: white;
}

.question-box.active button::after {
  transform: translateY(-50%) rotate(-135deg); /* pointing up */
}
/* ==================== CHAT AREA ==================== */
/* Fixed header-style chat wrapper */
.chat-wrapper {
  position: relative;
  width: 100%;
  top: 0;
  left: 0;
  right: 0px;
  background: white;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding-top: 10px;
  gap: 10px;
}

.chat-bar {
  display: flex;
  align-items: center;
  flex: 1;
  border: 1px solid black;
  padding: 5px;
  background: #fff;
  border-radius: 6px;
}

.chat-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 8px;
  font-size: 16px;
  border-radius: 6px;
}

.input-icon {
  width: 30px;
  height: 30px;
  margin-right: 8px;
}

.send-btn {
  background-color: #0078d7;
  color: white;
  height: 45px;
  padding: 10px 15px;
  font-size: 16px;
  border: none;
  cursor: pointer;
  border-radius: 6px;
}

.send-btn:hover {
  background-color: #005fa3;
}

/* Chat Window Styles */
.chat-container{
  margin: 5px;
  width: 100%;
  border: 1px solid #f7f7f8;
  border-radius: 6px;
}
.chat-window {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: #f7f7f8;
  height: 80vh;
  overflow-y: auto;
  border-top: 1px solid #ddd;
  box-sizing: border-box;
}

.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.4;
  word-wrap: break-word;
}

.message.user {
  align-self: flex-end;
  background: #007bff;
  color: white;
  border-bottom-right-radius: 4px;
}

.message.bot {
  align-self: flex-start;
  background: white;
  color: #333;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border-bottom-left-radius: 4px;
}

/* Typing/Thinking animation */
.message.bot:contains("Thinking") {
  font-style: italic;
  opacity: 0.8;
}


/* ==================== FOOTER ==================== */
#footer {
  margin-top: 30px;
  text-align: center;
}

.footer-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 50px;
  margin-bottom: 15px;
  flex-wrap: nowrap; /* Prevent wrapping to new line */
}

.footer-logo {
  height: 90px; /* Larger logos */
  max-width: 100%;
}

.footer-photo {
  max-width: 90px; /* Smaller photo */
  border-radius: 8px;
}

.footer-contact p {
  color: #2e2a85;
  font-weight: bold;
}

/* ==================== MEDIA QUERIES ==================== */
/* Tablets (≤ 1024px) */
@media (max-width: 1024px) {
  #main-header h1 {
    font-size: 24px;
  }
  .suggested-questions {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large phones (≤ 768px) */
@media (max-width: 768px) {
  .outer-box {
    padding: 15px;
  }
  #main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .suggested-questions {
    grid-template-columns: 1fr;
  }
  .chat-wrapper {
    flex-direction: column;
    width: 99%;
    gap: 8px;
    position: relative; /* Allow stacking instead of fixed for smaller screens */
  }
  .chat-bar {
    width: 97%;
  }
  .send-btn {
    width: 100%;
  }

  .chat-window {
    height: 70vh;
    padding: 15px;
  }

  .message {
    font-size: 14px;
    padding: 10px 14px;
  }
}
.footer-logo {
    height: 60px;
  }

  .footer-photo {
    max-width: 70px;
  }
/* Small phones (≤ 480px) */
@media (max-width: 480px) {
  #main-header h1 {
    font-size: 20px;
  }
  .chat-label-box {
    font-size: 16px;
    padding: 6px 10px;
  }
  .chat-bar {
    align-items: stretch;
    width: 94%;
  }
  .chat-bar input {
    font-size: 12px;
    padding: 8px;
    margin-bottom: 8px;
  }
  .send-btn {
    font-size: 12px;
    padding: 8px;
    width: 100%;
  }
  .footer-row{
    gap: 17px;
  }
  .footer-logo {
    height: 40px;
  }

  .footer-photo {
    max-width: 50px;
  }
  
   .chat-window {
    height: 65vh;
  }

  .message {
    max-width: 90%;
  }
}
