/* CleverWerk Tools – Formulare & Ergebnisse (helles Natur-Theme) */

.tools-intro {
  color: var(--cw-color-text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.65;
  max-width: 44rem;
}

.tool-workspace {
  background: var(--cw-color-glass);
  backdrop-filter: var(--cw-blur);
  -webkit-backdrop-filter: var(--cw-blur);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--cw-radius-xl);
  padding: 1.75rem;
  box-shadow: var(--cw-shadow-sm);
  margin-bottom: 1.5rem;
}

.tool-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-width: 100%;
}

.tool-form-field,
.tool-form-options {
  margin-bottom: 1.15rem;
}

.tool-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--cw-color-text-muted);
}

.tool-form textarea,
.tool-form select,
.tool-form input[type='number'],
.tool-form input[type='text'],
.tool-form input[type='date'],
.tool-form input[type='datetime-local'],
.tool-form input[type='email'],
.tool-form input[type='password'] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.8rem 1rem;
  border: 1px solid var(--cw-color-border);
  border-radius: var(--cw-radius-md);
  background: var(--cw-color-surface-raised);
  color: var(--cw-color-text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--cw-transition), box-shadow var(--cw-transition);
}

.tool-form textarea:focus,
.tool-form select:focus,
.tool-form input:focus {
  outline: none;
  border-color: var(--cw-color-accent);
  box-shadow: 0 0 0 3px var(--cw-color-accent-muted);
}

.tool-form textarea {
  min-height: 9rem;
  resize: vertical;
  line-height: 1.55;
}

.tool-form-actions {
  margin-top: 0.5rem;
}

.tool-form-actions button,
.tool-form > button[type='submit'] {
  padding: 0.75rem 1.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 600px) {
  .tool-form {
    max-width: 40rem;
  }

  .tool-form-actions button,
  .tool-form > button[type='submit'] {
    width: auto;
    align-self: flex-start;
  }
}

.tool-result {
  margin-top: 1.75rem;
  background: var(--cw-color-surface-raised);
  border: 1px solid var(--cw-color-border);
  border-radius: var(--cw-radius-lg);
  padding: 1.5rem;
  max-width: 40rem;
  box-shadow: var(--cw-shadow-sm);
}

.tool-result h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 650;
  color: var(--cw-color-text);
}

.tool-result-html {
  line-height: 1.65;
}

.tool-result pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  line-height: 1.55;
  color: var(--cw-color-text);
}

.tool-stats {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tool-stats li {
  margin-bottom: 0.55rem;
  color: var(--cw-color-text-muted);
}

.tool-error {
  margin-top: 1.25rem;
  padding: 0.85rem 1.1rem;
  background: rgba(198, 40, 40, 0.08);
  border: 1px solid rgba(198, 40, 40, 0.25);
  border-radius: var(--cw-radius-sm);
  color: #b71c1c;
  max-width: 40rem;
}

.tool-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  color: var(--cw-color-accent-dark);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

.tool-back-link:hover {
  color: var(--cw-color-accent);
}
