/*
 * ILLUNOX Downloads — front-end styles for all blocks.
 * Colours come from the active theme's theme.json presets (kc-starter); the
 * fallbacks are the theme's current values.
 * Breakpoints follow the site: tablet 769-1024px, mobile <=768px.
 */

:root {
    --ilx-dark: var(--wp--preset--color--secundair, #404042);
    --ilx-primary: var(--wp--preset--color--primair, #DE3163);
    --ilx-accent: var(--wp--preset--color--accent, #F7CC01);
    --ilx-bg: var(--wp--preset--color--licht-grijs, #F5F5F5);
    --ilx-border: #e2e2df;
    --ilx-text: #1a1c1f;
    --ilx-text-muted: #5a5f6a;
    --ilx-row-hover: #fdf8e1;
    --ilx-row-selected: #fdf3c2;
    --ilx-radius: 4px;
    --ilx-bar-top: 96px;
}

/* Scoped to our own blocks: a global [hidden] rule would hit theme and
   third-party markup on the same page. */
.ilx-start[hidden],
.ilx-cond[hidden],
.ilx-fscroll-hint[hidden] {
    display: none !important;
}

/* ── Buttons ─────────────────────────────────────────── */

.ilx-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--ilx-radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color .14s, color .14s;
}

/* On the pink bar: the primary action is white, the secondary actions grey
   (client feedback round 16-07-2026, Pastel #99). */
.ilx-btn-primary {
    background: #fff;
    color: var(--ilx-dark);
}

.ilx-btn-primary:hover {
    background: var(--ilx-bg);
    color: var(--ilx-dark);
}

.ilx-btn-ghost {
    background: var(--wp--preset--color--midden-grijs, #CCCCCC);
    color: var(--ilx-dark);
    border: 1px solid transparent;
    font-size: 12.5px;
    padding: 8px 12px;
}

.ilx-btn-ghost:hover {
    background: color-mix(in srgb, var(--wp--preset--color--midden-grijs, #CCCCCC) 82%, #000);
    color: var(--ilx-dark);
}

.ilx-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* ── Sticky download bar ─────────────────────────────── */

.ilx-bar {
    position: sticky;
    top: var(--ilx-bar-top);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--ilx-primary);
    border-radius: var(--ilx-radius);
    padding: 14px 22px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
}

.ilx-bar-count {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
}

.ilx-bar-count strong {
    color: #fff;
    font-size: 18px;
    margin-right: 3px;
}

.ilx-bar-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* ── Download item (row with checkbox) ───────────────── */

.ilx-item {
    display: grid;
    grid-template-columns: 22px 1fr auto auto;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid var(--ilx-border);
    border-radius: var(--ilx-radius);
    padding: 13px 18px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: background-color .12s, border-color .12s;
}

.ilx-item:hover {
    background: var(--ilx-row-hover);
    border-color: var(--ilx-accent);
}

.ilx-item.is-selected {
    background: var(--ilx-row-selected);
    border-color: var(--ilx-accent);
}

.ilx-item-txt {
    min-width: 0;
}

.ilx-item-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--ilx-text);
}

.ilx-item-meta {
    display: block;
    font-size: 13px;
    color: var(--ilx-text-muted);
    margin-top: 2px;
}

.ilx-badge {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    border-radius: 3px;
    padding: 2px 7px;
    white-space: nowrap;
    background: var(--ilx-bg);
    border: 1px solid var(--ilx-border);
    color: var(--ilx-text-muted);
}

.ilx-badge-pdf {
    background: #fff0f0;
    border-color: #f5a0a0;
    color: #b00000;
}

.ilx-btn-single {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    color: var(--ilx-primary);
    border: 1px solid var(--ilx-primary);
    border-radius: var(--ilx-radius);
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .13s, color .13s;
}

.ilx-btn-single:hover {
    background: var(--ilx-primary);
    color: #fff;
}

/* ── Checkboxes ──────────────────────────────────────── */

.ilx-check,
.ilx-row-master {
    width: 15px;
    height: 15px;
    accent-color: var(--ilx-primary);
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}

/* ── Download table (LED strips) ─────────────────────── */

.ilx-fwrap {
    border: 1px solid var(--ilx-border);
    border-radius: var(--ilx-radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}

.ilx-ftable {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 13px;
}

.ilx-ftable th,
.ilx-ftable td {
    border: none;
}

/* Header restyled per client feedback round 16-07-2026 (Pastel #102/#103/
   #122/#124): light grey instead of dark, black content, larger type. The
   crafted pictograms keep their dark backdrop as a small chip so their
   white/accent strokes stay visible on the light header. */
.ilx-arow th {
    background: var(--ilx-bg);
    padding: 12px 14px 0;
}

.ilx-arow th.ilx-atitle {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--ilx-text);
}

.ilx-hrow th {
    background: var(--ilx-bg);
    color: var(--ilx-text);
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    vertical-align: bottom;
}

.ilx-hrow th:first-child {
    width: 32px;
    text-align: center;
}

.ilx-hrow th.ilx-col-strip {
    width: 28%;
    background: color-mix(in srgb, var(--ilx-bg) 88%, var(--ilx-accent));
    border-right: 2px solid var(--ilx-accent);
}

.ilx-col-strip > svg,
.ilx-lens-block > svg {
    background: var(--ilx-dark);
    border-radius: 4px;
    padding: 4px 7px;
    box-sizing: content-box;
}

.ilx-col-strip-sub {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--ilx-text);
    margin: 8px 0 0;
}

.ilx-hrow th.ilx-col-fix {
    width: 24%;
    text-align: center;
}

.ilx-lens-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.ilx-lens-lbl {
    font-size: 13px;
    font-weight: 700;
    color: var(--ilx-text);
    text-align: center;
    line-height: 1.3;
    max-width: 140px;
}

.ilx-drow th {
    background: color-mix(in srgb, var(--ilx-bg) 55%, #fff);
    border-bottom: 1px solid var(--ilx-border);
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ilx-text-muted);
    text-align: center;
}

.ilx-drow th.ilx-col-strip-note {
    text-align: left;
    font-size: 11px;
    color: var(--ilx-text-muted);
    background: color-mix(in srgb, var(--ilx-bg) 80%, var(--ilx-accent));
    border-right: 2px solid var(--ilx-accent);
}

.ilx-dbadges {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
}

.ilx-dbadge {
    background: color-mix(in srgb, var(--ilx-accent) 22%, transparent);
    border: 1px solid color-mix(in srgb, var(--ilx-accent) 55%, transparent);
    color: #6b5900;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.ilx-ftable tbody tr {
    border-bottom: 1px solid var(--ilx-border);
    transition: background-color .1s;
}

.ilx-ftable tbody tr:last-child {
    border-bottom: none;
}

.ilx-ftable tbody tr:hover {
    background: var(--ilx-row-hover);
}

.ilx-ftable tbody tr.is-selected {
    background: var(--ilx-row-selected);
}

.ilx-ftable tbody td {
    padding: 12px 14px;
    vertical-align: middle;
}

.ilx-ftable tbody td:first-child {
    text-align: center;
}

.ilx-ftable tbody td.ilx-td-strip {
    background: color-mix(in srgb, var(--ilx-accent) 5%, transparent);
    border-right: 2px solid color-mix(in srgb, var(--ilx-accent) 30%, transparent);
}

.ilx-ftable tbody tr:hover td.ilx-td-strip {
    background: color-mix(in srgb, var(--ilx-accent) 11%, transparent);
}

.ilx-ftable tbody td.is-selected {
    background: color-mix(in srgb, var(--ilx-accent) 18%, transparent);
}

.ilx-frow {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 1px 0;
}

.ilx-frow .ilx-check {
    width: 13px;
    height: 13px;
}

.ilx-flink {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--ilx-primary);
    text-decoration: none;
    padding: 2px 7px;
    border: 1px solid transparent;
    border-radius: 3px;
    white-space: nowrap;
    transition: border-color .12s, background-color .12s;
}

.ilx-flink:hover {
    border-color: var(--ilx-primary);
    background: color-mix(in srgb, var(--ilx-primary) 5%, transparent);
}

.ilx-fext {
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--ilx-bg);
    border: 1px solid var(--ilx-border);
    border-radius: 2px;
    padding: 1px 4px;
    color: var(--ilx-text-muted);
}

.ilx-strip-code {
    font-size: 12px;
    font-weight: 600;
    color: var(--ilx-text);
}

.ilx-strip-spec {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-top: 6px;
}

.ilx-lm {
    color: var(--ilx-primary);
    font-weight: 700;
}

.ilx-kbadge {
    border-radius: 3px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid;
    margin-left: 6px;
}

.ilx-k3000 {
    background: #fff8e6;
    color: #b87800;
    border-color: #e5b830;
}

.ilx-k4000 {
    background: #eef0ff;
    color: #5060a0;
    border-color: #aab0d8;
}

.ilx-fscroll-hint {
    display: none;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--ilx-text-muted);
    margin: 0 0 6px;
}

.ilx-fnote {
    font-size: 12px;
    color: var(--ilx-text-muted);
    margin-top: 9px;
}

/* ── Thank-you page layout ───────────────────────────────
   Utility classes for the thank-you page: applied to ordinary core blocks, so
   the client keeps editing headings, paragraphs and lists as usual. Only the
   decoration (check badge, wedge, step numbers) comes from here.
   ─────────────────────────────────────────────────────── */

.ilx-ty-header {
    position: relative;
    overflow: hidden;
    background: var(--ilx-dark);
    border-radius: var(--ilx-radius) var(--ilx-radius) 0 0;
    /* The bottom padding is what keeps the corner wedge clear of the text, and
       it has to be vertical: the site's own mobile CSS gives every direct child
       of .entry-content a horizontal gutter at a higher specificity, so any
       left padding set here loses on phones. Keep this >= the wedge height. */
    padding: 34px 36px 52px;
}

/* Check badge above the title. */
.ilx-ty-header::before {
    content: "";
    display: block;
    width: 52px;
    height: 52px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: var(--ilx-primary) center / 26px 26px no-repeat;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    position: relative;
    z-index: 2;
}

/* Yellow corner wedge, bottom left. Stays inside the header's bottom padding. */
.ilx-ty-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 44px;
    height: 44px;
    background: var(--ilx-accent);
    clip-path: polygon(0 100%, 0 0, 100% 100%);
    z-index: 1;
}

.ilx-ty-header :where(h1, h2, h3, p) {
    position: relative;
    z-index: 2;
    color: #fff;
}

.ilx-ty-header :where(p) {
    color: rgba(255, 255, 255, 0.68);
    margin-top: 6px;
}

.ilx-ty-body {
    background: #fff;
    border: 1px solid var(--ilx-border);
    border-top: none;
    border-radius: 0 0 var(--ilx-radius) var(--ilx-radius);
    padding: 28px 36px 32px;
}

/* Numbered steps box. A plain ordered list; the pink circles are CSS. */
.ilx-ty-steps {
    background: var(--ilx-bg);
    border-radius: var(--ilx-radius);
    padding: 20px 24px;
}

/* !important is needed here, not preferred: the site's own CSS (stored in the
   database, Weergave -> CSS Editor) sizes every h3 with `font-size: 1.3rem
   !important` at mobile widths, so specificity alone cannot win. */
.ilx-ty-steps :is(h2, h3, h4),
.ilx-ty-steps :is(h2, h3, h4).wp-block-heading {
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ilx-primary);
    margin: 0 0 12px;
}

.ilx-ty-steps ol {
    counter-reset: ilx-step;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ilx-ty-steps ol li {
    counter-increment: ilx-step;
    position: relative;
    padding-left: 32px;
    margin-bottom: 9px;
    font-size: 14px;
    line-height: 1.5;
}

.ilx-ty-steps ol li:last-child {
    margin-bottom: 0;
}

.ilx-ty-steps ol li::before {
    content: counter(ilx-step);
    position: absolute;
    left: 0;
    top: 1px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ilx-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

/* Signature: logo badge plus contact details. */
.ilx-ty-sig {
    display: flex;
    align-items: center;
    gap: 14px;
    border-top: 1px solid var(--ilx-border);
    margin-top: 26px;
    padding-top: 20px;
    font-size: 13px;
    color: var(--ilx-text-muted);
}

.ilx-ty-sig-logo {
    flex-shrink: 0;
    background: var(--ilx-dark);
    color: var(--ilx-accent);
    border-radius: var(--ilx-radius);
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    white-space: nowrap;
}

.ilx-ty-sig :where(p) {
    margin: 0;
    line-height: 1.55;
}

@media (max-width: 768px) {
    .ilx-ty-header {
        padding: 26px 20px 46px;
    }

    .ilx-ty-header::after {
        width: 38px;
        height: 38px;
    }

    .ilx-ty-body {
        padding: 22px 20px 26px;
    }

    .ilx-ty-steps {
        padding: 16px 18px;
    }

    .ilx-ty-sig {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ── Download start (thank-you page) ─────────────────── */

.ilx-start {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff;
    border: 1px solid var(--ilx-border);
    border-left: 4px solid var(--ilx-primary);
    border-radius: var(--ilx-radius);
    padding: 18px 22px;
    margin-bottom: 20px;
}

.ilx-start-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ilx-primary);
    color: #fff;
    flex-shrink: 0;
}

.ilx-start-check svg {
    width: 20px;
    height: 20px;
}

.ilx-start-txt strong {
    display: block;
    font-size: 16px;
    margin-bottom: 3px;
}

.ilx-start-txt span {
    font-size: 14px;
    color: var(--ilx-text-muted);
}

.ilx-start-txt a {
    color: var(--ilx-primary);
}

/* ── Closure notice ──────────────────────────────────── */

.ilx-sluiting {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff8e6;
    border: 1px solid var(--ilx-accent);
    border-radius: var(--ilx-radius);
    padding: 13px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #5c4a00;
    line-height: 1.5;
}

.ilx-sluiting svg {
    width: 19px;
    height: 19px;
    color: #b8860b;
    flex-shrink: 0;
    margin-top: 2px;
}

.ilx-sluiting-txt strong {
    color: #3d3000;
}

.ilx-sluiting-txt p {
    margin: 0;
}

/* ── Toast ───────────────────────────────────────────── */

.ilx-toast {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 9999;
    background: var(--ilx-dark);
    color: #fff;
    padding: 11px 18px;
    border-radius: var(--ilx-radius);
    border-left: 3px solid var(--ilx-accent);
    font-size: 13.5px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s, transform .2s;
    pointer-events: none;
}

.ilx-toast.is-show {
    opacity: 1;
    transform: translateY(0);
}

/* ── Tablet: 769-1024px ──────────────────────────────── */

@media (max-width: 1024px) {
    .ilx-bar {
        top: 0;
    }
}

/* ── Mobile: <=768px ─────────────────────────────────── */

@media (max-width: 768px) {
    .ilx-bar {
        border-radius: 0;
        padding: 12px 16px;
    }

    .ilx-bar-actions {
        width: 100%;
    }

    /* Select/deselect all disappear on mobile: the sticky bar must not grow to
       two rows. The row checkboxes remain available. */
    .ilx-bar-actions .ilx-btn-ghost {
        display: none;
    }

    .ilx-bar-actions .ilx-btn-primary {
        flex: 1;
        justify-content: center;
    }

    .ilx-item {
        grid-template-columns: 22px 1fr auto;
        gap: 10px;
        padding: 11px 12px;
    }

    .ilx-item .ilx-badge {
        display: none;
    }

    .ilx-item-name {
        font-size: 14px;
    }

    .ilx-item-meta {
        font-size: 12px;
    }

    .ilx-fscroll-hint {
        display: flex;
    }

    .ilx-ftable {
        min-width: 560px;
        font-size: 11.5px;
    }

    .ilx-arow th {
        padding: 8px 8px 0;
    }

    .ilx-arow th.ilx-atitle {
        font-size: 13px;
    }

    .ilx-hrow th {
        padding: 8px 8px;
        font-size: 12px;
    }

    .ilx-drow th {
        padding: 6px 8px;
        font-size: 10.5px;
    }

    .ilx-ftable tbody td {
        padding: 9px 8px;
    }

    .ilx-lens-lbl {
        font-size: 11px;
    }

    .ilx-col-strip-sub {
        font-size: 12px;
    }
}
