/* public/tool/styles.css */

/* Layout tweaks for the tool page */
.ch-tool-hero {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.ch-tool-copy p + p {
  margin-top: 0.75rem;
}

/* Form styling */

.ch-tool-form {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.ch-field {
  margin-bottom: 1.25rem;
}

.ch-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.ch-required {
  color: #dc2626;
  margin-left: 0.25rem;
}

.ch-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 0.75rem 0.8rem;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  resize: vertical;
  min-height: 140px;
}

.ch-field textarea:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.2);
  background-color: #f9fafb;
}

.ch-field-meta {
  margin-top: 0.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ch-char-counter {
  font-size: 0.8rem;
  color: #64748b;
}

.ch-char-counter.ch-counter-over {
  color: #b91c1c;
}

/* Error message */

.ch-error {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.5rem;
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  font-size: 0.9rem;
}

/* Progress bar */

.ch-progress {
  margin: 0.75rem 0 1rem;
  height: 4px;
  width: 100%;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  position: relative;
}

.ch-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #22c55e);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.3s ease-out;
}

.ch-progress.ch-progress-active .ch-progress-bar {
  transform: scaleX(0.35);
}

/* Actions */

.ch-actions {
  margin-top: 0.75rem;
}

.ch-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: #0f766e;
  color: #f9fafb;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 10px 18px rgba(15, 118, 110, 0.25);
}

.ch-cta-primary:hover:not(:disabled) {
  background: #115e59;
}

.ch-cta-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.ch-helper-text {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: #64748b;
}

/* Info banners */

.ch-info-banner {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  background: #ecfeff;
  border: 1px solid #67e8f9;
  color: #0f172a;
}

.ch-info-soft {
  margin-top: 1.5rem;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* Results styling */

.ch-results-section {
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

.ch-results-wrapper {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.ch-results-visible {
  opacity: 1;
  transform: translateY(0);
}

.ch-result-block {
  margin-top: 1.25rem;
  padding: 1.25rem 1.3rem;
  border-radius: 0.9rem;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.04);
}

.ch-result-block h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.ch-result-summary {
  margin: 0.25rem 0 0;
  font-size: 0.96rem;
  color: #0f172a;
}

.ch-result-list {
  list-style: disc;
  padding-left: 1.3rem;
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  color: #0f172a;
}

.ch-result-list li + li {
  margin-top: 0.3rem;
}

.ch-muted {
  margin-top: 0.15rem;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: #6b7280;
}

/* Centered CTA section */

.ch-center {
  text-align: center;
}

/* Small responsive tweak */

@media (max-width: 768px) {
  .ch-tool-form {
    padding: 1.1rem;
  }

  .ch-result-block {
    padding: 1rem 1rem;
  }
}

