/* EDI-pagina (koppeling-edi): vier eigen onderdelen, elk met eigen prefix.
   efl-  berichtenstroom Retailer, EDI-netwerk, Odoo, magazijn (klik of speel af)
   esw-  schakelaar Zonder EDI / Met EDI
   eft-  tabs per onderdeel met screenshot
   erc-  rekentool met eigen invoer
   Statische HTML eerst: zonder JavaScript staat alles zichtbaar onder elkaar (js/edi-stroom.js maakt het interactief).
   Enkel tokens uit site.css. Beweging stopt bij prefers-reduced-motion. Tikdoelen min. 44 px. */

/* ---------- ankernavigatie ---------- */
.edi-nav { position: sticky; top: var(--edi-top, 68px); z-index: 15; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.edi-nav .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.edi-nav .wrap::-webkit-scrollbar { display: none; }
.edi-nav a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-size: .92rem; font-weight: 600; color: var(--ink-2); border-bottom: 3px solid transparent; text-decoration: none; }
.edi-nav a:hover { color: var(--action-dark); }
.edi-nav a[aria-current="true"] { color: var(--action-dark); border-bottom-color: var(--action); }
.edi-nav a:focus-visible { outline: 3px solid var(--action); outline-offset: -3px; border-radius: var(--r-sm); }
[id] { scroll-margin-top: calc(var(--edi-top, 68px) + 56px); }

/* ---------- gedeelde kleine stukken ---------- */
.edi-msg { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .06em; line-height: 1.4; padding: 2px 10px; border-radius: 999px; background: var(--action-soft); color: var(--action-dark); white-space: nowrap; }
.edi-msg.edi-msg-none { background: var(--canvas); color: var(--muted); border: 1px solid var(--line); }
.edi-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); }
.edi-btnrow { display: flex; flex-wrap: wrap; gap: 8px; }
.edi-pill { font: inherit; font-size: .92rem; font-weight: 600; color: var(--navy); background: var(--white); border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 18px; min-height: 44px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.edi-pill:hover { border-color: var(--action); }
.edi-pill:focus-visible { outline: 3px solid var(--action); outline-offset: 3px; }
.edi-pill[aria-pressed="true"], .edi-pill[aria-selected="true"] { background: var(--action-soft); border-color: var(--action); color: var(--action-dark); }

/* ---------- efl: berichtenstroom ---------- */
.efl { padding: clamp(16px, 2.4vw, 28px); display: grid; gap: 22px; }
.efl-actors { display: grid; grid-template-columns: minmax(0,1.25fr) auto minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr); align-items: stretch; gap: 0; }
.efl-actor { border: 2px solid var(--line); border-radius: var(--r); background: var(--white); padding: 14px 14px 16px; display: grid; gap: 6px; align-content: start; transition: border-color .2s, background-color .2s, box-shadow .2s; min-width: 0; }
.efl-actor h3 { margin: 0; font-size: 1.02rem; color: var(--navy); }
.efl-actor p { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.45; }
.efl-actor.is-on { border-color: var(--action); background: var(--action-soft); box-shadow: 0 0 0 4px rgba(1,126,132,.10); }
.efl-logos { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.efl-logos img { height: 26px; width: auto; max-width: 84px; object-fit: contain; filter: grayscale(1); opacity: .85; display: block; }
.efl-logos .efl-chip { font-size: .8rem; font-weight: 700; color: var(--navy); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; background: var(--white); }
.efl-link { position: relative; display: grid; place-items: center; align-content: center; gap: 4px; min-width: 64px; padding: 0 6px; }
.efl-link::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--line-strong); z-index: 0; }
.efl-arr { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; background: var(--white); border: 2px solid var(--line-strong); color: var(--muted); display: grid; place-items: center; font-weight: 800; line-height: 1; font-size: 1rem; }
.efl-arr::before { content: "\2192"; }
.efl-link[data-dir="rtl"] .efl-arr::before { content: "\2190"; }
.efl-link .edi-msg { position: relative; z-index: 1; display: none; }
.efl-link.is-on::before { border-top: 3px solid var(--action); }
.efl-link.is-on .efl-arr { border-color: var(--action); background: var(--action); color: #fff; }
.efl-link.is-on .edi-msg { display: inline-block; }
@keyframes efl-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(1,126,132,.35); } 50% { box-shadow: 0 0 0 7px rgba(1,126,132,0); } }
.efl-link.is-on .efl-arr { animation: efl-pulse 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .efl-link.is-on .efl-arr { animation: none; } .efl-actor { transition: none; } }

/* zonder JS: genummerde lijst met de volledige uitleg */
.efl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: efl; }
.efl-step { counter-increment: efl; display: grid; grid-template-columns: 34px minmax(0,1fr); column-gap: 14px; row-gap: 6px; }
.efl-step::before { content: counter(efl); grid-row: 1 / span 4; width: 30px; height: 30px; border-radius: 50%; background: var(--action-soft); color: var(--action-dark); font-weight: 800; display: grid; place-items: center; }
.efl-step h3 { margin: 0; font-size: 1.02rem; color: var(--navy); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.efl-step p { margin: 0; color: var(--ink-2); font-size: .95rem; max-width: 70ch; }
.efl-step .efl-win { color: var(--navy); }
.efl-step .efl-win b { color: var(--teal-ink); }
.efl-step a { font-weight: 700; }

/* met JS */
.efl-bar { display: none; }
.efl-on .efl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.efl-on .efl-bar .edi-pill { padding-inline: 14px; }
.efl-on .efl-bar .efl-num { width: 24px; height: 24px; border-radius: 50%; background: var(--action-soft); color: var(--action-dark); display: grid; place-items: center; font-size: .8rem; font-weight: 800; flex: none; }
.efl-on .edi-pill[aria-pressed="true"] .efl-num { background: var(--action); color: #fff; }
.efl-play { margin-left: auto; background: var(--action); color: #fff; border-color: var(--action); }
.efl-play:hover { background: var(--action-dark); border-color: var(--action-dark); }
.efl-play[aria-pressed="true"] { background: var(--white); color: var(--action-dark); border-color: var(--action); }
.efl-on .efl-steps { display: block; }
.efl-on .efl-step { display: block; background: var(--canvas); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px 18px; }
.efl-on .efl-step::before { display: none; }
.efl-on .efl-step[hidden] { display: none; }
.efl-on .efl-step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.efl-on .efl-step p + p { margin-top: 8px; }
.efl-count { font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-ink); margin: 0 0 4px; }

@media (max-width: 900px) {
  .efl-actors { grid-template-columns: minmax(0,1fr); }
  .efl-link { min-height: 56px; min-width: 0; grid-auto-flow: column; justify-content: center; }
  .efl-link::before { left: 50%; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 2px dashed var(--line-strong); }
  .efl-link.is-on::before { border-top: 0; border-left: 3px solid var(--action); }
  .efl-arr::before { content: "\2193"; }
  .efl-link[data-dir="rtl"] .efl-arr::before { content: "\2191"; }
  .efl-play { margin-left: 0; }
}

/* ---------- esw: zonder EDI / met EDI ---------- */
.esw { padding: clamp(16px, 2.4vw, 28px); display: grid; gap: 18px; }
.esw-bar { display: none; }
.esw-on .esw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.esw-head { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-ink); padding: 0 14px; }
.esw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: esw; }
.esw-row { counter-increment: esw; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; align-items: start; background: var(--canvas); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; }
.esw-without, .esw-with { position: relative; padding-left: 40px; font-size: .95rem; color: var(--ink-2); line-height: 1.5; }
.esw-without::before { counter-reset: none; content: counter(esw); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--white); border: 1px solid var(--line-strong); color: var(--navy); font-weight: 800; font-size: .85rem; display: grid; place-items: center; }
.esw-with::before { content: "\2713"; position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--action); color: #fff; font-weight: 800; display: grid; place-items: center; }
.esw-row[data-stay] .esw-with::before { content: "\270B\FE0E"; background: var(--white); color: var(--action-dark); border: 2px solid var(--action); font-size: .8rem; }
.esw-without b, .esw-with b { display: block; color: var(--navy); }
.esw-with small { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; }
/* standaardstand (en zonder JS): Met EDI, de handelingen die wegvallen zijn doorgestreept */
.esw-row:not([data-stay]) .esw-without b, .esw-row:not([data-stay]) .esw-without span { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--line-strong); color: var(--muted); }
.esw[data-mode="zonder"] .esw-without b, .esw[data-mode="zonder"] .esw-without span { text-decoration: none !important; color: inherit; }
.esw[data-mode="zonder"] .esw-without b { color: var(--navy); }
.esw[data-mode="zonder"] .esw-with { visibility: hidden; }
.esw-row { transition: background-color .2s; }
@media (prefers-reduced-motion: reduce) { .esw-row { transition: none; } }
.esw-count { margin: 0; font-size: 1rem; color: var(--navy); font-weight: 700; }
.esw-count span { color: var(--teal-ink); }
@media (max-width: 760px) {
  .esw-head { display: none; }
  .esw-row { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .esw[data-mode="zonder"] .esw-with { display: none; }
}

/* ---------- eft: tabs per onderdeel ---------- */
.eft-tabs { display: none; }
.eft-on .eft-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.eft-panel { display: grid; grid-template-columns: minmax(0,5fr) minmax(0,7fr); gap: 28px 40px; align-items: start; padding-block: 28px; border-top: 1px solid var(--line); }
.eft-panel:first-of-type { border-top: 0; }
.eft-on .eft-panel { border-top: 0; padding-block: 8px 0; }
.eft-on .eft-panel[hidden] { display: none; }
.eft-k { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--action); margin: 0 0 6px; }
.eft-panel h3 { font-size: 1.4rem; margin: 0 0 12px; }
.eft-panel .eft-problem { color: var(--muted); font-weight: 600; margin: 0 0 12px; }
.eft-panel p { color: var(--ink-2); margin: 0 0 12px; max-width: 54ch; }
.eft-gain { background: var(--action-soft); border-radius: var(--r-sm); padding: 12px 14px; color: var(--navy); font-size: .95rem; max-width: 54ch; }
.eft-gain b { color: var(--action-dark); }
.eft-media { display: grid; gap: 14px; min-width: 0; }
.eft-media figure { margin: 0; }
.eft-media figcaption { font-size: .85rem; color: var(--muted); padding: 8px 12px; }
.eft-media .eft-label { max-width: 220px; justify-self: center; }
.eft-media .eft-label img { background: #fff; }
.eft-note { font-size: .85rem; color: var(--muted); }
.eft-peppol { background: var(--canvas); border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 28px; display: grid; gap: 8px; justify-items: start; }
.eft-peppol b { font-size: 1.1rem; color: var(--navy); }
.eft-peppol span { color: var(--ink-2); }
@media (max-width: 820px) { .eft-panel { grid-template-columns: minmax(0,1fr); } }

/* ---------- erc: rekentool ---------- */
.erc { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 0; padding: 0; overflow: hidden; }
.erc-in, .erc-out { padding: clamp(18px, 3vw, 32px); display: grid; gap: 16px; align-content: start; }
.erc-out { background: var(--navy); color: #fff; }
.erc-in h3, .erc-out h3 { margin: 0; font-size: 1.15rem; }
.erc-out h3 { color: #fff; }
.erc-field { display: grid; gap: 6px; }
.erc-field label { font-weight: 700; color: var(--navy); }
.erc-field input { font: inherit; font-size: 1.1rem; font-weight: 700; color: var(--ink); background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 10px 14px; min-height: 48px; width: 100%; max-width: 220px; }
.erc-field input:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; border-color: var(--action); }
.erc-field small { color: var(--muted); font-size: .84rem; }
.erc-res { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.erc-res li { display: grid; gap: 0; }
.erc-big { font-size: 2rem; font-weight: 800; line-height: 1.15; color: #fff; }
.erc-lbl { font-size: .85rem; color: #cfe6ea; }
.erc-own { margin: 0; font-size: .9rem; color: #e6f2f3; border-top: 1px solid rgba(255,255,255,.25); padding-top: 12px; }
.erc-out .btn { justify-self: start; }
.erc-out :focus-visible { outline-color: var(--teal); }
@media (max-width: 760px) { .erc { grid-template-columns: minmax(0,1fr); } }

/* ---------- Plain page parts ---------- */
.edi-need { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.edi-need > div { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.edi-need h3 { font-size: 1.1rem; margin: 0 0 8px; color: var(--navy); }
.edi-need ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; color: var(--ink-2); font-size: .94rem; }
@media (max-width: 900px) { .edi-need { grid-template-columns: minmax(0,1fr); } }
.edi-logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.edi-logos li { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm); height: 80px; display: grid; place-items: center; padding: 12px 18px; font-weight: 700; color: var(--navy); }
.edi-logos img { height: 38px; width: auto; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .2s, opacity .2s; }
.edi-logos li:hover img { filter: none; opacity: 1; }
.edi-logos li.more { background: transparent; border-style: dashed; color: var(--muted); font-weight: 600; text-align: center; }
.edi-fine { font-size: .84rem; color: var(--muted); margin-top: 14px; max-width: 80ch; }
