/* css/13-recipe-detail-page.css — Full-screen detail page
 * Matches mockup #4-5 (sauce detail) and serves as base for non-sauce too.
 */

/* Hide app-shell header when on recipe_detail page — page provides its own */
body[data-page="recipe_detail"] .app-header { display: none !important; }

#pageRoot.rdp-root-host {
  padding: 0 0 110px;
  background: #F6F7F4;
}

/* Sticky header */
.rdp-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  background: rgba(246,247,244,0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #EEF0EA;
}
.rdp-header-titles { flex: 1; min-width: 0; padding: 0 4px; }
.rdp-header-eye {
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.14em;
  color: #7E22CE;
  margin-bottom: 1px;
  text-transform: uppercase;
}
.rdp-header-title {
  font-size: 16px; font-weight: 700;
  letter-spacing: -0.01em;
  color: #111827;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rdp-back, .rdp-iconbtn {
  width: 38px; height: 38px;
  background: #fff;
  border: 1px solid #E7E9E3;
  border-radius: 11px;
  color: #374151;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}
.rdp-back svg, .rdp-iconbtn svg { width: 16px; height: 16px; }

/* Hero (under sticky header) */
.rdp-hero {
  padding: 14px 16px 6px;
}
.rdp-hero-eyebrow {
  font-size: 10px; font-weight: 700;
  color: #7E22CE; letter-spacing: 0.12em;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.rdp-hero-name {
  font-size: 24px; font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: #064E3B;
}

/* Summary card — green gradient */
.rdp-summary {
  margin: 12px 14px 12px;
  background: linear-gradient(135deg, #ECFDF5 0%, #F0FDF4 100%);
  border: 1px solid #BBF7D0;
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(15,86,32,0.04);
}
.rdp-summary-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.rdp-sum-cell {
  padding: 0 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.rdp-sum-cell + .rdp-sum-cell {
  border-left: 1px solid rgba(15,122,53,0.16);
}
.rdp-sum-lbl {
  font-size: 9.5px; color: #166534;
  font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.7;
}
.rdp-sum-val {
  font-family: "Inter", "IBM Plex Sans Thai", sans-serif;
  font-size: 22px; font-weight: 800;
  color: #064E3B;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.rdp-sum-val.is-good { color: #15803D; }
.rdp-sum-val.is-bad { color: #B91C1C; }

/* Action row */
.rdp-actions {
  display: flex; gap: 8px;
  padding: 0 14px;
  margin-bottom: 14px;
}
.rdp-action {
  flex: 1;
  min-height: 44px;
  background: #fff;
  border: 1px solid #E7E9E3;
  border-radius: 12px;
  color: #374151;
  font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15,23,42,0.03);
}
.rdp-action svg { width: 15px; height: 15px; }
.rdp-action-primary {
  background: linear-gradient(135deg, #16A34A, #0F7A35);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(22,163,74,0.28);
  flex: 1.4;
}

/* Section heading */
.rdp-sec-h {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 4px 0 8px;
}
.rdp-sec-h h3 {
  font-size: 15px; font-weight: 800;
  margin: 0; color: #111827;
  letter-spacing: -0.01em;
}
.rdp-sec-meta {
  font-size: 11px; color: #6B7280;
  font-variant-numeric: tabular-nums;
}

/* Ingredient section */
.rdp-ing-section, .rdp-steps-section {
  padding: 0 14px;
  margin-bottom: 14px;
}

.rdp-group {
  background: #fff;
  border: 1px solid #EEF0EA;
  border-radius: 16px;
  margin-bottom: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,23,42,0.03);
}
.rdp-group-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: #FAFAF8;
  border-bottom: 1px solid #EEF0EA;
}
.rdp-group-name {
  font-size: 13.5px; font-weight: 700;
  color: #111827;
  letter-spacing: -0.005em;
}
.rdp-group-total {
  font-family: "Inter", sans-serif;
  font-size: 14px; font-weight: 800;
  color: #064E3B;
  font-variant-numeric: tabular-nums;
}

/* Ingredient row */
.rdp-ing {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
}
.rdp-ing + .rdp-ing { border-top: 1px solid #F1F2EE; }
.rdp-ing.is-sub { background: rgba(99,102,241,0.04); }
.rdp-ing-ph {
  width: 32px; height: 32px; border-radius: 9px;
  background: #F1F2EE; color: #6B7280;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  flex-shrink: 0;
}
.rdp-ing-body { flex: 1; min-width: 0; }
.rdp-ing-name {
  font-size: 13.5px; font-weight: 600;
  color: #111827;
  display: flex; align-items: center; gap: 6px;
}
.rdp-ing-subtag {
  font-size: 9px; font-weight: 800;
  padding: 1px 5px; border-radius: 3px;
  background: #4338CA; color: #fff;
  letter-spacing: 0.04em;
}
.rdp-ing-meta {
  font-size: 10.5px; color: #9CA3AF;
  font-variant-numeric: tabular-nums;
}
.rdp-ing-qty {
  display: flex; align-items: baseline; gap: 3px;
  font-variant-numeric: tabular-nums;
}
.rdp-ing-qty-num {
  font-family: "Inter", sans-serif;
  font-size: 16px; font-weight: 800;
  color: #064E3B;
}
.rdp-ing-qty-unit {
  font-size: 11px; color: #9CA3AF;
  font-weight: 600;
}

/* Steps */
.rdp-steps {
  list-style: none; padding: 0; margin: 0;
  background: #fff;
  border: 1px solid #EEF0EA;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,23,42,0.03);
}
.rdp-steps li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  font-size: 13px; line-height: 1.5;
}
.rdp-steps li + li { border-top: 1px solid #F1F2EE; }
.rdp-step-num {
  flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: #DCFCE7; color: #0F7A35;
  font-family: "Inter", sans-serif;
  font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.rdp-step-text { flex: 1; color: #374151; }
.rdp-step-time {
  font-family: "Inter", monospace;
  font-size: 10.5px; font-weight: 700;
  color: #0F7A35;
  padding: 2px 8px;
  background: #DCFCE7;
  border-radius: 5px;
  flex-shrink: 0;
}

.rdp-empty {
  padding: 60px 24px;
  text-align: center;
  color: #6B7280;
}
.rdp-empty p { margin: 0 0 14px; font-size: 14px; }

/* ============================================================
 * REWRITE (v34-fixed-v3) — additional classes for clean detail page
 * Keeps existing .rdp-* working, adds new ones for:
 *  - group blocks (wet/dry/other/preservative)
 *  - sub-recipe block
 *  - batch calculator (3 modes)
 *  - macros card
 *  - more-menu sheet
 * ============================================================ */

/* Belt-and-suspenders: hide app-shell header when on recipe_detail
 * via body class set by recipeDetailPage.render(). The data-page
 * selector at top of this file is the primary mechanism; this is fallback. */
body.rdp-active .app-header { display: none !important; }

/* Header — make sure title is the recipe name, not "ดูสูตร" */
.rdp-header-title {
  font-size: 18px; font-weight: 700; margin: 0;
  letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #111827;
}

/* Summary tags row */
.rdp-summary-row--alt {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(15,122,53,0.18);
  flex-wrap: wrap; gap: 6px;
}
.rdp-summary-tag {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(15,122,53,0.08);
  color: #166534;
  font-size: 11.5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Group blocks (wet/dry/other/preservative) */
.rdp-group {
  background: #fff;
  border: 1px solid #EEF0EA;
  border-radius: 16px;
  margin: 0 14px 10px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,23,42,0.03);
}
.rdp-group--opt {
  background: linear-gradient(135deg, #FAF5FF 0%, #fff 100%);
  border-color: #DDD6FE;
}
.rdp-group-head {
  width: 100%; text-align: left;
  background: transparent; border: 0;
  padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  cursor: pointer;
}
.rdp-group-head-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.rdp-group-head-right { display: flex; align-items: center; gap: 6px; }
.rdp-group-head-info { min-width: 0; }
.rdp-group-tag {
  padding: 3px 8px; border-radius: 7px;
  font-family: "Inter", sans-serif;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.05em; flex-shrink: 0;
}
.rdp-group-name {
  font-size: 14.5px; font-weight: 700;
  color: #111827; letter-spacing: -0.005em;
}
.rdp-group-sub { font-size: 11px; color: #6B7280; margin-top: 1px; }
.rdp-group-total {
  font-family: "Inter", "IBM Plex Sans Thai", sans-serif;
  font-size: 16px; font-weight: 800;
  color: #064E3B; font-variant-numeric: tabular-nums;
}
.rdp-group-total span { font-size: 10px; font-weight: 600; opacity: 0.6; margin-left: 1px; }
.rdp-group:not(.is-open) .rdp-group-body { display: none; }
.rdp-group:not(.is-open) .rdp-group-head svg:last-child { transform: rotate(-90deg); }
.rdp-group-head svg:last-child { transition: transform .2s; }
.rdp-group-body {
  border-top: 1px solid #EEF0EA;
  background: #FBFCFA;
  padding: 4px 0;
}

/* Ingredient row */
.rdp-ing {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
}
.rdp-ing + .rdp-ing { border-top: 1px solid #F1F2EE; }
.rdp-ing-icon { flex-shrink: 0; }
.rdp-ing-body { flex: 1; min-width: 0; }
.rdp-ing-name {
  font-size: 13.5px; font-weight: 600;
  color: #111827; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.rdp-ing-tag {
  font-size: 9.5px; font-weight: 700;
  padding: 1px 5px; border-radius: 4px;
  letter-spacing: 0.03em;
}
.rdp-ing-tag--custom { background: #FEF3C7; color: #92400E; }
.rdp-ing-meta {
  font-size: 10.5px; color: #9CA3AF;
  font-variant-numeric: tabular-nums; margin-top: 1px;
}
.rdp-ing-qty {
  display: flex; align-items: center; gap: 4px;
  background: #fff; border: 1px solid #E7E9E3;
  border-radius: 9px;
  padding: 4px 10px; flex-shrink: 0;
}
.rdp-ing-qty-num {
  font-size: 13px; font-weight: 700; color: #111827;
  font-variant-numeric: tabular-nums;
}
.rdp-ing-qty-unit { font-size: 10.5px; color: #9CA3AF; font-weight: 600; }

/* Sub-recipe block */
.rdp-subrec {
  display: flex; align-items: center; gap: 10px;
  margin: 0 14px 10px;
  background: linear-gradient(90deg, #EFF6FF, #fff);
  border: 1px solid #BFDBFE;
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
}
.rdp-subrec:active { transform: scale(0.99); }
.rdp-subrec-tag {
  padding: 3px 8px; border-radius: 6px;
  background: #1E40AF; color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 10px; font-weight: 800; letter-spacing: 0.06em;
  flex-shrink: 0;
}
.rdp-subrec-body { flex: 1; min-width: 0; }
.rdp-subrec-name {
  font-size: 13px; font-weight: 700; color: #1E3A8A;
  display: flex; align-items: center; gap: 4px;
}
.rdp-subrec-name svg { width: 12px; height: 12px; flex-shrink: 0; }
.rdp-subrec-meta { font-size: 11px; color: #3B82F6; margin-top: 1px; }
.rdp-subrec-qty {
  font-family: "Inter", sans-serif;
  font-size: 15px; font-weight: 800;
  color: #1E3A8A; font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.rdp-subrec-qty span { font-size: 10px; opacity: 0.6; margin-left: 1px; }
.rdp-subrec > svg:last-child { color: #93C5FD; flex-shrink: 0; }

/* Batch calculator */
.rdp-batch {
  background: #fff;
  border: 1px solid #EEF0EA;
  border-radius: 18px;
  padding: 14px;
  margin: 14px 14px 12px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.03);
  scroll-margin-top: 80px;
}
.rdp-batch-h {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.rdp-batch-h h3 { font-size: 15px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.rdp-batch-h p { font-size: 11.5px; color: #6B7280; margin: 1px 0 0; }
.rdp-batch-h svg { color: #0F7A35; }

.rdp-batch-modes {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 12px;
}
.rdp-batch-mode {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: #FAFAF8;
  border: 1.5px solid transparent;
  border-radius: 12px;
  text-align: left; cursor: pointer;
  transition: all 0.15s;
}
.rdp-batch-mode.is-active {
  background: #ECFDF5; border-color: #16A34A;
}
.rdp-batch-mode-icon {
  width: 32px; height: 32px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rdp-batch-mode-icon svg { width: 14px; height: 14px; }
.rdp-batch-mode-body { flex: 1; min-width: 0; }
.rdp-batch-mode-name { font-size: 13.5px; font-weight: 700; color: #111827; }
.rdp-batch-mode-desc { font-size: 11px; color: #6B7280; margin-top: 1px; }
.rdp-batch-mode-check {
  width: 22px; height: 22px; border-radius: 50%;
  background: #16A34A; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rdp-batch-mode-check svg { width: 12px; height: 12px; }

.rdp-batch-input { margin-bottom: 10px; }
.rdp-batch-input label {
  font-size: 11.5px; font-weight: 600;
  color: #6B7280;
  display: block; margin-bottom: 6px;
}
.rdp-batch-input-row { display: flex; gap: 8px; }
.rdp-batch-num {
  flex: 1; height: 44px; padding: 0 14px;
  font-size: 18px; font-weight: 700;
  color: #064E3B;
  font-variant-numeric: tabular-nums;
  background: #F0FDF4;
  border: 1.5px solid #BBF7D0;
  border-radius: 11px;
  outline: none;
  font-family: "Inter", "IBM Plex Sans Thai", sans-serif;
}
.rdp-batch-unit-seg {
  display: flex; gap: 1px;
  background: #F1F2EE;
  padding: 3px; border-radius: 11px;
}
.rdp-batch-unit-seg button {
  padding: 0 14px; min-width: 38px;
  background: transparent; border: 0;
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
  color: #6B7280;
  cursor: pointer;
}
.rdp-batch-unit-seg button.is-active {
  background: #fff;
  color: #0F7A35;
  box-shadow: 0 1px 2px rgba(15,23,42,0.08);
}
.rdp-batch-hint { font-size: 11.5px; color: #6B7280; margin-top: 6px; }
.rdp-batch-hint strong { color: #0F7A35; }

.rdp-batch-warn {
  display: flex; gap: 8px;
  padding: 10px 12px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 11px;
  margin-bottom: 10px;
  font-size: 11.5px; line-height: 1.45;
  color: #92400E;
}
.rdp-batch-warn svg { flex-shrink: 0; margin-top: 1px; width: 14px; height: 14px; }

.rdp-batch-result {
  background: #FAFAF8;
  border: 1px dashed #E7E9E3;
  border-radius: 11px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.rdp-batch-result-row {
  display: flex; justify-content: space-between;
  padding: 4px 0;
  font-size: 12.5px;
}
.rdp-batch-result-row span { color: #6B7280; }
.rdp-batch-result-row strong {
  color: #111827; font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rdp-batch-actions { display: flex; gap: 8px; }

/* Action buttons */
.rdp-actions {
  display: flex; gap: 6px;
  margin: 12px 14px 14px;
}
.rdp-action {
  flex: 0 0 auto;
  min-height: 40px; padding: 0 14px;
  background: #fff; border: 1px solid #E7E9E3;
  border-radius: 11px;
  color: #374151;
  font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.03);
  cursor: pointer;
}
.rdp-action--primary {
  background: #16A34A; border-color: #16A34A;
  color: #fff;
  box-shadow: 0 4px 12px rgba(22,163,74,0.24);
  flex: 1;
}
.rdp-action--full { flex: 1; }
.rdp-action--icon { width: 40px; padding: 0; }
.rdp-action svg { width: 14px; height: 14px; }

/* Macros card */
.rdp-card {
  background: #fff;
  border: 1px solid #EEF0EA;
  border-radius: 16px;
  padding: 14px;
  margin: 0 14px 10px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.03);
}
.rdp-card-h { margin-bottom: 10px; }
.rdp-card-h h3 { font-size: 14.5px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.rdp-card-h p { font-size: 11px; color: #6B7280; margin: 1px 0 0; }

.rdp-macros-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.rdp-macro-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: #FAFAF8;
  border-radius: 9px;
}
.rdp-macro-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rdp-macro-info { flex: 1; min-width: 0; }
.rdp-macro-lbl { font-size: 11px; color: #6B7280; font-weight: 600; }
.rdp-macro-val {
  font-size: 14px; font-weight: 800; color: #111827;
  font-variant-numeric: tabular-nums; letter-spacing: -0.005em;
}

/* Steps card uses .rdp-card; .rdp-steps inherits earlier styles */
.rdp-steps li { display: flex; gap: 10px; padding: 6px 0; align-items: flex-start; }

/* More menu sheet */
.rdp-menu { display: flex; flex-direction: column; gap: 4px; }
.rdp-menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: transparent;
  border: 0; border-radius: 11px;
  font-size: 14px; font-weight: 600; color: #111827;
  text-align: left; cursor: pointer;
}
.rdp-menu-item:active { background: #F1F2EE; }
.rdp-menu-item svg { width: 18px; height: 18px; color: #6B7280; flex-shrink: 0; }

/* SAFETY NET — กันบั๊ก SVG ขยายเต็มจอ ถ้ามี svg ใน rdp ที่ไม่ได้กำหนดขนาด */
#pageRoot.rdp-root-host svg:not([width]):not([height]) {
  width: 16px; height: 16px;
}
.rdp-subrec > svg:last-child { width: 16px; height: 16px; color: #93C5FD; flex-shrink: 0; }
.rdp-subrec-name svg { width: 12px; height: 12px; flex-shrink: 0; }
.rdp-group-head svg:last-child { width: 14px; height: 14px; flex-shrink: 0; }
.rdp-batch-h svg { width: 18px; height: 18px; flex-shrink: 0; color: #0F7A35; }
.rdp-batch-mode-icon svg { width: 14px; height: 14px; }
.rdp-batch-mode-check svg { width: 12px; height: 12px; }
.rdp-batch-warn svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }
.rdp-action svg { width: 15px; height: 15px; flex-shrink: 0; }
.rdp-back svg, .rdp-iconbtn svg { width: 16px; height: 16px; }
.rdp-menu-item svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ============================================================
 * Option C — Recipe Detail Page (full rewrite)
 * Groups ALWAYS visible (no collapse), Dynamic Solver UI, preview sheet
 * ============================================================ */

/* Override old collapse rule — groups always open */
#pageRoot.rdp-root-host .rdp-group .rdp-group-body { display: block !important; }

/* Group block — no cursor (header not clickable) */
.rdp-group .rdp-group-head { cursor: default; }

/* Customtag chip for "นอกฐาน" */
.rdp-ing-customtag {
  font-size: 9.5px; font-weight: 700;
  padding: 1px 5px; border-radius: 4px;
  background: #FEF3C7; color: #92400E;
  letter-spacing: 0.03em;
}

/* ───── Batch — Locks UI ───── */
.rdp-batch-locks { margin-bottom: 12px; }
.rdp-batch-locks-h { margin: 12px 0 8px; }
.rdp-batch-locks-h h4 {
  font-size: 12.5px; font-weight: 700; margin: 0;
  color: #111827;
}
.rdp-batch-locks-h p {
  font-size: 11px; color: #6B7280;
  margin: 2px 0 0; line-height: 1.4;
}
.rdp-lock-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: #FAFAF8;
  border: 1px solid transparent;
  border-radius: 10px;
  margin-bottom: 4px;
}
.rdp-lock-row.is-locked {
  background: #FFFBEB;
  border-color: #FDE68A;
}
.rdp-lock-btn {
  width: 32px; height: 32px;
  background: #fff;
  border: 1px solid #E7E9E3;
  border-radius: 8px;
  color: #6B7280;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer;
}
.rdp-lock-row.is-locked .rdp-lock-btn {
  background: #F59E0B; color: #fff; border-color: #F59E0B;
}
.rdp-lock-name {
  flex: 1; min-width: 0;
  font-size: 12.5px; font-weight: 600; color: #111827;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rdp-lock-base {
  font-size: 11px; color: #9CA3AF;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.rdp-lock-input {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.rdp-lock-num {
  width: 70px; height: 32px;
  padding: 0 8px;
  border: 1px solid #FDE68A; background: #fff;
  border-radius: 8px;
  font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: #92400E;
  outline: none;
}
.rdp-lock-unit-seg {
  display: flex; gap: 1px;
  background: #FEF3C7; padding: 2px;
  border-radius: 7px;
}
.rdp-lock-unit-seg button {
  padding: 0 8px; min-width: 26px; height: 26px;
  background: transparent; border: 0; border-radius: 5px;
  font-size: 11px; font-weight: 600;
  color: #92400E; cursor: pointer;
}
.rdp-lock-unit-seg button.is-active {
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* ───── Batch — clear target button ───── */
.rdp-batch-clear {
  width: 36px; height: 36px;
  background: #F1F2EE; border: 0; border-radius: 9px;
  color: #6B7280;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.rdp-batch-clear:hover { background: #E5E7EB; color: #111827; }
.rdp-batch-clear svg { width: 13px; height: 13px; }

/* ───── Batch — factor + result variants ───── */
.rdp-batch-factor {
  font-family: "Inter", sans-serif;
  font-size: 16px; color: #0F7A35;
}
.rdp-batch-result-sep {
  height: 1px; background: #E7E9E3; margin: 8px 0;
}
.rdp-batch-result-row--ing strong {
  font-family: "Inter", sans-serif;
  font-size: 12.5px; color: #064E3B;
}
.rdp-batch-result-row--ing span {
  font-size: 12px; color: #6B7280;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 60%;
}

/* ───── Batch — warning variants ───── */
.rdp-batch-warn--error {
  background: #FEF2F2 !important;
  border-color: #FCA5A5 !important;
  color: #991B1B !important;
}
.rdp-batch-warn--info {
  background: #EFF6FF !important;
  border-color: #BFDBFE !important;
  color: #1E40AF !important;
}

/* ───── Batch Preview Sheet ───── */
.rdp-batch-sheet { padding: 4px 0 8px; }
.rdp-batch-sheet-h {
  padding: 14px;
  background: linear-gradient(135deg, #ECFDF5 0%, #F0FDF4 100%);
  border: 1px solid #BBF7D0;
  border-radius: 14px;
  margin-bottom: 12px;
}
.rdp-batch-sheet-eyebrow {
  font-size: 10px; font-weight: 700;
  color: #166534;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 8px;
}
.rdp-batch-sheet-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
}
.rdp-batch-sheet-grid > div {
  padding: 0 8px;
}
.rdp-batch-sheet-grid > div + div {
  border-left: 1px solid rgba(15,122,53,0.16);
}
.rdp-batch-sheet-list {
  background: #fff;
  border: 1px solid #EEF0EA;
  border-radius: 14px;
  overflow: hidden;
}
.rdp-batch-sheet-list-h {
  padding: 10px 14px;
  background: #FAFAF8;
  font-size: 11.5px; font-weight: 700;
  color: #374151;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #EEF0EA;
}
.rdp-batch-sheet-list-h + .rdp-batch-sheet-list-h {
  margin-top: 0;
  border-top: 1px solid #EEF0EA;
}
.rdp-batch-sheet-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
}
.rdp-batch-sheet-row + .rdp-batch-sheet-row {
  border-top: 1px solid #F1F2EE;
}
.rdp-batch-sheet-name {
  flex: 1; min-width: 0;
  font-size: 13px; font-weight: 600;
  color: #111827;
}
.rdp-batch-sheet-qty {
  font-family: "Inter", sans-serif;
  font-size: 14px; font-weight: 800;
  color: #064E3B;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* Phase 1: row marker for ingredients expanded from a sub-recipe */
.rdp-ing-fromsub {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: 9px; font-weight: 700;
  padding: 1px 5px; border-radius: 4px;
  background: #DBEAFE; color: #1E40AF;
  cursor: pointer;
  letter-spacing: 0.03em;
}
.rdp-ing-fromsub svg { width: 9px; height: 9px; }
.rdp-ing--from-sub { background: rgba(59,130,246,0.025); }
