/* ============================================================
   constant-sum.css — Constant sum (allocate a total) interaction
   ============================================================ */

.cs-container {
  width: 100%; display: flex; flex-direction: column;
  gap: 10px; user-select: none;
}

/* ── Header: Total / Allocated / Remaining ───────────────────────────────── */

.cs-header {
  display: flex; gap: 8px;
  padding: 10px 8px; border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}
.cs-stat {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 2px; min-width: 0;
}
.cs-stat-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.03em;
  text-transform: uppercase; color: rgba(255,255,255,0.45);
}
.cs-stat-value {
  font-size: 20px; font-weight: 800; color: rgba(255,255,255,0.9);
}
.cs-stat-value.cs-exact { color: #2ecc71; }
.cs-stat-value.cs-over  { color: #e74c3c; }

/* ── Rows: label + number input ──────────────────────────────────────────── */

.cs-list { display: flex; flex-direction: column; gap: 6px; }
.cs-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.cs-row-label {
  flex: 1; min-width: 0;
  font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.82);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cs-row-input {
  width: 96px; flex-shrink: 0;
  padding: 8px 10px; border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
  color: #fff; font-size: 15px; font-weight: 700; text-align: right;
  outline: none;
  transition: border-color 0.13s ease, background 0.13s ease;
  -webkit-tap-highlight-color: transparent;
}
.cs-row-input:focus {
  border-color: #00c9b1;
  background: rgba(255,255,255,0.12);
}
/* Hide the native number spinner for a cleaner look */
.cs-row-input::-webkit-outer-spin-button,
.cs-row-input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.cs-row-input[type=number] { -moz-appearance: textfield; }

/* ── Fail-loud error ─────────────────────────────────────────────────────── */

.cs-error {
  padding: 14px 16px; border-radius: 10px;
  background: rgba(231,76,60,0.12);
  border: 1px solid rgba(231,76,60,0.4);
  color: #ffb3aa; font-size: 14px; font-weight: 600; text-align: center;
}
