/**
 * EssenzNatur icon system.
 *
 * The source drawings are a curated local Lucide subset. CSS masks keep the
 * icons in currentColor, avoid inline SVG duplication, and add no runtime
 * dependency or external request.
 */

.en-icon {
  --en-icon: none;
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask-image: var(--en-icon);
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-image: var(--en-icon);
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  vertical-align: -0.125em;
}

.en-icon--arrow-right{--en-icon:url("../icons/lucide/arrow-right.svg")}
.en-icon--chevron-down{--en-icon:url("../icons/lucide/chevron-down.svg")}
.en-icon--circle-check-big{--en-icon:url("../icons/lucide/circle-check-big.svg")}
.en-icon--circle-dashed{--en-icon:url("../icons/lucide/circle-dashed.svg")}
.en-icon--clock-3{--en-icon:url("../icons/lucide/clock-3.svg")}
.en-icon--factory{--en-icon:url("../icons/lucide/factory.svg")}
.en-icon--file-check{--en-icon:url("../icons/lucide/file-check.svg")}
.en-icon--file-text{--en-icon:url("../icons/lucide/file-text.svg")}
.en-icon--flask-conical{--en-icon:url("../icons/lucide/flask-conical.svg")}
.en-icon--info{--en-icon:url("../icons/lucide/info.svg")}
.en-icon--layers{--en-icon:url("../icons/lucide/layers.svg")}
.en-icon--mail{--en-icon:url("../icons/lucide/mail.svg")}
.en-icon--map-pin{--en-icon:url("../icons/lucide/map-pin.svg")}
.en-icon--network{--en-icon:url("../icons/lucide/network.svg")}
.en-icon--plus{--en-icon:url("../icons/lucide/plus.svg")}
.en-icon--search{--en-icon:url("../icons/lucide/search.svg")}
.en-icon--send{--en-icon:url("../icons/lucide/send.svg")}
.en-icon--shield-check{--en-icon:url("../icons/lucide/shield-check.svg")}
.en-icon--sprout{--en-icon:url("../icons/lucide/sprout.svg")}
.en-icon--tag{--en-icon:url("../icons/lucide/tag.svg")}

.icon-link,
.icon-action {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}

.icon-link .en-icon,
.icon-action .en-icon {
  transition: transform var(--dur) var(--ease);
}

.icon-link:hover .en-icon,
.icon-link:focus-visible .en-icon,
.icon-action:hover .en-icon,
.icon-action:focus-visible .en-icon {
  transform: translateX(var(--s-1));
}

/* Header tools keep a consistent 16px line-icon scale at every breakpoint. */
.ensearch-t .en-icon {
  width: var(--s-4);
  height: var(--s-4);
}

#primary-menu .subtoggle .en-icon {
  width: 1em;
  height: 1em;
  transition: transform var(--dur) var(--ease);
}

#primary-menu .menu-item-has-children.is-open > .subtoggle .en-icon {
  transform: rotate(180deg);
}

/* Evidence-state icons appear once in the legend, not on every data row. */
.prov-key {
  border-left: 0 !important;
  color: var(--muted);
}

.prov-key .en-icon {
  width: var(--s-3);
  height: var(--s-3);
}

.prov-legend-i--confirmed .prov-key { color: var(--sage) }
.prov-legend-i--request .prov-key { color: var(--muted) }
.prov-legend-i--pending .prov-key {
  color: var(--amber);
  background: transparent;
}

.sec--dark .prov-legend-i--confirmed .prov-key { color: var(--focus-on-dark) }
.sec--dark .prov-legend-i--pending .prov-key {
  color: var(--amber-on-dark);
  background: transparent;
}

/* Documents gain a neutral file cue; availability remains in the type state. */
.pdp-doc-n {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}

.pdp-doc-n::before {
  content: "";
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: url("../icons/lucide/file-text.svg") center / contain no-repeat;
  mask: url("../icons/lucide/file-text.svg") center / contain no-repeat;
  color: var(--sage);
}

/* Existing semantic check lists retain their meaning with a real icon. */
.ticks li::before {
  width: 1em;
  height: 1em;
  top: 0.2em;
  border: 0;
  background: var(--sage);
  -webkit-mask: url("../icons/lucide/circle-check-big.svg") center / contain no-repeat;
  mask: url("../icons/lucide/circle-check-big.svg") center / contain no-repeat;
  transform: none;
}

.flag::before {
  content: "";
  width: 1em;
  height: 1em;
  margin-top: 0.2em;
  background: currentColor;
  -webkit-mask: url("../icons/lucide/info.svg") center / contain no-repeat;
  mask: url("../icons/lucide/info.svg") center / contain no-repeat;
}

.acc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--s-5);
  height: var(--s-5);
  color: var(--sage);
  flex: 0 0 auto;
  transition: transform var(--dur) var(--ease);
}

.acc-icon .en-icon {
  width: var(--s-4);
  height: var(--s-4);
}

.acc-q[aria-expanded="true"] .acc-icon { transform: rotate(45deg) }

.gate > .en-icon {
  width: var(--s-5);
  height: var(--s-5);
  color: var(--sage);
  margin-top: 0;
}

.footer-address > .en-icon,
.footer-contact-mail > .en-icon {
  width: 1em;
  height: 1em;
  color: var(--focus-on-dark);
}

.footer-contact-mail {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}

.contact-fact-heading {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.contact-fact-heading .en-icon {
  color: var(--sage);
}

/* Each traceability stage gets one subject-specific cue above its title. */
.chain-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--s-6);
  height: var(--s-6);
  margin-bottom: var(--s-3);
  color: var(--sage);
}

.chain-icon .en-icon {
  width: var(--s-5);
  height: var(--s-5);
}

.seg-icon .en-icon {
  width: 100%;
  height: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .icon-link .en-icon,
  .icon-action .en-icon,
  #primary-menu .subtoggle .en-icon,
  .acc-icon {
    transition: none;
  }
}
