/* Feedy V4.572 | net-energy UI unification only */
#view-energy .ne-search-first {
  display: flex;
  width: 100%;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  color: #173f59;
  text-align: left;
  background: linear-gradient(135deg, #f2f8fb, #fff);
  border: 1px solid #a9c9dc;
  border-radius: 13px;
  box-shadow: 0 6px 18px rgba(31, 78, 121, .08);
  cursor: pointer;
}

#view-energy .ne-search-first:hover,
#view-energy .ne-search-first:focus-visible {
  border-color: #2f75b5;
  box-shadow: 0 0 0 3px rgba(47, 117, 181, .14), 0 8px 22px rgba(31, 78, 121, .1);
  outline: 0;
}

#view-energy .ne-search-first span,
#view-energy .ne-search-first b,
#view-energy .ne-search-first small { display: block; }
#view-energy .ne-search-first b { font-size: 16px; }
#view-energy .ne-search-first small { margin-top: 4px; color: #637b8b; font-size: 12px; }
#view-energy .ne-search-first em { color: #2f75b5; font-size: 29px; font-style: normal; line-height: 1; }

#view-energy .ne-hierarchy-picker {
  margin-top: 11px;
  padding: 0;
  border: 1px solid #dce5ea;
  border-radius: 11px;
  background: #fafcfd;
}

#view-energy .ne-hierarchy-picker > summary {
  padding: 10px 13px;
  color: #496272;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

#view-energy .ne-hierarchy-picker[open] > summary { border-bottom: 1px solid #e2e9ed; }
#view-energy .ne-hierarchy-picker .selector-grid { padding: 12px; }
#view-energy .ne-section-actions { display: flex; align-items: center; gap: 6px; }
#view-energy .cvb-support-note { border-bottom: 1px solid var(--sheet-border); }

#view-energy .ne-ui-input-table:not(.notes-visible) .ne-note-column,
#view-energy .ne-ui-input-table:not(.notes-visible) td.ne-note-cell { display: none !important; }

#view-energy .ne-requirement-badge {
  display: inline-flex;
  margin: 4px 0 0 6px;
  padding: 2px 6px;
  align-items: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  vertical-align: middle;
}

#view-energy .ne-requirement-badge.required { color: #8a3b14; background: #ffeadc; }
#view-energy .ne-requirement-badge.optional { color: #3d6278; background: #e8f2f8; }
#view-energy .ne-requirement-badge.recommended { color: #6d5500; background: #fff3c8; }
#view-energy td.ne-missing-final { color: #9b4b2c !important; background: #fff3ed !important; font-weight: 900; }
#view-energy td.ne-reference-held-final { color: #285c76 !important; background: #edf7fb !important; font-weight: 800; }
.feedy-ne-recommended,
.feedy-ne-reference-hold { display: inline-block; margin-left: 5px; padding: 1px 5px; border-radius: 999px; font-size: 9px; }
.feedy-ne-recommended { color: #6d5500; background: #fff3c8; }
.feedy-ne-reference-hold { color: #285c76; background: #e8f2f8; }

#view-energy .ne-info-btn {
  display: inline-grid;
  width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0;
  place-items: center;
  color: #245f87;
  background: #fff;
  border: 1px solid #8eb5ce;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
  cursor: pointer;
}

#view-energy .ne-info-btn:hover,
#view-energy .ne-info-btn:focus-visible { color: #fff; background: #2f75b5; outline: 2px solid rgba(47, 117, 181, .22); outline-offset: 1px; }

#feedyInraeNeV1Energy .feedy-ne-workbench-main.ne-ui-dual-main {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(205px, .62fr);
}

#feedyInraeNeV1Energy .ne-ui-adult-primary { background: #244f67; }
#feedyInraeNeV1Energy .ne-ui-adult-primary small { color: #dcebf2; }
#feedyInraeNeV1Energy .ne-ui-adult-primary .ne-info-btn { color: #244f67; border-color: rgba(255,255,255,.72); }
#feedyInraeNeV1Energy .ne-ui-adult-primary.blocked { color: #304139; background: #edf2f0; }
#feedyInraeNeV1Energy .ne-ui-adult-primary.blocked small { color: #60716a; }

.ne-ui-explain-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: none;
  padding: 18px;
  align-items: center;
  justify-content: center;
  background: rgba(13, 32, 43, .48);
}

.ne-ui-explain-modal.show { display: flex; }
#ingredientPickerDbFilters[hidden] { display: none !important; }
.ne-ui-modal-open { overflow: hidden; }
.ne-ui-explain-card { width: min(620px, 100%); overflow: hidden; color: #2f4552; background: #fff; border-radius: 16px; box-shadow: 0 28px 90px rgba(0,0,0,.28); }
.ne-ui-explain-card > header { display: flex; padding: 15px 18px; align-items: flex-start; justify-content: space-between; gap: 16px; color: #fff; background: #1f4e79; }
.ne-ui-explain-card > header small { display: block; margin-bottom: 3px; color: #d9e9f4; font-size: 11px; font-weight: 800; }
.ne-ui-explain-card > header h3 { margin: 0; font-size: 18px; }
.ne-ui-explain-card > header button { width: 32px; height: 32px; padding: 0; color: #fff; background: rgba(255,255,255,.13); border: 0; border-radius: 8px; font-size: 22px; cursor: pointer; }
.ne-ui-explain-body { padding: 18px; font-size: 14px; line-height: 1.75; }
.ne-ui-explain-body p { margin: 0; }
.ne-ui-explain-body p + p,
.ne-ui-explain-body p + ul { margin-top: 12px; }
.ne-ui-explain-body ul { margin-bottom: 0; padding-left: 20px; }
.ne-ui-explain-emphasis { padding: 10px 12px; color: #435d6c; background: #f2f7fa; border-left: 4px solid #72a3c2; border-radius: 7px; }
.ne-ui-explain-card > footer { display: flex; padding: 12px 18px; align-items: center; justify-content: space-between; gap: 14px; color: #687a84; background: #f7f9fa; border-top: 1px solid #e0e7eb; font-size: 11px; }

@media (max-width: 1050px) {
  #feedyInraeNeV1Energy .feedy-ne-workbench-main.ne-ui-dual-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #feedyInraeNeV1Energy .feedy-ne-decision { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  #view-energy .page-guide { align-items: stretch; }
  #view-energy .ne-search-first { min-height: 76px; padding: 13px 14px; }
  #view-energy .ne-search-first b { font-size: 15px; }
  #view-energy .ne-search-first small { line-height: 1.45; }
  #view-energy .ne-hierarchy-picker .selector-grid { padding: 10px; }
  #view-energy .ne-section-actions { flex: 0 0 auto; }
  #view-energy .sheet-section#inraInputSection,
  #view-energy .sheet-section#cvbInputSection { align-items: flex-start; }
  #view-energy .sheet-section#inraInputSection > span,
  #view-energy .sheet-section#cvbInputSection > span { line-height: 1.45; }

  #view-energy .ne-ui-table-wrap { margin-left: 8px; margin-right: 8px; overflow: visible !important; }
  #view-energy .ne-ui-responsive { display: block; width: 100%; min-width: 0 !important; background: transparent; }
  #view-energy .ne-ui-responsive thead { display: none; }
  #view-energy .ne-ui-responsive tbody { display: grid; gap: 10px; }
  #view-energy .ne-ui-responsive tr { display: grid !important; min-height: 0; overflow: hidden; background: #fff; border: 1px solid #d8e3e9; border-radius: 12px; box-shadow: 0 3px 10px rgba(31, 78, 121, .05); }
  #view-energy .ne-ui-responsive tr[hidden] { display: none !important; }
  #view-energy .ne-ui-responsive td { display: grid !important; min-width: 0; padding: 9px 10px !important; grid-template-columns: minmax(98px, .78fr) minmax(0, 1.22fr); align-items: center; gap: 9px; text-align: left !important; border: 0 !important; border-bottom: 1px solid #edf1f3 !important; white-space: normal !important; }
  #view-energy .ne-ui-responsive td::before { content: attr(data-label); color: #687d89; font-size: 10px; font-weight: 800; line-height: 1.35; }
  #view-energy .ne-ui-responsive td.label { display: block !important; padding: 11px 12px !important; color: #263f50 !important; background: #eef5f8 !important; font-size: 13px; }
  #view-energy .ne-ui-responsive td.label::before { display: none; }
  #view-energy .ne-ui-responsive td:last-child { border-bottom: 0 !important; }
  #view-energy .ne-ui-responsive td.ne-note-cell { grid-template-columns: 1fr; line-height: 1.55; }
  #view-energy .ne-ui-responsive td.ne-note-cell::before { display: block; margin-bottom: 2px; }
  #view-energy .ne-ui-responsive input,
  #view-energy .ne-ui-responsive select { width: 100% !important; min-width: 0 !important; min-height: 44px; font-size: 16px; }
  #view-energy .ne-ui-responsive .ne-info-btn { justify-self: end; }
  #view-energy .ne-ui-responsive td.calc { grid-template-columns: minmax(98px, .78fr) minmax(0, 1fr) auto; }

  #feedyInraeNeV1Energy .feedy-ne-workbench-main.ne-ui-dual-main { grid-template-columns: 1fr; }
  #feedyInraeNeV1Energy .feedy-ne-decision { grid-column: auto; }
  .ne-ui-explain-modal { padding: 10px; align-items: flex-end; }
  .ne-ui-explain-card { max-height: 88vh; overflow-y: auto; border-radius: 16px 16px 10px 10px; }
  .ne-ui-explain-card > footer { align-items: stretch; flex-direction: column; }
  .ne-ui-explain-card > footer .btn { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  #view-energy .ne-search-first,
  .ne-ui-explain-modal * { transition: none !important; scroll-behavior: auto !important; }
}
