/* Recipe Scaler. Only this tool's own pieces; everything else is the shared tool frame.
   Colours come from the site's variables only (tests/catalogue.test.mjs checks there are no hex values here). */

/* Servings: two boxes side by side, then Half / Double / Triple. */
.rs-serves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rs-serves .field { margin-bottom: 0; }
.rs-num { font-size: 18px; font-variant-numeric: tabular-nums; }
.rs-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.rs-x { min-height: 44px; }
.rs-serves-note { margin: 8px 0 0; }
.rs-serves-note.is-warn { color: var(--graphite); font-weight: 600; }

/* Paste box */
.rs-paste { margin-top: 18px; }
.rs-paste__box { width: 100%; min-height: 120px; resize: vertical; font-size: 16px; line-height: 1.45; }
.rs-paste .btn { margin-top: 10px; }
.rs-added { margin: 8px 0 0; }

/* Rows: each ingredient's line, and under it how it was read and what it becomes. */
.rs-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rs-row { padding: 8px 0 10px; border-bottom: 1px solid var(--silver); }
.rs-row__line { display: flex; gap: 6px; align-items: center; }
.rs-line { flex: 1 1 auto; min-width: 0; font-size: 16px; }
.rs-remove { flex: 0 0 auto; min-width: 44px; min-height: 44px; padding: 0; font-size: 22px; line-height: 1; }
.rs-status { margin: 6px 2px 0; font-size: 14px; line-height: 1.45; color: var(--slate); overflow-wrap: anywhere; }
.rs-status:empty { display: none; }
.rs-new { color: var(--graphite); }
.rs-new strong, .rs-item strong { font-weight: 650; }
.rs-about { font-style: italic; }
.rs-was { white-space: nowrap; }
.rs-was::before { content: "· "; }
.rs-tag { font-style: italic; }
.rs-warn { color: var(--graphite); font-weight: 600; }
.rs-row.is-check { border-bottom-color: var(--graphite); }
.rs-keep { display: flex; margin-top: 8px; min-height: 44px; }
.rs-link { border: 0; background: none; padding: 4px 2px; font: inherit; color: var(--graphite); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }
.rs-add-row { margin-top: 12px; min-height: 44px; }

/* The sheet */
.rs-from-to { margin: 2px 0 14px; font-size: 15px; color: var(--slate); }
.rs-empty { margin: 0; padding: 26px 0 14px; font-size: 15px; color: var(--steel); }
.rs-list { list-style: none; margin: 0; padding: 0; font-size: 16px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.rs-item { padding: 7px 0; border-bottom: 1px solid var(--silver); overflow-wrap: anywhere; break-inside: avoid; page-break-inside: avoid; }
.rs-item--heading { font-weight: 650; padding-top: 14px; border-bottom-width: 0; break-after: avoid; page-break-after: avoid; }
.rs-kept { font-size: 13.5px; font-style: italic; color: var(--slate); white-space: nowrap; }
.rs-pending { color: var(--slate); }
.rs-notes { margin-top: 14px; }
.rs-note { margin: 4px 0 0; font-size: 13.5px; color: var(--slate); }
.rs-scope { margin: 16px 0 0; font-size: 13.5px; color: var(--slate); }

@media (max-width: 360px) {
  .rs-serves { grid-template-columns: 1fr; }
}

/* Paper: as many pages as the list needs; an ingredient is never split across two pages. */
@media print {
  .rs-list { font-size: 11pt; }
  .rs-item { padding: 1.6mm 0; }
  .rs-scope, .rs-notes { break-inside: avoid; page-break-inside: avoid; font-size: 9pt; }
}
