/* Tool Container Styles */
#tool-container {
  font-family: Arial, sans-serif;
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  background-color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  color: #333;
  text-align: center;
}

/* Header Styles */
#tool-container h2 {
  text-align: center;
  font-size: 24px;
  margin-bottom: 20px;
  color: #444;
}

/* Input Section Row */
.input-section-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}

/* Input and Output Sections */
#tool-container .input-section,
#tool-container .output-section {
  margin-bottom: 20px;
}

/* Labels */
#tool-container label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  color: #555;
  text-align: left;
}

/* Select Dropdown */
#tool-container select {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #f9f9f9;
  color: #333;
}

/* Textarea */
#tool-container textarea {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-top: 5px;
  resize: vertical;
  background-color: #f9f9f9;
  color: #333;
}

/* Rewrite Paragraph Button */
#tool-container button {
  padding: 12px 20px;
  font-size: 16px;
  font-weight: bold;
  background-color: #007bff;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin: 20px auto;
  display: block;
}

/* Button Hover */
#tool-container button:hover {
  background-color: #0056b3;
}

/* Output Section Styles */
#tool-container .output-section {
  text-align: center;
}

#tool-container .output-section h2 {
  font-size: 20px;
  color: #444;
  margin-bottom: 10px;
}

/* Output Container with Flexbox */
.output-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#outputText {
  width: 100%;
  max-width: 800px;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #f4f4f9;
  color: #666;
  resize: vertical;
}

/* Copy and Clear buttons in one row */
.button-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Copy Button */
#copyButton {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: bold;
  background-color: #007bff;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#copyButton:hover {
  background-color: #0056b3;
}

/* Clear Button */
#clearButton {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: bold;
  background-color: #f44336;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#clearButton:hover {
  background-color: #d32f2f;
}

/* Spinner */
#spinner {
  text-align: center;
  margin-top: 10px;
  color: #007bff;
  font-weight: bold;
  display: none;
}

#spinner.hidden {
  display: none;
}

#spinner::after {
  content: "";
  display: inline-block;
  margin-left: 10px;
  width: 16px;
  height: 16px;
  border: 2px solid #007bff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
