/* Signature: aedmarkt.nl "Vervaldatum" (zonderslop, 23-11). Load after kit.css and themes/aedmarkt.css. Prefix am-.
 * Built from the AED world:
 * - the device card (.am-label) reads like the label on an electrode pack: big expiry dates with the hourglass "use by" symbol,
 *   a status per fact (.am-state--ok/--soon/--expired/--unknown, always symbol + word, never colour alone);
 * - the ready light (.am-ready): the small status window every AED has, green when the last self-test passed;
 * - the price tag (.am-tag): offer / free / wanted, hung on the listing photo like a market tag;
 * - the cabinet (.am-cabinet): the hero search sits in a wall cabinet with its green sign strip and handle;
 * - the sign (.am-signboard): green AED wall sign with a white inner border, used for the aedplein block and the footer.
 * Pictograms: icons/aedmarkt/sprite.svg (am-*). Colours only via theme tokens.
 */

/* ---------- Logo ---------- */
.zs-logo:has(.am-mark) { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; letter-spacing: -.01em; }
.am-mark { width: 2.4rem; height: 2.4rem; flex: none; }
.zs-logo b { font-weight: 400; opacity: .85; }

/* ---------- Pictogram tiles ---------- */
.am-picto { --picto-bg: var(--zs-picto); display: inline-grid; place-items: center; flex: none; width: 3rem; height: 3rem;
  border-radius: var(--zs-radius-sm); background: var(--zs-picto); color: var(--zs-picto-ink); }
.am-picto svg { width: 70%; height: 70%; }
.am-picto--sm { width: 2.1rem; height: 2.1rem; border-radius: 6px; }
.am-picto--lg { width: 4rem; height: 4rem; border-radius: 12px; }
.am-picto--line { --picto-bg: var(--zs-surface); background: transparent; color: var(--zs-brand-text); width: 1.6rem; height: 1.6rem; }
.am-picto--line svg { width: 100%; height: 100%; }
.am-ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; --picto-bg: var(--zs-surface); color: var(--zs-brand-text); }

/* ---------- Status: symbol + word, colours reserved for device facts ---------- */
.am-state { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem .2rem .3rem; border-radius: 999px; font-size: .88rem; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.am-state svg { width: 1.15rem; height: 1.15rem; flex: none; }
.am-state--ok { background: var(--am-ok); color: var(--am-ok-ink); --picto-bg: var(--am-ok); }
.am-state--soon { background: var(--am-soon); color: var(--am-soon-ink); --picto-bg: var(--am-soon); }
.am-state--expired { background: var(--am-expired); color: var(--am-expired-ink); --picto-bg: var(--am-expired); }
.am-state--unknown { background: var(--am-unknown); color: var(--am-unknown-ink); --picto-bg: var(--am-unknown); }

/* ---------- Ready light: the AED status window ---------- */
.am-ready { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--zs-muted); }
.am-ready__win { position: relative; display: inline-grid; place-items: center; width: 1.6rem; height: 1.25rem; border-radius: 5px;
  background: var(--zs-ink); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--zs-ink) 60%, var(--zs-line)); }
.am-ready__win::after { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 .45rem #3ddc84; animation: am-blink 2.4s steps(1) infinite; }
.am-ready--off .am-ready__win::after { background: #7b8a83; box-shadow: none; animation: none; }
@keyframes am-blink { 0%, 80% { opacity: 1; } 81%, 100% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .am-ready__win::after { animation: none; } }

/* ---------- Price tag on a listing photo ---------- */
.am-tag { --hole: .32rem; display: inline-flex; align-items: center; gap: .3rem; min-height: 2.1rem; padding: .3rem .8rem .3rem 1.35rem;
  background: var(--am-tag); color: var(--am-tag-ink); font: 700 1.05rem/1 var(--zs-font-display); letter-spacing: -.01em;
  clip-path: polygon(.75rem 0, 100% 0, 100% 100%, .75rem 100%, 0 50%);
  -webkit-mask: radial-gradient(circle var(--hole) at .85rem 50%, transparent 98%, #000) ; mask: radial-gradient(circle var(--hole) at .85rem 50%, transparent 98%, #000);
  border-radius: 0 6px 6px 0; }
.am-tag--free { background: var(--am-tag-free); color: var(--am-tag-free-ink); }
.am-tag--wanted { background: var(--am-tag-wanted); color: var(--am-tag-wanted-ink); }
.am-tag small { font: 600 .78rem/1 var(--zs-font-body); }

/* ---------- Listing cards ---------- */
.am-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.am-card { position: relative; display: flex; flex-direction: column; background: var(--zs-surface); border: 1px solid var(--zs-line); border-radius: var(--zs-radius); overflow: hidden; }
.am-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--zs-surface-alt); }
.am-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.am-card__media .am-tag { position: absolute; left: .7rem; top: .8rem; transform: rotate(-3deg); box-shadow: 0 2px 0 rgb(0 0 0 / .12); }
.am-card__body { display: grid; gap: .55rem; padding: .95rem 1rem 1.05rem; flex: 1; align-content: start; }
.am-card h3 { font-size: 1.2rem; color: var(--zs-ink); }
.am-card h3 a { color: inherit; text-decoration: none; }
.am-card h3 a::after { content: ""; position: absolute; inset: 0; }
.am-card:has(h3 a:focus-visible) { outline: 3px solid var(--am-focus); outline-offset: 3px; }
.am-card h3 a:focus-visible { outline: none; }
.am-card:hover { border-color: var(--zs-brand); }
.am-where { display: flex; flex-wrap: wrap; gap: .2rem .8rem; margin: 0; font-size: .92rem; color: var(--zs-muted); }
.am-where span { display: inline-flex; align-items: center; gap: .3rem; }
/* Mini label strip on a card: the three dates that decide whether the unit still works. */
.am-mini { display: grid; gap: .35rem; margin: .2rem 0 0; padding: .6rem 0 0; border-top: 1px dashed var(--zs-line); font-size: .9rem; }
.am-mini div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .5rem; }
.am-mini .am-state { font-size: .8rem; padding: .12rem .5rem .12rem .25rem; }
.am-mini dt { display: inline-flex; align-items: center; gap: .35rem; color: var(--zs-muted); }
.am-mini dd { margin: 0; }

/* ---------- Device card: the electrode-pack label ---------- */
.am-label { background: var(--am-label); color: var(--am-label-ink); border: 2px solid var(--am-label-line); border-radius: var(--zs-radius); overflow: hidden; }
.am-label__head { display: flex; align-items: center; gap: .7rem; padding: .75rem 1.1rem; background: var(--am-sign); color: var(--am-sign-ink); }
.am-label__head svg { width: 1.8rem; height: 1.8rem; --picto-bg: var(--am-sign); }
.am-label__head h2 { color: inherit; font-size: 1.25rem; }
.am-label__head p { margin: 0 0 0 auto; font-size: .88rem; opacity: .92; }
.am-label__dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); border-bottom: 2px solid var(--am-label-line); }
.am-date { display: grid; grid-template-columns: auto 1fr; gap: .1rem .75rem; align-items: center; padding: 1rem 1.1rem; }
.am-date + .am-date { border-left: 2px solid var(--am-label-line); }
@media (max-width: 40rem) { .am-date + .am-date { border-left: 0; border-top: 2px solid var(--am-label-line); } }
.am-date svg.am-hourglass { grid-row: span 3; width: 2.6rem; height: 2.6rem; color: var(--am-label-ink); --picto-bg: var(--am-label); }
.am-date__what { font-size: .9rem; color: var(--zs-muted); }
.am-date__when { font: 700 clamp(1.7rem, 2vw + 1rem, 2.3rem)/1 var(--zs-font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.am-date .am-state { justify-self: start; margin-top: .3rem; white-space: normal; }
.am-label { align-self: start; }
.am-facts { margin: 0; display: grid; }
.am-facts > div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .2rem .8rem; align-items: center; padding: .75rem 1.1rem; }
.am-facts > div + div { border-top: 1px solid var(--am-label-line); }
.am-facts dt { font-weight: 600; }
.am-facts dd { margin: 0; grid-column: 2; color: var(--zs-muted); font-size: .95rem; }
.am-facts .am-state { grid-row: 1 / span 2; grid-column: 3; }
.am-facts .am-picto { grid-row: 1 / span 2; }
@media (max-width: 30rem) { .am-facts > div { grid-template-columns: auto minmax(0, 1fr); } .am-facts .am-state { grid-row: auto; grid-column: 2; justify-self: start; } }
.am-label__foot { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; padding: .8rem 1.1rem; background: var(--zs-surface-alt); color: var(--zs-ink); font-size: .92rem; }
.am-label__foot p { margin: 0; }

/* ---------- Hero search in a wall cabinet ---------- */
.am-cabinet { position: relative; margin-top: 1.6rem; max-width: 54rem; background: var(--am-glass); color: var(--zs-ink); border-radius: 16px;
  border: 3px solid var(--zs-surface); box-shadow: 0 20px 40px -28px rgb(0 0 0 / .7); }
.am-cabinet__sign { display: flex; align-items: center; gap: .55rem; padding: .55rem .95rem; background: var(--am-sign); color: var(--am-sign-ink); border-radius: 12px 12px 0 0; font: 700 1rem/1.2 var(--zs-font-display); }
.am-cabinet__sign svg { width: 1.5rem; height: 1.5rem; --picto-bg: var(--am-sign); }
.am-cabinet form { display: grid; gap: .7rem; padding: .95rem; }
.am-cabinet::after { content: ""; position: absolute; right: -.55rem; top: 45%; width: .55rem; height: 3.2rem; border-radius: 0 6px 6px 0; background: var(--zs-surface); }
@media (min-width: 44rem) { .am-cabinet form { grid-template-columns: minmax(0, 1fr) minmax(0, .75fr) auto auto; align-items: end; } }
@media (max-width: 44rem) { .am-cabinet::after { display: none; } }
.am-field { display: grid; gap: .25rem; font-size: .88rem; font-weight: 600; color: var(--zs-muted); }
.am-field input, .am-field select, .am-field textarea { font: inherit; font-size: 1rem; font-weight: 400; color: var(--zs-ink); min-height: 2.9rem; padding: .6rem .7rem;
  border: 1.5px solid var(--zs-line); border-radius: var(--zs-radius-sm); background: var(--zs-surface); width: 100%; }
.am-field textarea { min-height: 7rem; resize: vertical; }
.am-field input:focus-visible, .am-field select:focus-visible, .am-field textarea:focus-visible { outline: 3px solid var(--am-focus); outline-offset: 1px; }
.am-field small { font-weight: 400; color: var(--zs-muted); }
.am-switch { display: inline-flex; border: 1.5px solid var(--zs-line); border-radius: var(--zs-radius-sm); overflow: hidden; background: var(--zs-surface); }
.am-switch label { position: relative; }
.am-switch input { position: absolute; opacity: 0; inset: 0; }
.am-switch span { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.75rem; padding: .5rem .9rem; font-weight: 600; color: var(--zs-ink); cursor: pointer; }
.am-switch input:checked + span { background: var(--am-sign); color: var(--am-sign-ink); }
.am-switch input:focus-visible + span { outline: 3px solid var(--am-focus); outline-offset: -3px; }
.am-switch svg { width: 1.15rem; height: 1.15rem; --picto-bg: var(--zs-surface); }
.am-switch input:checked + span svg { --picto-bg: var(--am-sign); }

/* ---------- Sign: green AED wall sign with a white inner border ---------- */
.am-signboard { position: relative; display: grid; gap: 1rem 1.5rem; align-items: center; padding: 1.6rem; border-radius: 18px; background: var(--am-sign); color: var(--am-sign-ink);
  box-shadow: inset 0 0 0 6px var(--am-sign), inset 0 0 0 9px color-mix(in srgb, var(--am-sign-ink) 92%, transparent); }
.am-signboard h2, .am-signboard h3 { color: inherit; }
.am-signboard p { margin: .4rem 0 0; max-width: 40rem; }
.am-signboard__sym { width: 4.5rem; height: 4.5rem; color: var(--am-sign-ink); --picto-bg: var(--am-sign); }
.am-signboard .zs-btn { justify-self: start; }
.am-signboard__arrow { display: inline-block; width: 1.4rem; height: 1rem; }
@media (min-width: 48rem) { .am-signboard { grid-template-columns: auto minmax(0, 1fr) auto; padding: 1.8rem 2.2rem; } }
.am-btn-sign { background: var(--am-sign-ink); color: var(--am-sign); }
.am-btn-sign:hover { background: color-mix(in srgb, var(--am-sign-ink) 88%, var(--am-sign)); color: var(--am-sign); }

/* ---------- Route chooser on home: offer / wanted / free ---------- */
.am-routes { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.am-route { position: relative; display: grid; grid-template-columns: auto 1fr; gap: .25rem .9rem; align-items: start; padding: 1.1rem; background: var(--zs-surface); border: 1px solid var(--zs-line); border-radius: var(--zs-radius); }
.am-route .am-picto { grid-row: span 2; }
.am-route h3 { font-size: 1.15rem; color: var(--zs-ink); }
.am-route h3 a { color: inherit; text-decoration: none; }
.am-route h3 a::after { content: ""; position: absolute; inset: 0; }
.am-route p { margin: 0; color: var(--zs-muted); font-size: .95rem; }
.am-route:hover { border-color: var(--zs-brand); }
.am-route:has(a:focus-visible) { outline: 3px solid var(--am-focus); outline-offset: 3px; }

/* ---------- Checklist page: printable check lines ---------- */
.am-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; counter-reset: am; }
.am-check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .3rem 1rem; padding: 1.1rem 1.2rem; background: var(--zs-surface); border: 1px solid var(--zs-line); border-left: 6px solid var(--am-sign); border-radius: var(--zs-radius); }
.am-check .am-picto { grid-row: span 3; }
.am-check h3 { font-size: 1.2rem; color: var(--zs-ink); }
.am-check p { margin: 0; }
.am-check__how { color: var(--zs-muted); font-size: .95rem; }
.am-check__box { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .95rem; }
.am-check__box input { width: 1.3rem; height: 1.3rem; accent-color: var(--am-sign); }
.am-src { font-size: .85rem; color: var(--zs-muted); }
@media (max-width: 30rem) { .am-check { grid-template-columns: 1fr; } .am-check .am-picto { grid-row: auto; } }
@media print { .zs-header nav, .zs-hero, .zs-footer, .am-noprint { display: none !important; } .am-check { break-inside: avoid; } }

/* ---------- Step form ---------- */
.am-steps { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.am-steps li { display: grid; justify-items: center; gap: .35rem; text-align: center; font-size: .85rem; font-weight: 600; color: var(--zs-muted); padding-top: .6rem; border-top: 4px solid var(--zs-line); }
.am-steps li.is-done { border-top-color: var(--am-sign); color: var(--zs-ink); }
.am-steps li[aria-current] { border-top-color: var(--zs-accent); color: var(--zs-ink); }
.am-steps .am-picto { width: 2.2rem; height: 2.2rem; }
.am-steps li:not(.is-done):not([aria-current]) .am-picto { --picto-bg: var(--zs-surface-alt); background: var(--zs-surface-alt); color: var(--zs-muted); }
.am-form { display: grid; gap: 1.1rem; background: var(--zs-surface); border: 1px solid var(--zs-line); border-radius: var(--zs-radius); padding: clamp(1rem, 3vw, 1.75rem); }
.am-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: .9rem; }
.am-form legend { display: flex; align-items: center; gap: .6rem; font: 700 1.2rem/1.2 var(--zs-font-display); color: var(--zs-brand-text); margin-bottom: .4rem; }
.am-form__row { display: grid; gap: .9rem; }
@media (min-width: 40rem) { .am-form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.am-req { color: var(--zs-ink); font-weight: 700; }
.am-form__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center; }
.am-photo-drop { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; align-items: center; padding: 1rem; border: 2px dashed var(--zs-line); border-radius: var(--zs-radius); background: var(--zs-bg); }
.am-photo-drop .am-picto { grid-row: span 2; }
.am-photo-drop p { margin: 0; color: var(--zs-muted); font-size: .92rem; }

/* ---------- Detail page layout ---------- */
.am-detail { display: grid; gap: 1.5rem; }
@media (min-width: 60rem) { .am-detail { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; } .am-aside { position: sticky; top: 1rem; } }
.am-gallery { display: grid; gap: .5rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.am-gallery figure { margin: 0; position: relative; border-radius: var(--zs-radius-sm); overflow: hidden; background: var(--zs-surface-alt); }
.am-gallery figure:first-child { grid-column: 1 / -1; border-radius: var(--zs-radius); }
.am-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.am-gallery figcaption { position: absolute; left: .5rem; bottom: .5rem; padding: .15rem .5rem; border-radius: 6px; font-size: .78rem; color: #fff; background: rgb(0 0 0 / .6); }
.am-gallery .am-tag { position: absolute; left: .8rem; top: .9rem; transform: rotate(-3deg); }
.am-crumbs { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 1rem; padding: 0; list-style: none; font-size: .9rem; color: var(--zs-muted); }
.am-crumbs li + li::before { content: "›"; margin-right: .3rem; }
.am-panel { background: var(--zs-surface); border: 1px solid var(--zs-line); border-radius: var(--zs-radius); padding: 1.15rem; display: grid; gap: .8rem; }
.am-panel h2 { font-size: 1.25rem; display: flex; align-items: center; gap: .55rem; }
.am-panel p { margin: 0; }
.am-panel ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; }
.am-panel--tips { border-left: 6px solid var(--zs-highlight); }
.am-panel--hn { background: var(--zs-surface-alt); border-color: transparent; }
.am-seller { display: flex; align-items: center; gap: .8rem; }
.am-seller p { line-height: 1.35; }
.am-report { display: inline-flex; align-items: center; gap: .4rem; font-size: .92rem; color: var(--zs-muted); }

/* ---------- Footer as the sign ---------- */
.am-footer.zs-footer { background: var(--zs-brand-deep); }
.am-footer__sign { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.6rem; }
.am-footer__sign .am-mark { width: 3rem; height: 3rem; color: #fff; }
.am-footer__sign p { margin: 0; max-width: 36rem; }
.zs-hero__credit { left: 1rem; text-align: right; }
