/* CookieConsent v3 – match previous #cookie__box look + elements-color-* theme */

#cc-main {
    --cc-font-family: "Roboto Mono", monospace;
    --hb-cookie-bg: #f30d0d;
    --cc-bg: var(--hb-cookie-bg);
    --cc-primary-color: #ffffff;
    --cc-secondary-color: #ffffff;
    --cc-btn-primary-bg: var(--hb-cookie-bg);
    --cc-btn-primary-color: #ffffff;
    --cc-btn-primary-border-color: #f6f6f6;
    --cc-btn-primary-hover-bg: #f6f6f6;
    --cc-btn-primary-hover-color: #000000;
    --cc-btn-primary-hover-border-color: #f6f6f6;
    --cc-btn-secondary-bg: var(--hb-cookie-bg);
    --cc-btn-secondary-color: #ffffff;
    --cc-btn-secondary-border-color: #f6f6f6;
    --cc-btn-secondary-hover-bg: #f6f6f6;
    --cc-btn-secondary-hover-color: #000000;
    --cc-btn-secondary-hover-border-color: #f6f6f6;
    --cc-toggle-on-bg: var(--hb-cookie-bg);
    --cc-toggle-off-bg: #888888;
    --cc-toggle-on-knob-bg: #ffffff;
    --cc-toggle-off-knob-bg: #ffffff;
    --cc-cookie-category-block-bg: #f8f8f8;
    --cc-cookie-category-block-border: #e5e5e5;
    --cc-section-border: #e5e5e5;
    --cc-separator-border-color: transparent;
    --cc-overlay-bg: rgba(0, 0, 0, 0.45);
    --cc-modal-border-radius: 0;
    --cc-btn-border-radius: 0;
    --cc-z-index: 999;
}

/* Same palette as Styles.css / _element_colors.scss */
body.elements-color-1 #cc-main { --hb-cookie-bg: #0000cc; }
body.elements-color-2 #cc-main { --hb-cookie-bg: #009900; }
body.elements-color-3 #cc-main { --hb-cookie-bg: #009999; }
body.elements-color-4 #cc-main { --hb-cookie-bg: #0099ff; }
body.elements-color-5 #cc-main { --hb-cookie-bg: #6600cc; }
body.elements-color-6 #cc-main { --hb-cookie-bg: #990000; }
body.elements-color-7 #cc-main { --hb-cookie-bg: #cc3399; }
body.elements-color-8 #cc-main { --hb-cookie-bg: #ff6633; }
body.elements-color-9 #cc-main { --hb-cookie-bg: #ff6699; }
body.elements-color-10 #cc-main { --hb-cookie-bg: #9966ff; }

/* One row on desktop: text left, buttons right (like old #cookie__box) */
#cc-main .cm--bar,
#cc-main .cm--bar.cm--bottom {
    left: 1.072em;
    right: 1.072em;
    bottom: 1.072em;
    max-width: none;
    width: auto;
    border: none;
    box-shadow: none;
    font-family: "Roboto Mono", monospace;
}

#cc-main .cm--bar .cm__body,
#cc-main .cm--bar .cm__links {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
}

#cc-main .cm--bar .cm__body {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px;
    padding: 0.358em 1.215em !important;
    min-height: 3.215em;
}

#cc-main .cm__texts {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 !important;
    overflow: visible;
}

#cc-main .cm__title {
    display: none;
}

#cc-main .cm__desc {
    font-size: 1.144em;
    line-height: 1.35;
    margin: 0;
    padding: 0 !important;
    color: #ffffff;
    max-height: none !important;
    overflow: visible !important;
}

#cc-main .cm__desc a {
    color: #ffffff;
    text-decoration: underline;
}

/* Button grid:
 *   Decline | Accept
 *   Settings
 */
#cc-main .cm--bar .cm__btns {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    justify-content: center;
    gap: 0.5em;
    margin: 0;
    border: none !important;
    border-top: none !important;
    padding: 0 !important;
    width: auto !important;
    max-width: none !important;
    min-width: 14em;
    flex: 0 0 auto;
}

#cc-main .cm--bar .cm__btn-group {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    gap: 0.5em;
    width: 100%;
    margin: 0 !important;
}

#cc-main .cm--bar .cm__btn + .cm__btn,
#cc-main .cm--bar .cm__btn-group + .cm__btn-group {
    margin: 0 !important;
}

#cc-main .cm--bar .cm__btn-group .cm__btn {
    flex: 1 1 0;
}

/* Nie akceptuję | Akceptuję */
#cc-main .cm--bar .cm__btn[data-role="necessary"] {
    order: 1;
}
#cc-main .cm--bar .cm__btn[data-role="all"] {
    order: 2;
}

#cc-main .cm--bar .cm__btn[data-role="show"] {
    flex: 1 1 100%;
    width: 100%;
}

#cc-main .cm__btn {
    text-transform: uppercase;
    border: 2px solid #f6f6f6;
    padding: 0.751em 1.001em;
    background: var(--hb-cookie-bg);
    color: #fff;
    font-family: "Roboto Mono", monospace;
    font-size: 0.858em;
    outline: none !important;
    cursor: pointer;
    white-space: nowrap;
    min-width: 0 !important;
    text-align: center;
}

#cc-main .cm__btn:hover {
    background-color: #f6f6f6;
    color: #000;
}

#cc-main .pm-wrapper .pm {
    font-family: "Roboto Mono", monospace;
    background: #ffffff;
    color: #111111;
    --cc-primary-color: #111111;
    --cc-secondary-color: #444444;
    --cc-btn-primary-bg: var(--hb-cookie-bg);
    --cc-btn-primary-color: #ffffff;
    --cc-btn-primary-border-color: var(--hb-cookie-bg);
    --cc-btn-primary-hover-bg: #111111;
    --cc-btn-primary-hover-color: #ffffff;
    --cc-btn-primary-hover-border-color: #111111;
    --cc-btn-secondary-bg: #ffffff;
    --cc-btn-secondary-color: #111111;
    --cc-btn-secondary-border-color: var(--hb-cookie-bg);
    --cc-btn-secondary-hover-bg: var(--hb-cookie-bg);
    --cc-btn-secondary-hover-color: #ffffff;
    --cc-btn-secondary-hover-border-color: var(--hb-cookie-bg);
}

#cc-main .pm__btn {
    text-transform: uppercase;
    border: 2px solid var(--hb-cookie-bg);
    font-family: "Roboto Mono", monospace;
}

#cc-main .pm__title {
    font-family: "Roboto Mono", monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

#cc-main .pm__section,
#cc-main .pm__section--toggle {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    margin-bottom: 0.715em !important;
}

#cc-main .pm__section-title-wrapper {
    align-items: center;
    width: 100%;
    min-height: 3.215em;
    background: #ffffff;
    border: 2px solid #111111;
    border-radius: 0;
    font-family: "Roboto Mono", monospace;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#cc-main .pm__section-title-wrapper:hover {
    background: #ffffff;
    border-color: #111111;
    color: #111111;
}

#cc-main .pm__section-title-wrapper:hover .pm__section-title {
    color: #111111 !important;
}

#cc-main .pm__section-title-wrapper:hover .toggle__icon {
    border-color: #000 !important;
}

#cc-main .pm__section--toggle .pm__section-title {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: inherit;
    font-family: "Roboto Mono", monospace;
    font-size: 0.858em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-height: 3.215em;
    padding: 0.751em 4.5em 0.751em 1.001em !important;
}

#cc-main .pm__section--toggle .pm__section-title:hover {
    background: transparent !important;
}

#cc-main .pm__section--expandable .pm__section-title {
    padding-left: 2.8em !important;
}

#cc-main .pm__section--expandable .pm__section-arrow {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    width: 1.2em;
    height: 1.2em;
    left: 0.85em;
    color: inherit;
}

#cc-main .pm__section--expandable .pm__section-arrow svg {
    stroke: currentColor;
    transform: scale(0.55);
}

#cc-main .pm__section--toggle.is-expanded > .pm__section-title-wrapper {
    background: #ffffff !important;
    border-color: #111111 !important;
    border-bottom-color: transparent !important;
    color: #111111;
}

#cc-main .pm__section--toggle .pm__section-desc-wrapper {
    background: #ffffff;
    border: 2px solid #111111 !important;
    border-top: none !important;
    border-radius: 0 !important;
}

#cc-main .pm__section-title,
#cc-main .pm__section-desc {
    color: #111111;
    font-family: "Roboto Mono", monospace;
}

#cc-main .pm__section-desc {
    font-size: 0.858em;
    line-height: 1.45;
    padding: 0.858em 1.001em !important;
}

/* Square toggles – match sharp 180hb UI */
#cc-main .section__toggle,
#cc-main .toggle__icon,
#cc-main .toggle__label,
#cc-main .toggle__icon-circle {
    border-radius: 0 !important;
}

#cc-main .section__toggle,
#cc-main .toggle__icon,
#cc-main .toggle__label {
    width: 52px !important;
    height: 26px !important;
}

#cc-main .toggle__icon {
    background: transparent !important;
    box-shadow: none !important;
    border: 2px solid #111111 !important;
    outline: none !important;
    box-sizing: border-box !important;
    overflow: hidden;
}

#cc-main .section__toggle:checked ~ .toggle__icon {
    background: transparent !important;
    box-shadow: none !important;
    border-color: #111111 !important;
}

#cc-main .section__toggle:checked:disabled ~ .toggle__icon {
    background: transparent !important;
    box-shadow: none !important;
    border-color: #888888 !important;
}

#cc-main .toggle__icon-circle {
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #111111 !important;
    /* track 52x26, border 2px => inner 48x22; 2px gap => knob 18x18 */
    width: 18px !important;
    height: 18px !important;
    top: 2px !important;
    left: 2px !important;
    overflow: hidden;
}

#cc-main .toggle__icon-off,
#cc-main .toggle__icon-on {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transform: none !important;
    overflow: hidden;
}

#cc-main .toggle__icon-off svg,
#cc-main .toggle__icon-on svg {
    stroke: #fff !important;
    stroke-width: 2.5 !important;
    width: 10px !important;
    height: 10px !important;
    max-width: 10px;
    max-height: 10px;
    transform: none !important;
    overflow: visible;
}

#cc-main .section__toggle:checked ~ .toggle__icon .toggle__icon-circle {
    background: var(--hb-cookie-bg) !important;
    /* 48 - 2 - 18 - 2 = 26 */
    transform: translateX(26px) !important;
}

#cc-main .section__toggle:checked:disabled ~ .toggle__icon .toggle__icon-circle {
    background: #888888 !important;
}

#cc-main.cc--rtl .toggle__icon-circle {
    transform: translateX(26px) !important;
}

#cc-main.cc--rtl .section__toggle:checked ~ .toggle__icon .toggle__icon-circle {
    transform: translateX(0) !important;
}

/* .copyright is a fixed bottom strip on desktop and would cover a static button */
.cookie-settings-link {
    background: none;
    border: none;
    padding: 1.43em 0;
    color: inherit;
    font-family: inherit;
    font-size: 0.7em;
    text-decoration: underline;
    cursor: pointer;
    position: fixed;
    right: 2.5vw;
    bottom: 0;
    z-index: 1;
}

@media (max-width: 766px) {
    .cookie-settings-link {
        position: static;
        display: block;
        margin: 0 auto;
        padding: 0 0 2.43em;
    }
}

/* Two rows only on mobile (same breakpoint as old #cookie__box) */
@media screen and (max-width: 766px) {
    #cc-main .cm--bar,
    #cc-main .cm--bar.cm--bottom {
        left: 0.358em;
        right: 0.358em;
        bottom: 0.715em;
    }

    #cc-main .cm--bar .cm__body {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0;
        padding: 0.715em 0.715em !important;
    }

    #cc-main .cm__desc {
        font-size: 1.001em;
        line-height: 1.144em;
        padding: 0.358em 0 0.715em !important;
    }

    #cc-main .cm--bar .cm__btns {
        width: 100% !important;
        min-width: 0;
    }
}

@media screen and (min-width: 766px) and (max-width: 1024px) {
    #cc-main .cm--bar,
    #cc-main .cm--bar.cm--bottom {
        left: 0.715em;
        right: 0.715em;
        bottom: 0.858em;
    }

    #cc-main .cm__desc {
        font-size: 1.001em;
        line-height: 1.2;
    }
}
