/* --- All-in-One PDF Tool Specific Styles --- */
.tool-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 25px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.tool-container h2 {
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 2.2em;
}

.tool-description {
  color: #555;
  margin-bottom: 30px;
  font-size: 1.1em;
  line-height: 1.6;
}

.tool-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
  border-bottom: 2px solid #eee;
  overflow-x: auto; /* For smaller screens */
}

.tab-button {
  background-color: #f0f0f0;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 1em;
  font-weight: bold;
  color: #555;
  border-radius: 8px 8px 0 0;
  transition: background-color 0.3s ease, color 0.3s ease;
  margin: 0 2px;
  white-space: nowrap; /* Prevent wrapping */
}

.tab-button.active {
  background-color: #3498db;
  color: white;
  border-bottom: 2px solid #3498db; /* Highlight active tab */
}

.tab-button:hover:not(.active) {
  background-color: #e0e0e0;
}

.tab-content {
  display: none;
  padding: 20px 0;
  text-align: left;
}

.tab-content.active {
  display: block;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #34495e;
  font-size: 1.05em;
}

input[type="file"] {
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #f9f9f9;
  font-size: 1em;
  box-sizing: border-box;
}

input[type="text"],
input[type="number"],
input[type="color"],
select,
textarea {
  width: calc(100% - 22px); /* Account for padding and border */
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1em;
  box-sizing: border-box;
}

input[type="file"]::file-selector-button {
  background-color: #3498db;
  color: white;
  padding: 8px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-right: 10px;
  transition: background-color 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
  background-color: #217dbb;
}

.tool-button {
  background-color: #27ae60;
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-top: 20px;
  display: inline-block; /* For centering */
}

.tool-button:hover {
  background-color: #229a55;
  transform: translateY(-2px);
}

.tool-button:active {
  transform: translateY(0);
}

.loading-message,
.error-message,
.success-message {
  margin-top: 20px;
  padding: 10px;
  border-radius: 5px;
  font-weight: bold;
  display: none; /* Hidden by default */
}

.loading-message {
  background-color: #f0f8ff;
  color: #3498db;
  border: 1px solid #aed6f1;
}

.error-message {
  background-color: #ffebee;
  color: #e74c3c;
  border: 1px solid #ef9a9a;
}

.success-message {
  background-color: #e8f5e9;
  color: #27ae60;
  border: 1px solid #a5d6a7;
}

.download-link {
  margin-top: 20px;
  display: inline-block;
  background-color: #3498db;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.download-link:hover {
  background-color: #217dbb;
}

.note {
  font-size: 0.9em;
  color: #666;
  margin-top: 15px;
  background-color: #f9f9f9;
  padding: 12px;
  border-left: 3px solid #aed6f1;
  border-radius: 4px;
  text-align: left;
}

/* Specific adjustments for inputs */
#splitPages,
#rotateAngle,
#pageNumStart,
#watermarkFontSize,
#watermarkOpacity {
  max-width: 200px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tool-container {
    padding: 15px;
  }
  .tab-button {
    padding: 10px 15px;
    font-size: 0.9em;
  }
  .tool-tabs {
    justify-content: flex-start; /* Align left for scroll */
  }
}
