/*!
 * Infragistics cookie consent — banner styles.
 *
 * GENERATED FILE. Copied from src/styles/consent.css in the
 * Marketing-Infragistics repo; do not edit this copy, it is overwritten on
 * every deploy.
 *
 * Every rule is scoped under .igd-consent / #igd-consent and the file defines
 * its own custom properties, so it will not touch a host page's own styles.
 */
/* ===========================================================================
 * consent.css — the cookie consent banner (components/ConsentBanner.astro).
 *
 * Styled to match the consent block on infragistics.com, so the two properties
 * look like one site while they run on separate codebases. Ported from the
 * Umbraco block's own CSS (the `.gdpr-block` / `.ig-tooltip` RawHtml macro)
 * plus the shared `.ui-btn` / `.ui-form__checkbox` rules — the same rules
 * newsletter-form.css already vendors for the footer signup form.
 *
 * Local `--igc-*` tokens rather than literals scattered through the file, the
 * same convention ig-footer.css (`--igft-*`) uses for vendored chrome.
 *
 * SELF-SUFFICIENT BY DESIGN — the `--igd-*` scale is pinned here too. It used
 * to be read from styles/tokens.css, which came across with this file from the
 * blog and which THIS site never imports, so all sixteen references resolved to
 * nothing. A `var()` that does not resolve is invalid at computed-value time,
 * which means `line-height` silently inherited — and the parent is the ⓘ button
 * at `line-height: 0`, so every tooltip box collapsed to its 10px of padding
 * and the category descriptions overflowed it as unreadable overlapping text,
 * on desktop hover and on mobile alike. `gap` fell back to 0 and
 * `border-radius: 50%` to a square, in the same silent way.
 *
 * The values below are tokens.css's own, copied at the point of that fix. The
 * banner renders on all 1140 pages and is the last thing that should depend on
 * another stylesheet being present, so it now depends on none.
 *
 * ⚠ CONFIRM `--igc-surface` against the main site's `bgColor--cello`. It is the
 * one value read off a screenshot rather than out of source, so it may be a
 * shade out. Everything else below is copied from the real rules.
 *
 * Imported by its component rather than by blog-global.css — colocation, not
 * code-splitting: the banner renders on every page, so it lands in the same
 * shared chunk regardless.
 * ========================================================================= */

.igd-consent {
    /* --- Scale, pinned locally: see "SELF-SUFFICIENT BY DESIGN" above ----- */
    --igd-font-body:
        'aktiv-grotesk', 'AktivGrotesk Local', 'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        Helvetica, Arial, sans-serif;
    --igd-text-xs: 0.8rem;
    --igd-text-sm: 0.875rem;
    --igd-text-xl: 1.15rem;
    --igd-leading-snug: 1.3;
    --igd-leading-normal: 1.6;
    --igd-weight-bold: 700;
    --igd-space-3xs: 0.25rem;
    --igd-space-2xs: 0.375rem;
    --igd-space-xs: 0.5rem;
    --igd-space-sm: 0.75rem;
    --igd-space-md: 1rem;
    --igd-space-lg: 1.25rem;
    --igd-radius-xl: 0.75rem;
    --igd-radius-circle: 50%;
    --igd-motion-fast: 0.15s ease;

    /* --- Ported main-site values ---------------------------------------- */
    --igc-surface: #2c4257; /* the card — bgColor--cello ⚠ see above */
    --igc-accent: #0099ff; /* ui-btn--default */
    /* The tooltip's text, and NOT --igc-accent. Upstream draws these
       descriptions in #0099ff on the #fff tooltip, which measures 3.00:1 and
       fails WCAG AA (4.5:1) — on the copy that explains what is being consented
       to, which is the informed half of informed consent. #0b6fbf measures
       5.20:1 on the same background and is otherwise the same blue. The button
       keeps --igc-accent: there the blue is a BACKGROUND under white text. */
    --igc-tip-ink: #0b6fbf;
    --igc-ink: #fff;
    --igc-check-fill: #1f5d79; /* checked box background */
    --igc-check-mark: #000; /* the tick itself */
    --igc-check-border-hover: #e6e6e6;
    --igc-check-mark-hover: #101010;
    --igc-tip-bg: #fff;

    /* --- Placement: bottom: 30px; left: 8vw, as upstream ------------------ */
    position: fixed;
    z-index: 2147483640;
    inset-block-end: 30px;
    inset-inline-start: 8vw;
    inline-size: auto;
    box-sizing: border-box;
    /* MUST stay visible: the category tooltips are absolutely positioned
       ABOVE their trigger and would be clipped by any scroll container. */
    overflow: visible;
    padding: 1.5rem;
    border-radius: var(--igd-radius-xl);
    background: var(--igc-surface);
    color: var(--igc-ink);
    box-shadow: 0 8px 32px rgb(0 0 0 / 28%);
    font-family: var(--igd-font-body);
    font-size: var(--igd-text-sm);
    line-height: var(--igd-leading-normal);
}

.igd-consent[hidden] {
    display: none;
}

/* Upstream widths: the summary is a narrow column, the settings panel is the
   wider `.features-block`. The card sizes to whichever view is showing. */
.igd-consent__view[data-view='summary'] {
    max-inline-size: 340px;
}

/* Upstream is 560px, but it only has to fit four categories with no reject
   button. Widened just enough that the category row stays on ONE line — it
   wrapping 3-then-1 looks broken, and stacking is what the 960px step is for. */
.igd-consent__view[data-view='settings'] {
    max-inline-size: 640px;
}

.igd-consent__view[hidden] {
    display: none;
}

/* --- Type --------------------------------------------------------------- */

.igd-consent__title {
    margin: 0 0 var(--igd-space-xs);
    font-size: var(--igd-text-xl);
    font-weight: var(--igd-weight-bold);
    line-height: var(--igd-leading-snug);
    color: var(--igc-ink);
}

/* Focus lands here when the banner opens; the ring would otherwise sit on a
   heading nobody clicked. Every real control keeps its visible focus state. */
.igd-consent__title:focus {
    outline: none;
}

.igd-consent__text {
    margin: 0 0 var(--igd-space-lg);
    color: var(--igc-ink);
}

.igd-consent__text a {
    color: var(--igc-accent);
    text-decoration: none;
}

.igd-consent__text a:hover {
    text-decoration: underline;
}

/* --- Buttons: .ui-btn / .ui-btn--default, vendored ----------------------- *
 * Square corners, bold, and the signature inversion on hover: a filled blue
 * button becomes transparent with a blue border and blue text. Focus gets the
 * same treatment upstream, so keyboard and pointer users see one state. */

.igd-consent__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--igd-space-sm);
}

.igd-consent__btn {
    background: var(--igc-accent);
    border: 1px solid var(--igc-accent);
    border-radius: 0;
    box-sizing: border-box;
    color: var(--igc-ink);
    cursor: pointer;
    display: inline-block;
    font-family: inherit;
    font-size: var(--igd-text-xs);
    font-weight: var(--igd-weight-bold);
    line-height: 1em;
    min-inline-size: 118px;
    padding: 0.8em 1.2em;
    text-align: center;
    text-decoration: none;
    transition: all 0.4s;
}

.igd-consent__btn:hover,
.igd-consent__btn:focus-visible {
    background: transparent;
    border-color: var(--igc-accent);
    color: var(--igc-accent);
}

.igd-consent__btn:focus-visible {
    outline: 2px solid var(--igc-ink);
    outline-offset: 2px;
}

/* The summary's second row: "Manage settings" on its own line. Three controls
   will not fit across a 300px-class card, and shrinking them to fit would make
   Decline All read as the lesser option — which is the one thing this layout
   must not do. */
.igd-consent__actions--secondary {
    margin-block-start: var(--igd-space-2xs);
}

/* "Manage settings" — plain text, no button chrome. Normal weight so it does
   not compete with the two filled buttons above it; upstream sets it bold,
   which is the one place this deviates on purpose. */
.igd-consent__btn--quiet {
    background: transparent;
    border-color: transparent;
    color: var(--igc-ink);
    font-weight: 400;
    min-inline-size: 0;
    padding: 0.75em 0;
}

.igd-consent__btn--quiet:hover,
.igd-consent__btn--quiet:focus-visible {
    background: transparent;
    border-color: transparent;
    color: var(--igc-ink);
    text-decoration: underline;
}

/* --- Category row ------------------------------------------------------- *
 * Upstream lays the four options out inline; flex-wrap keeps that on one line
 * where it fits and stacks them where it does not. */

.igd-consent__cats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--igd-space-sm) var(--igd-space-md);
    margin: var(--igd-space-lg) 0;
    padding: 0;
    list-style: none;
}

.igd-consent__cat {
    display: flex;
    align-items: center;
    gap: var(--igd-space-3xs);
}

/* --- The custom checkbox ------------------------------------------------ *
 * Same construction as .ui-form__checkbox: a drawn box plus a rotated-border
 * tick, driven off the real input's :checked state.
 *
 * ONE DELIBERATE DIFFERENCE from upstream. The main site hides the real input
 * with `visibility: hidden`, which also removes it from the tab order — the
 * control cannot be reached or toggled by keyboard at all. Here it is opacity-0
 * and laid over the drawn box, so it stays focusable and operable while looking
 * identical, and :focus-visible is forwarded to the box below. */

.igd-consent__cat-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--igd-space-xs);
    cursor: pointer;
    padding-inline-start: 1.5rem;
    line-height: 1.4;
}

.igd-consent__cat-input {
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: 50%;
    transform: translateY(-50%);
    inline-size: 1.125rem;
    block-size: 1.125rem;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.igd-consent__cat-box {
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: 50%;
    transform: translateY(-50%);
    inline-size: 1.125rem;
    block-size: 1.125rem;
    box-sizing: border-box;
    background: transparent;
    border: 2px solid var(--igc-ink);
    border-radius: 5px;
    pointer-events: none;
}

/* The tick: two borders of a zero-size box, rotated. */
.igd-consent__cat-box::after {
    content: '';
    position: absolute;
    inset-inline-start: 4px;
    inset-block-start: 0;
    inline-size: 5px;
    block-size: 10px;
    border: solid var(--igc-check-mark);
    border-width: 0 2px 2px 0;
    transform: rotate(37deg) scale(0);
    transition: transform var(--igd-motion-fast);
}

.igd-consent__cat-input:checked ~ .igd-consent__cat-box {
    background: var(--igc-check-fill);
    border-color: var(--igc-check-fill);
}

.igd-consent__cat-input:checked ~ .igd-consent__cat-box::after {
    transform: rotate(37deg) scale(1);
}

/* Hover, as upstream: an UNCHECKED box lightens its border and darkens its
   tick. A CHECKED box keeps its fill — upstream gets that from the `.gdpr-block`
   prefix outweighing its unprefixed hover rule; here it needs saying, or the
   filled box grows a pale ring on hover that the main site never shows. */
.igd-consent__cat-label:hover .igd-consent__cat-box {
    border-color: var(--igc-check-border-hover);
}

.igd-consent__cat-label:hover .igd-consent__cat-box::after {
    border-color: var(--igc-check-mark-hover);
}

.igd-consent__cat-label:hover .igd-consent__cat-input:checked ~ .igd-consent__cat-box {
    border-color: var(--igc-check-fill);
}

.igd-consent__cat-input:focus-visible ~ .igd-consent__cat-box {
    outline: 2px solid var(--igc-ink);
    outline-offset: 2px;
}

.igd-consent__cat-input:disabled {
    cursor: not-allowed;
}

.igd-consent__cat-input:disabled ~ .igd-consent__cat-box {
    opacity: 0.75;
}

/* No letter-spacing: upstream sets none, and the extra tracking is enough on
   its own to push the fourth category onto a second line. */
.igd-consent__cat-name {
    text-transform: uppercase;
    font-size: var(--igd-text-xs);
    color: var(--igc-ink);
    white-space: nowrap;
}

/* --- Tooltip: .ig-tooltip / .ig-tooltiptext, vendored ------------------- *
 * White box, accent-blue text, centred above the trigger with a small pointer.
 *
 * DELIBERATE DIFFERENCE: upstream hangs this off a non-focusable <span> and
 * shows it on :hover only, so the category descriptions are unreachable by
 * keyboard or touch — and those descriptions are how a visitor learns what
 * they are agreeing to. The trigger here is a real <button> and the tooltip
 * also shows on :focus-visible. Same appearance, same hover behaviour. */

.igd-consent__tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: none;
    color: var(--igc-ink);
    cursor: pointer;
    line-height: 0;
}

.igd-consent__tip svg {
    inline-size: 10px;
    block-size: 10px;
    fill: currentcolor;
}

.igd-consent__tip:focus-visible {
    outline: 2px solid var(--igc-ink);
    outline-offset: 2px;
    border-radius: var(--igd-radius-circle);
}

.igd-consent__tip-text {
    /* Opacity + pointer-events, NOT `visibility: hidden` as upstream. Visibility
       removes the element from the accessibility tree, which would silently
       break the `aria-describedby` each checkbox points at it — the tooltip
       would be the only place the description lives and screen readers would
       get nothing. Visually identical, including upstream's 0.6s fade. */
    opacity: 0;
    pointer-events: none;
    position: absolute;
    inset-block-end: 125%;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    inline-size: 160px;
    padding: 5px;
    border-radius: 6px;
    background: var(--igc-tip-bg);
    color: var(--igc-tip-ink);
    font-size: 0.675rem;
    line-height: var(--igd-leading-normal);
    text-align: center;
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
    z-index: 1;
    transition: opacity 0.6s;
}

/* The pointer, drawn as a solid-top border triangle. */
.igd-consent__tip-text::after {
    content: '';
    position: absolute;
    inset-block-start: 100%;
    inset-inline-start: 50%;
    margin-inline-start: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--igc-tip-bg) transparent transparent transparent;
}

.igd-consent__tip:hover .igd-consent__tip-text,
.igd-consent__tip:focus-visible .igd-consent__tip-text {
    opacity: 1;
}

/* --- Narrow viewports: upstream's 960px step ---------------------------- */

@media only screen and (max-width: 960px) {
    .igd-consent {
        inset-block-end: 30px;
        inset-inline-start: 15px;
        inline-size: calc(100% - 30px);
        max-inline-size: 380px;
        /* Safe to scroll here ONLY because the tooltips stop floating below —
           see the block further down. Without that, a scroll container would
           clip them; without this, the settings view (~770px tall at this
           width) runs off the top of a short viewport with its heading and
           intro unreachable. */
        max-block-size: calc(100dvh - 60px);
        overflow-y: auto;
    }

    .igd-consent__view[data-view='summary'],
    .igd-consent__view[data-view='settings'] {
        max-inline-size: 100%;
    }

    .igd-consent__cats {
        gap: var(--igd-space-sm) var(--igd-space-md);
    }

    .igd-consent__btn {
        flex: 1 1 auto;
    }

    /* Tooltips become plain text beneath each label. Two reasons: a floating
       tooltip cannot survive the scroll container above, and there is no hover
       on touch anyway — the description would be a tap away at best. Same DOM,
       so nothing changes for screen readers. */
    .igd-consent__cat {
        display: block;
        flex: 1 1 100%;
    }

    .igd-consent__tip {
        display: block;
        cursor: default;
        /* The base rule zeroes this to keep the 10px ⓘ glyph from padding the
           inline row. Here the description is in NORMAL FLOW inside this
           button, so a zero line-height collapses its line boxes to nothing and
           the text paints straight over the category below it — the panel looks
           fine while the copy explaining each category is unreadable. */
        line-height: var(--igd-leading-normal);
        text-align: start;
    }

    .igd-consent__tip svg {
        display: none;
    }

    .igd-consent__tip-text {
        /* Block, not inline: it is a paragraph under the label now, and it has
           to contribute its own height to the row. */
        display: block;
        position: static;
        transform: none;
        opacity: 1;
        inline-size: auto;
        padding: var(--igd-space-3xs) 0 0 1.5rem;
        background: none;
        color: var(--igc-ink);
        text-align: start;
    }

    .igd-consent__tip-text::after {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .igd-consent__btn,
    .igd-consent__tip-text,
    .igd-consent__cat-box::after {
        transition: none;
    }
}

/* Not part of the article. Printing or exporting a post to PDF should not
   carry a consent dialog into the output. */
@media print {
    .igd-consent {
        display: none !important;
    }
}
