/* Nieuws en meldingen: ticker, tandwiel en keuzemenu (zie meldingen.js) */

/* Vóór het script klaar is: voorkom dat eerst de losse balken flitsen */
@media (min-width: 1000px) {
	html[data-ilc-meld="boven"] .ilc-melding:has(.ilc-melding__close),
	html[data-ilc-meld="onder"] .ilc-melding:has(.ilc-melding__close),
	html[data-ilc-meld="verborgen"] .ilc-melding:has(.ilc-melding__close) { display: none; }
}
.ilc-melding.ilc-melding--weg { display: none; }

/* Ticker */
.ilc-ticker { display: flex; align-items: stretch; height: 40px; background: #fff; color: #fff; }
.ilc-ticker--onder { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000; box-sizing: border-box; height: 42px; padding-top: 2px; box-shadow: 0 -6px 14px rgba(0, 0, 0, .22); }
/* Scheidingslijn tussen twee panelen: schaduwlijn boven, lichtlijn direct tegen de berichten */
.ilc-ticker--onder::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; pointer-events: none; background: linear-gradient(to bottom, #8d949c 0 1px, #fff 1px); }
html.ilc-ticker-onder body { padding-bottom: 42px; }
html.ilc-ticker-onder .ilc-menu-hint { bottom: calc(42px + 1.1rem); }
.ilc-ticker__venster { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.ilc-ticker--stil .ilc-ticker__venster { overflow-x: auto; scrollbar-width: none; }
.ilc-ticker__baan { display: flex; width: max-content; will-change: transform; }
.ilc-ticker__item { display: flex; align-items: center; gap: .6rem; height: 40px; margin: 0; padding: 0 18px; white-space: nowrap; background: var(--wp--preset--color--secondary); color: #fff; font-size: calc(.95rem - 1px); font-weight: 500; }
.ilc-ticker__item--let-op { background: var(--wp--preset--color--primary); }
.ilc-ticker__item--storing { background: #b3261e; }
.ilc-ticker__item--opgelost { background: #1b7a3a; }
a.ilc-ticker__item, a.ilc-ticker__item:hover, a.ilc-ticker__item:focus { color: #fff; text-decoration: none; }
a.ilc-ticker__item:hover { filter: brightness(1.1); }
a.ilc-ticker__item:focus-visible { outline: 3px solid #fff; outline-offset: -4px; }
.ilc-ticker__knop { border: 1px solid rgba(255, 255, 255, .8); border-radius: 6px; padding: 0 .55rem; font-size: calc(.95rem - 2px); font-weight: 700; line-height: 1.55; }
a.ilc-ticker__item:hover .ilc-ticker__knop { background: #fff; color: var(--wp--preset--color--black); }

/* Knoppen in de bovenbalk */
.ilc-meldknop { display: flex; align-items: center; justify-content: center; border: 0; padding: 0; color: #fff; cursor: pointer; transition: background .2s; }
.ilc-meldknop:hover, .ilc-meldknop[aria-expanded="true"] { background: var(--wp--preset--color--primary); }
.ilc-meldknop:focus-visible { outline: 3px solid #fff; outline-offset: -4px; }

/* Belletje in de bovenbalk, links van de status */
.ilc-topbar__status { align-items: center; }
.ilc-topbar__status .ilc-melding-herstel { flex: none; margin: 0; padding: .2rem .6rem; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; }
.ilc-topbar__status .ilc-melding-herstel.ilc-melding-herstel--verborgen { background: var(--wp--preset--color--primary); }
.ilc-topbar__status .ilc-melding-herstel:hover, .ilc-topbar__status .ilc-melding-herstel:focus-visible, .ilc-topbar__status .ilc-melding-herstel[aria-expanded="true"] { background: var(--wp--preset--color--primary); filter: brightness(1.12); }
.ilc-topbar__status .ilc-melding-herstel svg { width: 16px; height: 16px; }

/* Doorgestreept oog met aantal verborgen berichten, links van het belletje in de bovenbalk */
.ilc-meldoog { gap: .35rem; font: inherit; font-size: .82rem; font-weight: 700; line-height: 1; }
.ilc-topbar__status .ilc-meldoog { flex: none; margin: 0; padding: .2rem .6rem; border-radius: 999px; background: rgba(255, 255, 255, .12); }
.ilc-topbar__status .ilc-meldoog:hover { background: var(--wp--preset--color--primary); }
.ilc-topbar__status .ilc-meldoog svg { width: 16px; height: 16px; }

/* Belletje met aantal rechts in de ticker onderaan */
.ilc-tickerbel { position: relative; z-index: 1; flex: 0 0 auto; display: flex; align-items: center; gap: .35rem; margin: 0; padding: 0 .9rem; border: 0; background: var(--wp--preset--color--black); box-shadow: -14px 0 18px rgba(0, 0, 0, .25); color: #fff; font: inherit; font-size: .82rem; font-weight: 700; line-height: 1; cursor: pointer; transition: background .2s; }
.ilc-tickerbel.ilc-tickerbel--verborgen { background: var(--wp--preset--color--primary); }
.ilc-tickerbel:hover, .ilc-tickerbel[aria-expanded="true"] { background: var(--wp--preset--color--primary); filter: brightness(1.12); }
.ilc-tickerbel:focus-visible { outline: 3px solid #fff; outline-offset: -4px; }

/* Uitleg na het wegklikken van alle meldingen: belletje licht 2x op, dan menu met gloeiende rand en tekst eronder */
.ilc-topbar__status .ilc-melding-herstel.ilc-roept { animation: ilc-belroep .5s ease-in-out 2; }
@keyframes ilc-belroep { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 178, 122, 0), 0 0 0 0 rgba(228, 96, 20, 0); } 50% { box-shadow: 0 0 0 3px #ffb27a, 0 0 16px 7px rgba(255, 125, 40, .9); } }
.ilc-meldmenu.ilc-meldmenu--gloed { box-shadow: 0 0 0 3px var(--wp--preset--color--primary), 0 0 22px 6px rgba(228, 96, 20, .55), 0 18px 44px rgba(0, 0, 0, .28); animation: ilc-meldin .35s ease-out both, ilc-meldgloed .8s ease-in-out .35s infinite alternate; }
.ilc-meldmenu.ilc-meldmenu--gloed.ilc-meldmenu--uit { animation: ilc-meldweg .35s ease-in forwards; }
@keyframes ilc-meldin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes ilc-meldweg { from { opacity: 1; } to { opacity: 0; } }
@keyframes ilc-meldgloed { from { box-shadow: 0 0 0 3px var(--wp--preset--color--primary), 0 0 10px 2px rgba(228, 96, 20, .4), 0 18px 44px rgba(0, 0, 0, .28); } to { box-shadow: 0 0 0 3px var(--wp--preset--color--primary), 0 0 30px 10px rgba(228, 96, 20, .7), 0 18px 44px rgba(0, 0, 0, .28); } }
.ilc-meldmenu .ilc-meldmenu__uitleg { position: absolute; left: 0; right: 0; top: calc(100% + 12px); margin: 0; padding: .65rem .75rem; border-radius: 10px; background: var(--wp--preset--color--primary); box-shadow: 0 10px 26px rgba(0, 0, 0, .3); color: #fff; font-weight: 700; line-height: 1.35; text-align: center; }
@media (prefers-reduced-motion: reduce) {
	.ilc-topbar__status .ilc-melding-herstel.ilc-roept { animation: none; box-shadow: 0 0 0 3px #ffb27a; }
	.ilc-meldmenu.ilc-meldmenu--gloed, .ilc-meldmenu.ilc-meldmenu--gloed.ilc-meldmenu--uit { animation: none; }
}

/* Buiten de homepage: meldingen pas zichtbaar na een klik op het belletje */
html:not(.ilc-meld-nu) body:not(.home) .ilc-melding { display: none; }

/* Uitleg: het belletje blijft gloeien zolang het menu met de tekst zichtbaar is */
.ilc-topbar__status .ilc-melding-herstel.ilc-gloeit { animation: ilc-belgloei .8s ease-in-out infinite alternate; }
@keyframes ilc-belgloei { from { box-shadow: 0 0 0 3px #ffb27a, 0 0 8px 2px rgba(255, 125, 40, .55); } to { box-shadow: 0 0 0 3px #ffb27a, 0 0 18px 8px rgba(255, 125, 40, .95); } }
@media (prefers-reduced-motion: reduce) { .ilc-topbar__status .ilc-melding-herstel.ilc-gloeit { animation: none; box-shadow: 0 0 0 3px #ffb27a; } }

/* Keuzemenu */
.ilc-meldmenu { position: fixed; z-index: 100000; width: 330px; max-width: calc(100vw - 16px); box-sizing: border-box; padding: .6rem; background: #fff; color: var(--wp--preset--color--black); border-radius: 12px; box-shadow: 0 4px 10px rgba(0, 0, 0, .12), 0 18px 44px rgba(0, 0, 0, .28); font-size: .88rem; line-height: 1.3; text-align: left; }
.ilc-meldmenu[hidden] { display: none; }
.ilc-meldmenu .ilc-meldmenu__titel { display: block; padding: .35rem .6rem .55rem; font-size: .9rem; font-weight: 800; color: var(--wp--preset--color--black); }
.ilc-meldmenu button { display: flex; align-items: center; gap: .6rem; width: 100%; margin: 0; padding: .55rem .6rem; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ilc-meldmenu button::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 2px #b8bec4; }
.ilc-meldmenu button:hover, .ilc-meldmenu button:focus-visible { background: #eef1f3; }
.ilc-meldmenu button[aria-pressed="true"] { background: #fdf0e8; font-weight: 700; }
.ilc-meldmenu button[aria-pressed="true"]::before { background: var(--wp--preset--color--primary); box-shadow: none; }

@media (max-width: 999px) { .ilc-meldmenu { display: none; } }

/* Geen meldingsbalk of ticker zichtbaar bovenin: oranje rand van 4 px, onder de balk 'Verborgen meldingen weergeven' als die er staat, anders bovenaan */
.wp-site-blocks > header.wp-block-template-part:not(:has(.ilc-melding:not([hidden]):not(.ilc-melding--weg), .ilc-ticker, .ilc-melding-herstelbalk:not([hidden])))::before { content: ""; display: block; height: 4px; background: var(--wp--preset--color--primary); }
.wp-site-blocks > header.wp-block-template-part:not(:has(.ilc-melding:not([hidden]):not(.ilc-melding--weg), .ilc-ticker)) .ilc-melding-herstelbalk:not([hidden]) { border-bottom: 4px solid var(--wp--preset--color--primary); }

/* Categorie-icoontje vóór de berichttitel (balken en ticker, alle schermbreedtes) */
.ilc-melding--storing, .ilc-ticker__item--storing { --ilc-cat: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272.2%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M10.3%203.9%201.8%2018a2%202%200%200%200%201.7%203h17a2%202%200%200%200%201.7-3L13.7%203.9a2%202%200%200%200-3.4%200z%27%2F%3E%3Cpath%20d%3D%27M12%209v4%27%2F%3E%3Cpath%20d%3D%27M12%2017h.01%27%2F%3E%3C%2Fsvg%3E"); }
.ilc-melding--let-op, .ilc-ticker__item--let-op { --ilc-cat: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272.2%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M10.3%203.9%201.8%2018a2%202%200%200%200%201.7%203h17a2%202%200%200%200%201.7-3L13.7%203.9a2%202%200%200%200-3.4%200z%27%2F%3E%3Cpath%20d%3D%27M12%209v4%27%2F%3E%3Cpath%20d%3D%27M12%2017h.01%27%2F%3E%3C%2Fsvg%3E"); }
.ilc-melding--info, .ilc-ticker__item--info { --ilc-cat: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272.2%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%2710%27%2F%3E%3Cpath%20d%3D%27M12%2016v-4%27%2F%3E%3Cpath%20d%3D%27M12%208h.01%27%2F%3E%3C%2Fsvg%3E"); }
.ilc-melding--opgelost, .ilc-ticker__item--opgelost { --ilc-cat: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272.2%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%2710%27%2F%3E%3Cpath%20d%3D%27m8.5%2012.5%202.5%202.5%204.5-5%27%2F%3E%3C%2Fsvg%3E"); }
.ilc-melding__text::before, .ilc-ticker__item > span:first-child::before { content: ""; display: inline-block; width: 1.2em; height: 1.2em; margin-right: .45em; vertical-align: -.24em; background: currentColor; -webkit-mask: var(--ilc-cat) center / contain no-repeat; mask: var(--ilc-cat) center / contain no-repeat; }
/* Storingsmeldingen uit de statusapp: icoontje volgt de status */
.ilc-melding[data-icoon="storing"], .ilc-ticker__item[data-icoon="storing"] { --ilc-cat: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272.2%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M10.3%203.9%201.8%2018a2%202%200%200%200%201.7%203h17a2%202%200%200%200%201.7-3L13.7%203.9a2%202%200%200%200-3.4%200z%27%2F%3E%3Cpath%20d%3D%27M12%209v4%27%2F%3E%3Cpath%20d%3D%27M12%2017h.01%27%2F%3E%3C%2Fsvg%3E"); }
.ilc-melding[data-icoon="onderzoek"], .ilc-ticker__item[data-icoon="onderzoek"] { --ilc-cat: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2030%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272.2%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M1.5%2012s3-6.2%208.5-6.2%208.5%206.2%208.5%206.2-3%206.2-8.5%206.2S1.5%2012%201.5%2012z%27%2F%3E%3Ccircle%20cx%3D%2710%27%20cy%3D%2712%27%20r%3D%272.4%27%2F%3E%3Cpath%20d%3D%27M22.3%207.6a3%203%200%200%201%205.8%201c0%202-2.9%202.4-2.9%204.6%27%2F%3E%3Cpath%20d%3D%27M25.2%2017.6h.01%27%2F%3E%3C%2Fsvg%3E"); }
.ilc-melding[data-icoon="monitoring"], .ilc-ticker__item[data-icoon="monitoring"] { --ilc-cat: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272.2%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M2%2012s3.6-7%2010-7%2010%207%2010%207-3.6%207-10%207-10-7-10-7z%27%2F%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%273%27%2F%3E%3C%2Fsvg%3E"); }
.ilc-melding[data-icoon="onderzoek"] .ilc-melding__text::before, .ilc-ticker__item[data-icoon="onderzoek"] > span:first-child::before { width: 1.6em; height: 1.28em; vertical-align: -.28em; }

/* Mobiel: één balk als accordeon (zie meldingen.js) */
.ilc-acc__icoon { display: none; }
.ilc-acc__tekst { display: contents; }
@media (max-width: 781px) {
	/* vóór het script klaar is alleen de eerste balk, zodat de pagina niet verspringt */
	html[data-ilc-meld] .ilc-melding ~ .ilc-melding { display: none; }
	.ilc-acc { position: relative; height: 76px; overflow: hidden; overflow: clip; touch-action: pan-y; }
	/* even brede lagen over elkaar; meldingen.js schuift ze (transform), de volgende dekt de vorige af */
	.ilc-acc > .ilc-melding { position: absolute; left: 0; top: 0; box-sizing: border-box; height: 76px; overflow: hidden; cursor: pointer; isolation: isolate; will-change: transform; transition: transform .7s ease; }
	.ilc-acc > .ilc-melding:hover { filter: none; }
	.ilc-acc > .ilc-melding + .ilc-melding { border-top: 0; border-left: 1px solid rgba(255, 255, 255, .38); }
	.ilc-acc .ilc-melding__inner { display: flex; align-items: center; justify-content: flex-start; gap: 0; height: 100%; max-width: none; margin: 0; padding: 0; }
	.ilc-acc__icoon { display: block; flex: 0 0 36px; height: 100%; background: currentColor; -webkit-mask: var(--ilc-cat) center / 18px 18px no-repeat; mask: var(--ilc-cat) center / 18px 18px no-repeat; }
	.ilc-acc .ilc-melding[data-icoon="onderzoek"] .ilc-acc__icoon { -webkit-mask-size: 24px 19px; mask-size: 24px 19px; }
	.ilc-acc .ilc-acc__icoon--svg { display: flex; align-items: center; justify-content: center; background: none; -webkit-mask: none; mask: none; }
	.ilc-acc__icoon--svg svg { flex: none; width: 18px; height: 18px; }
	.ilc-acc .ilc-melding[data-icoon="onderzoek"] .ilc-acc__icoon--svg svg { width: 24px; height: 19px; }
	.ilc-acc .ilc-melding__text::before { display: none; }
	.ilc-acc__tekst { display: block; flex: 0 0 auto; line-height: 1.5; opacity: 0; transition: opacity .2s; }
	.ilc-acc .ilc-melding--open .ilc-acc__tekst { opacity: 1; transition: opacity .4s .35s; }
	.ilc-acc .ilc-melding__close { visibility: hidden; right: 2px; }
	.ilc-acc .ilc-melding--open .ilc-melding__close { visibility: visible; }
	.ilc-acc--stil *, .ilc-acc--stil > .ilc-melding { transition: none !important; }
}
/* Minder beweging: wel wisselen, maar verspringen in plaats van schuiven */
@media (prefers-reduced-motion: reduce) { .ilc-acc *, .ilc-acc > .ilc-melding { transition: none !important; } }

.ilc-melding-herstel[hidden], .ilc-topbar__status .ilc-melding-herstel[hidden] { display: none !important; }
