/* TTB JSON Formatter/Validator styles */
.ttb-tool {
  max-width: 960px;
  margin: 24px auto;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, sans-serif;
}

.ttb-header h2 {
  margin: 0 0 4px 0;
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 800;
}

.ttb-sub { margin: 0 0 16px 0; color: #6b7280; font-size: 0.95rem; }

.ttb-section { margin: 16px 0; }

.ttb-label { display: block; font-weight: 600; margin-bottom: 8px; }

.ttb-textarea {
  width: 100%;
  min-height: 160px;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  background: #f9fafb;
  color: #111827;
  outline: none;
  transition: box-shadow .15s, border-color .15s, background .15s;
}

.ttb-textarea:focus {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.15);
}

.ttb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 4px;
}

.ttb-btn {
  appearance: none;
  border: 1px solid #3b82f6;
  background: #3b82f6;
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .05s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: 0 6px 18px rgba(59,130,246,0.25);
}

.ttb-btn:hover { filter: brightness(1.05); }
.ttb-btn:active { transform: translateY(1px); }

.ttb-btn.alt {
  background: #10b981;
  border-color: #10b981;
  box-shadow: 0 6px 18px rgba(16,185,129,0.25);
}

.ttb-btn.ghost {
  background: transparent;
  color: #374151;
  border-color: #d1d5db;
  box-shadow: none;
}

.ttb-btn.copy {
  background: #6b7280;
  border-color: #6b7280;
  box-shadow: 0 6px 18px rgba(107,114,128,0.25);
}

.ttb-copy-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.ttb-copy-status { font-size: 0.9rem; color: #059669; }

.ttb-error {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 10px;
  font-size: 0.92rem;
  white-space: pre-wrap;
}

.ttb-ok {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  border-radius: 10px;
  font-size: 0.92rem;
}

.ttb-help { margin-top: 8px; color: #4b5563; }
.ttb-help summary { cursor: pointer; font-weight: 600; }

@media (max-width: 640px) {
  .ttb-tool { padding: 16px; border-radius: 14px; }
  .ttb-textarea { font-size: 0.93rem; }
}
