/* ═══════════════════════════════════════════════════
   Удобрения — довідник, план внесення по культурах, потреба
   Reuses .szr-tabs/.szr-tab, .eq-modal-*, .eq-form-row/.eq-field,
   .sm-confirm-row, .tech-crop-tab, .tech-stage, .tech-item-table,
   .tech-status, .req-status-*, .req-item-row/.req-breakdown-row as-is.
   ═══════════════════════════════════════════════════ */

/* ─── Formula chips (Довідник table + formula editor) ────────────────── */
.fert-formula-chip {
  display: inline-block;
  font-size: 11.5px;
  padding: 2px 8px;
  margin: 1px 3px 1px 0;
  border-radius: 5px;
  background: var(--bg);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.fert-formula-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.fert-formula-row select { flex: 1.4; }
.fert-formula-row .fert-formula-new-name { flex: 1.4; }
.fert-formula-row input[type="number"] { flex: 1; }

/* ─── 3 fixed application-type blocks (План удобрень tab) ────────────── */
.fert-block {
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.fert-block-main        { background: #EAF2FF; border-color: #CFE0FF; }
.fert-block-presowing   { background: #FFF6E0; border-color: #F5E3AE; }
.fert-block-topdressing { background: #EAF8EC; border-color: #C9EACD; }

.fert-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.fert-block-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* Stages inside a block reuse .tech-stage but without the cyclic color
   classes — colour lives on the outer .fert-block instead, since there
   are exactly 3 fixed application-type colours, not N cyclic stage ones. */
.fert-block .tech-stage {
  background: var(--surface);
  margin-bottom: 10px;
}

/* ─── Tags for the sowing-plan "План Удобрень" column ─────────────────── */
.fert-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 9px;
  margin: 1px 4px 1px 0;
  border-radius: 5px;
  white-space: nowrap;
}
.fert-tag-main        { background: #EAF2FF; color: #2B5FB0; }
.fert-tag-presowing   { background: #FFF6E0; color: #8A6300; }
.fert-tag-topdressing { background: #EAF8EC; color: #1E7A3D; }
/* A completed block is read-only until "Редагувати" — its controls stay
   visible so the plan can be read, just visibly inert. */
.fert-block-locked input:disabled,
.fert-block-locked select:disabled,
.fert-block-locked textarea:disabled {
  opacity: .75;
  cursor: default;
}

.fert-tag-custom      { background: #F3E3FF; color: #7D3C98; }

/* ─── Stacking — catalog picker modal opens above the plan page (which
   has no full-screen editor modal of its own, unlike СЗР's technology
   editor, but the pattern is kept for consistency / future-proofing). ── */
#modal-fert-catalog { z-index: 410; }
#modal-fert-prep     { z-index: 420; }
