html, body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  font-family: 'Times New Roman', Times, serif;
}

/* Header Banner */
.header-banner {
  background-color: #551d75;
  padding: 25px 10px;
  text-align: center;
}

.header-title {
  color: #ffffff;
  font-size: 4rem;
  font-weight: bold;
  margin: 0;
}

/* Back Link */
.back-link {
  display: inline-block;
  margin: 25px 0 0 40px;
  color: #005b94;
  text-decoration: underline;
  font-weight: bold;
  font-size: 1.1rem;
}

/* Single Column Vertical Stack */
.grid-container {
  max-width: 1000px; /* Adjusted width for a clean vertical list layout */
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr; /* 1 column so each button takes up its own row */
  gap: 18px; /* Vertical space between rows */
}

/* Rounded Corner Rectangular Buttons */
.unit-button {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 65px;
  background-color: #551d74;
  color: #ffffff;
  font-size: 1.7rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 14px;
  text-align: center;
  padding: 10px 15px;
  box-sizing: border-box;
  box-shadow: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Glowing Effect strictly on Hover */
.unit-button:hover {
  background-color: #88609e;
  transform: translateY(0px);
  box-shadow: 0 0 25px 6px rgba(0, 91, 148, 0.55);
}

.unit-button:active {
  transform: scale(0.98);
}

/* Chat button styling */
.chat-toggle-btn {
  position: fixed;
  bottom: 75px;
  right: 75px;
  background-color: #551d75;
  color: white;
  border: none;
  border-radius: 30px;
  padding: 12px 20px;
  font-size: 18px;
  font-weight: normal;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1000; /* Arbitrary, just to ensure it sits on top */
  transition: background-color 0.2s, transform 0.2s;
}

/* Same glowing effect as unit-button */
.chat-toggle-btn:hover {
  background-color: #9031c6;
  transform: translateY(0px);
  box-shadow: 0 0 25px 6px rgba(0, 91, 148, 0.55);
  transform: scale(1.1);

}

/* Chat window styling*/
.chat-window {
  position: fixed;
  bottom: 150px;
  right: 60px;
  width: 320px;
  height: 500px;
  background-color: #e6e3dd; /*Just a testing color, will be changed*/
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2s);
  display: flex;
  flex-direction: column;
  z-index: 1001;
  overflow: hidden;
  font-family: inherit;
  transition: opacity 0.25s ease, transform 0.25s ease;
  overflow: auto; /* Scrollable*/
}

/*Toggling between hidden and not-hidden state*/
.chat-window.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none; /*Disablying clicks which hidden*/
}

/* Header Bar for chat*/
.chat-header {
  background-color: #551d75;
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: normal;
}

#chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
}

/* Chat Body Content */
.chat-body {
    padding: 20px;
    flex-grow: 1;
    background-color: #f4f6f8;
}

.chat-greeting {
    margin: 0;
    color: #334155;
    font-size: 14px;
    background: #e2e8f0;
    padding: 10px 14px;
    border-radius: 10px;
    display: inline-block;
}

.chat-footer {
  display: flex;
  padding: 12px;
  background-color: #551d75;
  border-top: 1px solid #98a8c9;
  gap: 30px;
}

.chat-footer input {
  flex-grow: 1;
  padding: 8px 12px;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: normal;
}

#chat-send-btn {
  background-color: #88609e;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  font-weight: normal;
  padding: 8px 14px;
}

#chat-send-btn:hover {
  background-color: #9073a0; /*Color for testing, will be changed*/
  transform: translateY(0px);
  box-shadow: 0 0 25px 6px rgba(0, 91, 148, 0.55);
  transform: scale(1.1);
}

/* Loading Animation Styles */
.typing-dots {
    display: inline-block;
    font-size: 0;
}

.typing-dots span {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 2px;
    background-color: #551d75;
    border-radius: 50%;
    animation: bounce 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 bounce {
    0%, 80%, 100% { 
        transform: scale(0); 
    }
    40% { 
        transform: scale(1.0); 
    }
}

.typing-dots span:nth-child(1) { 
    animation-delay: -0.32s; 
}

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

@keyframes bounce {
    0%, 80%, 100% { 
        transform: scale(0); 
    }
    40% { 
        transform: scale(1.0); 
    }
}

