/**
 * Copyright © Veyx. All rights reserved.
 *
 * Maps the module's CSS custom properties onto the variables the vendored CookieConsent build
 * already exposes. The values of --veyx-cc-* are published per store view by
 * Veyx_CookieConsent::head.phtml, so changing a colour in the Admin never requires a static
 * content deployment and never produces a store-specific CSS file.
 *
 * Only variables are overridden here: the library stylesheet itself is left untouched.
 */

#cc-main {
    /* Surfaces and text. */
    --cc-bg: var(--veyx-cc-bg, #ffffff);
    --cc-primary-color: var(--veyx-cc-text, #212121);
    /* Descriptions follow the main text colour so a dark palette stays readable. */
    --cc-secondary-color: var(--veyx-cc-text, #212121);
    --cc-link-color: var(--veyx-cc-link, #006bb4);

    /* Primary action. */
    --cc-btn-primary-bg: var(--veyx-cc-primary-bg, #1979c3);
    --cc-btn-primary-color: var(--veyx-cc-primary-text, #ffffff);
    --cc-btn-primary-border-color: var(--veyx-cc-primary-bg, #1979c3);
    --cc-btn-primary-hover-bg: var(--veyx-cc-primary-hover-bg, #006bb4);
    --cc-btn-primary-hover-color: var(--veyx-cc-primary-hover-text, #ffffff);
    --cc-btn-primary-hover-border-color: var(--veyx-cc-primary-hover-bg, #006bb4);

    /* Secondary action — this is the "reject non-essential" button, kept equally prominent. */
    --cc-btn-secondary-bg: var(--veyx-cc-secondary-bg, #e8e8e8);
    --cc-btn-secondary-color: var(--veyx-cc-secondary-text, #333333);
    --cc-btn-secondary-border-color: var(--veyx-cc-secondary-bg, #e8e8e8);
    --cc-btn-secondary-hover-bg: var(--veyx-cc-secondary-hover-bg, #d6d6d6);
    --cc-btn-secondary-hover-color: var(--veyx-cc-secondary-hover-text, #333333);
    --cc-btn-secondary-hover-border-color: var(--veyx-cc-secondary-hover-bg, #d6d6d6);

    /* Toggles follow the primary colour. */
    --cc-toggle-on-bg: var(--veyx-cc-primary-bg, #1979c3);
    --cc-toggle-on-knob-bg: var(--veyx-cc-primary-text, #ffffff);
    --cc-toggle-enabled-icon-color: var(--veyx-cc-primary-bg, #1979c3);

    /*
     * Chrome that has no dedicated Admin field is derived from the two configured base colours, so
     * a dark popup background does not end up with light grey panels. Browsers without color-mix()
     * simply keep the library's own light defaults.
     */
    --cc-cookie-category-block-bg: color-mix(in srgb, var(--veyx-cc-text, #212121) 6%, var(--veyx-cc-bg, #ffffff));
    --cc-cookie-category-block-hover-bg: color-mix(in srgb, var(--veyx-cc-text, #212121) 12%, var(--veyx-cc-bg, #ffffff));
    --cc-cookie-category-expanded-block-bg: color-mix(in srgb, var(--veyx-cc-text, #212121) 10%, var(--veyx-cc-bg, #ffffff));
    --cc-cookie-category-expanded-block-hover-bg: color-mix(in srgb, var(--veyx-cc-text, #212121) 16%, var(--veyx-cc-bg, #ffffff));
    --cc-cookie-category-block-border: color-mix(in srgb, var(--veyx-cc-text, #212121) 16%, var(--veyx-cc-bg, #ffffff));
    --cc-cookie-category-block-hover-border: color-mix(in srgb, var(--veyx-cc-text, #212121) 26%, var(--veyx-cc-bg, #ffffff));
    --cc-separator-border-color: color-mix(in srgb, var(--veyx-cc-text, #212121) 16%, var(--veyx-cc-bg, #ffffff));
    --cc-section-category-border: color-mix(in srgb, var(--veyx-cc-text, #212121) 16%, var(--veyx-cc-bg, #ffffff));
    --cc-footer-bg: color-mix(in srgb, var(--veyx-cc-text, #212121) 4%, var(--veyx-cc-bg, #ffffff));
    --cc-footer-color: var(--veyx-cc-text, #212121);
    --cc-footer-border-color: color-mix(in srgb, var(--veyx-cc-text, #212121) 16%, var(--veyx-cc-bg, #ffffff));
}

/*
 * Permanent entry point back into the preferences.
 *
 * The wrapper is a full-width, centred band so the link reads as the last line of the page on
 * any theme. The button is reset back to a plain link: themes style bare <button> heavily, and
 * some do it with a selector that outranks a single class — Smartwave/Porto ships
 * `button:not(.primary)` (0,1,1) — so the reset is scoped through the wrapper class (0,2,0) to
 * win on specificity without a single !important.
 */
.veyx-cc-preferences {
    box-sizing: border-box;
    clear: both;
    padding: 1.5rem 1rem;
    text-align: center;
    width: 100%;
}

/* Inside the Luma footer links list the surrounding <ul> already provides the spacing. */
li.veyx-cc-preferences {
    padding: 0;
    width: auto;
}

.veyx-cc-preferences .veyx-cc-preferences__button {
    -webkit-appearance: none;
    appearance: none;
    background: none;
    background-image: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: inherit;
    cursor: pointer;
    display: inline-block;
    float: none;
    font: inherit;
    height: auto;
    letter-spacing: inherit;
    line-height: inherit;
    margin: 0;
    min-width: 0;
    opacity: 1;
    padding: 0;
    text-align: center;
    text-decoration: underline;
    text-shadow: none;
    text-transform: none;
    vertical-align: baseline;
    width: auto;
}

.veyx-cc-preferences .veyx-cc-preferences__button:hover,
.veyx-cc-preferences .veyx-cc-preferences__button:focus,
.veyx-cc-preferences .veyx-cc-preferences__button:active {
    background: none;
    border: 0;
    box-shadow: none;
    color: inherit;
    opacity: 1;
    text-decoration: none;
}

.veyx-cc-preferences .veyx-cc-preferences__button:focus-visible {
    outline: 1px dotted currentColor;
    outline-offset: 2px;
}
