/*
 * Nokytech_Klaro - storefront styles.
 *
 * Colors and sizes come from the admin (Stores > Configuration > Nokytech > Klaro Cookie Consent > Design):
 * klaro.phtml prints them as --klaro-* custom properties on :root. They are mapped below onto
 * Klaro's own variables, plus a few overrides where Klaro hard-codes its dark theme.
 * Fonts are not configurable: Klaro uses font-family: inherit, so the theme font always applies.
 */
:root {
    --klaro-primary-color: #3B82F6;
    --klaro-text-color: #000000;
    --klaro-background-color: #FFFFFF;
    --klaro-accept-text-color: #FFFFFF;
    --klaro-decline-background-color: #FFFFFF;
    --klaro-decline-text-color: #000000;
    --klaro-toggle-off-color: #C6C6C6;
    --klaro-floating-button-color: var(--klaro-primary-color);
    --klaro-border-radius: 10px;
    --klaro-notice-max-width: 470px;
}

.klaro {
    --dark1: var(--klaro-background-color);
    --dark2: var(--klaro-toggle-off-color);
    --light1: var(--klaro-text-color);
    --green1: var(--klaro-primary-color);
    --green2: var(--klaro-primary-color);
    --green3: var(--klaro-primary-color);
    --blue1: var(--klaro-primary-color);
    --blue2: var(--klaro-primary-color);
    --button-text-color: var(--klaro-accept-text-color);
    --border-radius: var(--klaro-border-radius);
    --notice-max-width: var(--klaro-notice-max-width);
    --notice-left: 20px;
    --notice-right: auto;
}

/* Banner + modal surfaces */
.klaro .cookie-notice:not(.cookie-modal-notice),
.klaro .cookie-modal .cm-modal.cm-klaro {
    background: var(--klaro-background-color) !important;
    border-radius: var(--klaro-border-radius);
}

.klaro .cookie-notice:not(.cookie-modal-notice) {
    box-shadow: 0 4px 6px 0 rgba(0, 0, 0, .2), 5px 5px 10px 0 rgba(0, 0, 0, .19);
}

.klaro .cookie-notice:not(.cookie-modal-notice) .cn-body {
    color: var(--klaro-text-color);
    line-height: 1.6;
}

.klaro .cookie-modal p, .klaro .cookie-modal strong, .klaro .cookie-modal h1, .klaro .cookie-modal h2,
.klaro .cookie-modal ul, .klaro .cookie-modal li, .klaro .cookie-modal span,
.klaro .context-notice p, .klaro .context-notice strong, .klaro .context-notice h1, .klaro .context-notice h2,
.klaro .context-notice ul, .klaro .context-notice li,
.klaro .cookie-notice p, .klaro .cookie-notice strong, .klaro .cookie-notice h1, .klaro .cookie-notice h2,
.klaro .cookie-notice ul, .klaro .cookie-notice li {
    color: var(--klaro-text-color) !important;
}

.klaro .cookie-modal .cm-modal .hide svg {
    stroke: var(--klaro-text-color) !important;
}

/* Links */
.klaro .cookie-modal a,
.klaro .context-notice a,
.klaro .cookie-notice a,
.klaro .cm-link.cn-learn-more {
    color: var(--klaro-primary-color) !important;
}

.klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-ok {
    align-items: center;
}

/* Borders */
.klaro .cookie-modal .cm-modal .cm-header {
    border-bottom-color: var(--klaro-primary-color) !important;
}

.klaro .cookie-modal .cm-modal .cm-footer,
.klaro .cookie-modal .cm-modal .cm-body ul.cm-services li.cm-toggle-all,
.klaro .cookie-modal .cm-modal .cm-body ul.cm-purposes li.cm-toggle-all {
    border-top-color: var(--klaro-primary-color) !important;
}

/* klaro.js focuses the banner / modal box itself when it opens (accessibility). Browsers then draw a
   focus ring around the whole box on first load (no pointer interaction yet = :focus-visible).
   Keep the focus, hide the ring on the containers only: buttons, links and switches keep theirs. */
.klaro .cookie-notice:focus,
.klaro .cookie-notice:focus-visible,
.klaro .cookie-modal .cm-modal:focus,
.klaro .cookie-modal .cm-modal:focus-visible {
    outline: none;
}

/* Buttons */
.klaro .cm-btn {
    border-radius: calc(var(--klaro-border-radius) / 2);
}

.klaro .cm-btn.cm-btn-success,
.klaro .cm-btn.cm-btn-accept-all,
.klaro .cm-btn.cm-btn-accept {
    padding: 10px 20px !important;
    background: var(--klaro-primary-color) !important;
    color: var(--klaro-accept-text-color) !important;
}

.klaro .cm-btn.cm-btn-danger,
.klaro .cm-btn.cn-decline {
    background: var(--klaro-decline-background-color) !important;
    color: var(--klaro-decline-text-color) !important;
}

/* Switches */
.klaro .cm-list-label .slider {
    background-color: var(--klaro-toggle-off-color) !important;
}

.klaro .cm-list-label .slider::before {
    background-color: #FFFFFF !important;
}

.klaro .cm-list-input:checked + .cm-list-label .slider,
.klaro .cm-list-input.half-checked:checked + .cm-list-label .slider {
    background-color: var(--klaro-primary-color) !important;
}

/* Cookie icon usable in texts: <span class='klaro-cookies-img'></span> */
.klaro-cookies-img {
    background-image: url('../img/1548612994.svg');
    width: 24px;
    height: 24px;
    display: inline-block;
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: bottom;
    position: relative;
    top: 5px;
    left: 5px;
}

/* Floating "change settings" button */
.klaro-config {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    box-shadow: none;
    cursor: pointer;
    color: var(--klaro-floating-button-color);
    line-height: 0;
}

/* Themes style every <button> on hover/focus/active (e.g. Luma: "button:hover" grey background +
   border, "button:not(.primary):active" inset shadow): the floating button must stay a bare icon in
   every state. "body button.klaro-config" (0,2,2) outranks those rules whatever the CSS load order. */
body button.klaro-config:hover,
body button.klaro-config:focus,
body button.klaro-config:active {
    background: none;
    border: none;
    box-shadow: none;
    color: var(--klaro-floating-button-color);
}

.klaro-config svg {
    width: 32px;
    height: 32px;
}

.klaro-config:focus-visible {
    outline: 2px solid var(--klaro-floating-button-color);
    outline-offset: 2px;
}

@media (max-width: 660px) {
    .klaro .cookie-notice:not(.cookie-modal-notice) {
        max-width: 98%;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        bottom: 4px;
    }

    .klaro .cookie-modal .cm-modal.cm-klaro {
        width: 98% !important;
        left: 50%;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
}

/* Banner title: kept for screen readers (accessible name of the notice dialog), not shown visually */
.klaro .cookie-notice #id-cookie-title {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
