/*
 * Case Converter Tools — Plugin CSS
 *
 * PHILOSOPHY: Minimal. The theme (.tool-shell) handles the outer shell.
 * This file ONLY styles elements that are specific to the plugin's
 * HTML output and are NOT handled by the theme.
 *
 * Target: < 6 KB minified.
 */

/* ─── INPUT / OUTPUT TEXTAREAS ─── */
.cct-textarea {
  display: block;
  width: 100%;
  font-family: var(--font-mono, 'DM Mono', 'Fira Mono', monospace);
  font-size: .9375rem;
  line-height: 1.65;
  color: var(--text, #1f2933);
  background: var(--bg, #f8f4ef);
  border: 1.5px solid var(--border, #e5e0d8);
  border-radius: var(--radius, 12px);
  padding: 1rem 1.125rem;
  resize: vertical;
  min-height: 140px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.cct-textarea:focus {
  border-color: var(--accent, #e85d26);
  box-shadow: 0 0 0 3px rgba(232,93,38,.12);
}
.cct-textarea--output {
  background: var(--bg-card, #fff);
  color: var(--text, #1f2933);
  cursor: text;
}

.cct-input-wrap  { margin-bottom: 1rem; }
.cct-output-wrap { margin-top: 1rem; }

/* ─── MODE BUTTONS ─── */
.cct-modes {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .25rem;
}

.cct-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--font-sans, 'DM Sans', system-ui, sans-serif);
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1;
  padding: .5rem .875rem;
  border: 1.5px solid var(--border, #e5e0d8);
  border-radius: 99px;
  background: var(--bg-card, #fff);
  color: var(--text, #1f2933);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .1s ease;
  white-space: nowrap;
}
.cct-btn:hover {
  border-color: var(--accent, #e85d26);
  background: var(--accent-light, #fff0e8);
  color: var(--accent, #e85d26);
}
.cct-btn:active {
  transform: translateY(1px);
}
.cct-btn.is-active,
.cct-btn:focus-visible {
  border-color: var(--accent, #e85d26);
  background: var(--accent-light, #fff0e8);
  color: var(--accent, #e85d26);
  outline: 2.5px solid var(--accent, #e85d26);
  outline-offset: 2px;
}

/* Primary (single-mode) convert button */
.cct-btn--primary {
  background: var(--accent, #e85d26);
  color: #fff;
  border-color: var(--accent, #e85d26);
  padding: .625rem 1.5rem;
  font-size: .9375rem;
  border-radius: var(--radius, 12px);
}
.cct-btn--primary:hover {
  background: var(--accent-dark, #c44d1a);
  border-color: var(--accent-dark, #c44d1a);
  color: #fff;
}

/* ─── ACTION BUTTONS ─── */
.cct-actions {
  display: flex;
  gap: .625rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.cct-btn--action {
  border-radius: var(--radius, 12px);
  font-size: .875rem;
  padding: .5rem 1rem;
}
.cct-btn--success {
  border-color: #16a34a !important;
  background: #f0fdf4 !important;
  color: #16a34a !important;
}
.cct-btn--error {
  border-color: #dc2626 !important;
  background: #fef2f2 !important;
  color: #dc2626 !important;
}

/* ─── STATS BAR ─── */
.cct-stats {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .875rem;
  font-size: .8rem;
  color: var(--text-muted, #6b7280);
  font-family: var(--font-mono, monospace);
}
.cct-stat__val {
  font-weight: 600;
  color: var(--text, #1f2933);
}
.cct-stat__sep { color: var(--border, #e5e0d8); }

/* ─── RESPONSIVE ─── */
@media (max-width: 480px) {
  .cct-modes { flex-direction: column; }
  .cct-btn--mode { width: 100%; justify-content: center; }
  .cct-btn--primary { width: 100%; justify-content: center; }
  .cct-actions { flex-direction: column; }
  .cct-btn--action { width: 100%; justify-content: center; }
}

/* ─── PRINT ─── */
@media print {
  .cct-modes, .cct-actions { display: none; }
  .cct-textarea { border: 1px solid #ccc; }
}