/* Content input card. Split from the single original stylesheet; zero visual change. */

/* Decision 25: rounded-rectangle center (supersedes Decision 19 oval) —
 * generous corner radius, no border stroke, subtle shadow. Transparent
 * borderless textarea. Focus indicator follows the rounded-rectangle curve. */
.center-card.center-rounded {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: var(--panel);
  border: none;
  border-radius: 24px;
  padding: 1.4rem 2.2rem;
  /* Decision 33: white card on paper — soft shadow, no glow. */
  box-shadow: 0 2px 12px rgba(60, 45, 30, 0.08),
              0 8px 32px rgba(60, 45, 30, 0.06);
}

.center-rounded #content-box {
  border: none;
  background: transparent;
  padding: 0.5rem 0.25rem;
  text-align: center;
  resize: none; /* Decision 22: no resize handle; auto-grows via JS */
  overflow-y: auto;
  max-height: calc(1.5em * 10); /* ~10 lines, then internal scroll */
}

/* Content-box focus uses the global 3px --focus ring (adrs: 3px everywhere,
 * no exception); only the ring's radius is matched to the box's 16px
 * rounding — a radius match, not a color/width exception. */
.center-rounded #content-box:focus-visible {
  border-radius: 16px;
}

.center-rounded .input-meta,
.center-rounded #submit-error {
  text-align: center;
}

.center-rounded #submit-btn {
  display: block;
  margin: 0.6rem auto 0;
}

/* Decision 26: pill-shaped CTA — coral-red primary fill, white bold text,
 * min 44px height, soft shadow; hover lifts with deeper shade. */
.center-rounded #submit-btn.btn-primary {
  border-radius: 999px;
  background: #e85a4f;
  color: #fff;
  font-weight: 700;
  min-height: 44px;
  padding: 0.7rem 2.2rem;
  border: none;
  box-shadow: 0 3px 12px rgba(232, 90, 79, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  cursor: pointer;
}

.center-rounded #submit-btn.btn-primary:hover {
  background: #d14a40;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(232, 90, 79, 0.45);
}

.center-rounded #submit-btn.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(232, 90, 79, 0.30);
}

/* Content box (FR-1) */
#content-box {
  width: 100%; resize: vertical; min-height: 170px;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 0.75rem; font: inherit; font-size: 1rem;
  /* 1rem = 16px: iOS Safari auto-zooms on focus below 16px (design-
     system rule, adrs 2026-11-06 — same fix as the feedback
     textarea). */
}

.input-meta { display: flex; justify-content: flex-end; margin-top: 0.25rem; }

#char-count { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }

#char-count.over { color: var(--danger); font-weight: 700; }

/* Decision 35 (D-012 display rule, R2-17): read-mode view replacing the
   textarea post-submit when ≥1 redaction. Same card, same position; body
   text stays normal paper typography. Redacted spans render as plain ****
   text (no chips, no tokens). No animation — reduced-motion unaffected. */
.content-read {
  padding: 0.5rem 0.25rem;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Edit control: small, subtle, below the read view. */
#content-edit {
  display: block;
  margin: 0.25rem auto 0;
}

/* Author display rules must not override the hidden attribute. */
#content-read[hidden],
#content-edit[hidden] {
  display: none;
}

/* Latency fix item 5 (2026-10-23): subtle backend-state hint under the
   submit button. Paper-theme muted, small, no chrome. */
.wake-hint {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  text-align: center;
}

/* Anonymization notice (FR-1a) */
.anon-notice {
  margin-top: 0.75rem; border: 1px solid var(--line); border-left: 4px solid #a89a86;
  border-radius: 8px; padding: 0.5rem 0.75rem; background: #f7faf8; font-size: 0.9rem;
}

.anon-notice .anon-line { margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.anon-notice.anon-transient { transition: opacity 0.6s ease; }

.anon-notice.anon-fadeout { opacity: 0; }

.pipeline-status { margin-top: 0.75rem; font-size: 0.9rem; color: var(--muted); }

.pipeline-status .spinner {
  display: inline-block; width: 0.9em; height: 0.9em; margin-right: 0.5em;
  border: 2px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -0.1em;
}

@keyframes spin { to { transform: rotate(360deg); } }

.progress-track {
  height: 6px; background: var(--line); border-radius: 3px;
  overflow: hidden; margin-top: 0.5rem; max-width: 28rem;
}

.progress-fill {
  height: 100%; width: 0; background: var(--accent); border-radius: 3px;
  animation: progress-decel 10s cubic-bezier(0.15, 0.75, 0.25, 1) forwards;
}

@keyframes progress-decel {
  0% { width: 2%; }
  100% { width: 92%; }
}

.progress-fill.done { animation: none; width: 100%; transition: width 0.25s ease-out; }

@media (max-width: 640px) {
.center-card { max-width: 100%; }
}
