/* main.css */
/* Version: 0.1.1 */

body {
  width: 100vw; /* Ensure body takes up the full viewport width */
  min-height: 100vh; /* Ensure it takes up at least the full viewport height */
  overflow-x: hidden; /* Prevent horizontal scrolling */
  font-family: 'Roboto', 'Helvetica', Arial, sans-serif;
  font-weight: 400; /* Normal weight */
  margin: 0;
  padding: 0;
  color: #333; /* Slightly softer than pure black */
  display: block; /* Ensure body is visible */
}
 
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  position: relative;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  height: 80px;
  margin-right: 10px;
}

/* Container styles */
.header-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: fit-content;
  text-align: center;  /* Add this */
  padding: 0;         /* Add this */
  margin: 0;          /* Add this */
}

/* Header text styles */
.header-text {
  /* Remove absolute positioning since container handles it */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.header-text h2, .header-text h3 {
  margin: 0;
}

.header-text h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: #00b4ff; /* #00a3ff /* #007ab8; */
}

.ross-logo {
  height: 32px;
  width: auto;
}

.header-text h3 {
  font-size: 18px;
  font-weight: normal;
}

.user-info {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 10px; /* Add space between header elements */
}

/* Ensure consistent font for dropdown items */
.dropdown-item, 
#add-ons-dropdown,
.add-on-option {
  font-family: 'Roboto', 'Helvetica', Arial, sans-serif;
  font-size: 16px;
}

main {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 100px); /* Adjust based on your header height */
  padding: 0;
}

/* Comment out the rule temporarily */
/* Hide everything in core chat container except button container when not authenticated */
/*
body:not(.authenticated) #core-chat-container > *:not(#button-container) {
  display: none;
}
*/

#button-container {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
}

#response-container {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
}

#api-response {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  white-space: pre-wrap;
  text-align: left;
  font-size: 16px;
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

#api-response p {
  margin-bottom: 15px;
} 

#question-input {
  flex-grow: 1;
  margin-right: 10px;
  resize: none;
  overflow: hidden;
  padding: 15px;
  font-size: 16px; /* Original size */
  border: 1px solid #555;
  border-radius: 4px;
} 

.send-hint {
  font-size: 12px;
  margin-left: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spin {
  animation: spin 1s linear infinite;
}

/* New class for hiding elements */
.hidden {
  display: none;
}

/* Styles for add-on container */
#addon-container {
  position: absolute;
  top: 60px; /* Adjust based on your header height */
  left: 0;
  right: 0;
  bottom: 0;
  overflow: auto; /* Revert to original state */
}

#addon-container > * {
  width: 100%;
  height: 100%;
}

#drawings-canvas {
  width: 100%;
  height: calc(100% - 60px);
}

/* Debug borders for centering */
/* Commented out but kept for future debugging
.header-container {
  border: 1px solid red;
}
.header-text {
  border: 1px solid blue;
}
.qa-mode-toggle {
  border: 1px solid green;
}
.toggle-buttons {
  border: 1px solid yellow;
}
.mode-button {
  border: 1px solid purple;
}
.toggle-label {
  border: 1px solid orange;
}
*/

/* ------------------------------------------ */
/* Responsive adjustments for header          */
/* ------------------------------------------ */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
    padding: 5px;
  }
  .logo-container {
    margin-bottom: 5px;
  }
  .logo {
    height: 50px;
  }
  .header-container {     /* Change this from header-text */
    position: static;     /* Remove absolute positioning on mobile */
    transform: none;      /* Remove transform on mobile */
    margin: 5px 0;
  }
  .header-text {
    text-align: center;  /* Keep text alignment */
  }
  .header-text h2 {
    font-size: 18px;
  }
  .header-text h3 {
    font-size: 14px;
  }
  .user-info {
    margin-left: 0;
    margin-top: 5px;
  } 
}