/* style.css */
/* Version: 1.3 Hourly Token Refresh with Retry */

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: #f2f2f2;
}

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

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

.header-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: 20px;
}

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

.header-text h2 {
  font-size: 24px;
  font-weight: bold;
}

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

.user-info {
  display: flex;
  align-items: center;
}

.dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
  font-size: 16px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  right: 0;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-menu a:hover {
  background-color: #f1f1f1;
}

.version {
  display: block;
  padding: 8px 16px;
  font-size: 12px;
  color: #888;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 70vh;
  padding: 20px;
  text-align: center;
}

#button-container {
  position: absolute;
  top: 20px;
  right: 20px;
}

#button-container button {
  padding: 10px 20px;
  font-size: 16px;
  margin: 0 10px;
}

#prompt-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  max-width: 800px;
  margin-bottom: 20px;
}

.input-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  max-width: 800px;
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#question-input {
  width: calc(100% - 120px);
  margin-bottom: 0;
  resize: vertical;
  padding: 15px;
  font-size: 18px;
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px;
}

#submit-button {
  padding: 12px 20px;
  font-size: 16px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100px;
  margin-left: 10px;
}

#submit-button:hover {
  background-color: #45a049;
}

#response-container {
  width: 100%;
  max-width: 800px;
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 0;
}

#api-response {
  white-space: pre-wrap;
  text-align: left;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin: 0;
  padding: 0;
}

.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto;
}

.loading-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #ccc;
  border-top-color: #333;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}

.loading-text {
  font-size: 16px;
  color: #333;
}

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