/* ===========================================================
 * 04-editor.css — APPEND to your style.css
 * unit_size_g block injected into recipe editor sheet (P4)
 * =========================================================== */

.red-unit-section {
  background: linear-gradient(135deg, #FFFBEB 0%, var(--surface, #fff) 100%);
  border: 1px solid #FDE68A;
  border-radius: 14px;
  padding: 14px;
  margin: 16px 0;
}
.red-unit-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.red-unit-icon {
  width: 32px; height: 32px; border-radius: 10px;
  background: #FEF3C7; color: #92400E;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700;
  flex-shrink: 0;
}
.red-unit-head h3 { font-size: 14px; font-weight: 700; margin: 0; letter-spacing: -0.005em; }
.red-unit-head p { font-size: 11px; color: var(--muted, #6B7280); margin: 1px 0 0; line-height: 1.4; }

.red-unit-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 10px;
}
.red-unit-field { display: flex; flex-direction: column; gap: 5px; }
.red-unit-field label {
  font-size: 11px; font-weight: 600;
  color: var(--muted, #6B7280);
}
.red-unit-field.is-highlight label { color: #92400E; }
.red-unit-input-wrap {
  display: flex; align-items: stretch;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #E7E9E3);
  border-radius: 10px;
  overflow: hidden;
}
.red-unit-field.is-highlight .red-unit-input-wrap {
  background: #FEF3C7;
  border-color: #F59E0B;
}
.red-unit-input {
  flex: 1; min-width: 0;
  height: 40px; padding: 0 12px;
  border: 0; background: transparent;
  font-size: 14px; font-weight: 700;
  color: var(--text, #111827);
  outline: none;
  font-variant-numeric: tabular-nums;
  font-family: "Inter", "IBM Plex Sans Thai", sans-serif;
}
.red-unit-input-wrap > span {
  display: inline-flex; align-items: center;
  padding: 0 10px;
  font-size: 11px; color: var(--muted, #6B7280);
  font-weight: 600;
  border-left: 1px solid var(--border-soft, #EEF0EA);
}
.red-unit-hint {
  font-size: 10.5px; color: var(--faint, #9CA3AF);
  margin-top: 3px; line-height: 1.4;
}
.red-unit-field.is-highlight .red-unit-hint { color: #B45309; }

.red-unit-presets {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px;
  padding: 9px 11px;
  background: rgba(245,158,11,0.08);
  border-radius: 10px;
}
.red-unit-presets > span {
  font-size: 10.5px; color: #92400E;
  font-weight: 600; margin-right: 2px;
}
.red-unit-presets button {
  padding: 4px 9px;
  background: var(--surface, #fff);
  border: 1px solid #FDE68A;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  color: #92400E;
  cursor: pointer;
  transition: all 0.15s;
}
.red-unit-presets button:hover { background: #FEF3C7; }
.red-unit-presets button.is-active {
  background: #F59E0B; border-color: #F59E0B;
  color: #fff;
}
