.tool-section {
  margin: 2rem 0;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.tool-section label {
  display: block;
  margin: 0.5rem 0;
  font-weight: bold;
}

.tool-section textarea,
.tool-section input[type="text"],
.tool-section input[type="datetime-local"],
.tool-section select {
  width: 100%;
  padding: 0.5rem;
  font-family: monospace;
  border: 1px solid #999;
  background: #fff;
  color: #1a1a1a;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
}

.tool-section textarea:focus,
.tool-section input[type="text"]:focus,
.tool-section input[type="datetime-local"]:focus,
.tool-section select:focus {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

.tool-section textarea {
  resize: vertical;
}

.tool-section button {
  margin: 0.5rem 0.5rem 0.5rem 0;
  padding: 0.5rem 1rem;
  background: #0066cc;
  color: #ffffff;
  border: 2px solid #0066cc;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: background-color 0.2s, border-color 0.2s;
}

.tool-section button:hover {
  background: #0052a3;
  border-color: #0052a3;
}

.tool-section button:focus {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

.tool-section button:active {
  background: #003d7a;
  border-color: #003d7a;
}

.output-box {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(128, 128, 128, 0.08);
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 4px;
  font-family: monospace;
  white-space: pre-wrap;
  overflow-x: auto;
}

/* ARIA live region for screen readers */
[role="status"],
[role="alert"],
[aria-live] {
  /* Ensure announcements work properly */
}

/* Ensure output areas are announced */
#output,
#result,
#cert-output,
#cron-result,
#log-output,
#diff-output,
[id$="-output"],
[id$="-result"] {
  /* These IDs should have aria-live="polite" added via JS */
}

.success {
  padding: 1rem;
  background: rgba(14, 165, 233, 0.1);
  border-left: 4px solid #0ea5e9;
  border-radius: 4px;
  margin: 1rem 0;
}

.error {
  padding: 1rem;
  background: rgba(245, 158, 11, 0.1);
  border-left: 4px solid #f59e0b;
  border-radius: 4px;
  margin: 1rem 0;
  font-weight: 600;
}

/* Dark theme support */
.theme--dark .tool-section {
  border-color: rgba(255, 255, 255, 0.2);
}

.theme--dark .tool-section textarea,
.theme--dark .tool-section input[type="text"],
.theme--dark .tool-section input[type="datetime-local"],
.theme--dark .tool-section select {
  background: rgba(255, 255, 255, 0.05);
  color: #e5e5e5;
  border-color: rgba(255, 255, 255, 0.2);
}

.theme--dark .tool-section textarea:focus,
.theme--dark .tool-section input[type="text"]:focus,
.theme--dark .tool-section input[type="datetime-local"]:focus,
.theme--dark .tool-section select:focus {
  outline: 2px solid #4d9fff;
  outline-offset: 2px;
}

.theme--dark .tool-section button {
  background: #4d9fff;
  border-color: #4d9fff;
  color: #000000;
}

.theme--dark .tool-section button:hover {
  background: #6bb0ff;
  border-color: #6bb0ff;
}

.theme--dark .tool-section button:focus {
  outline: 2px solid #4d9fff;
  outline-offset: 2px;
}

.theme--dark .tool-section button:active {
  background: #2e82ff;
  border-color: #2e82ff;
}

.theme--dark .output-box {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}
