:root {
    --srsc-accent: #7ebf00;
    --srsc-accent-hover: #7ebf00;
    --srsc-text: #22252a;
    --srsc-muted: #6b7280;
    --srsc-border: rgba(0, 0, 0, 0.10);
    --srsc-success: #219a22;
    --srsc-height: 0px;
}

.srsc-sticky-cart {
    position: fixed;
    right: 0;
    bottom: -1px;
    left: 0;
    z-index: 99990;
    width: 100%;
    color: var(--srsc-text);
    background: rgba(255, 255, 255, 0.985);
    box-shadow: 0 -1px 8px #0000001a;
    transform: translate3d(0, calc(100% + 96px), 0);
    visibility: hidden;
    transition:
        transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 420ms;
    will-change: transform;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    isolation: isolate;
}

/*
 * Vult bewust een extra strook onder de balk. Vooral iOS Safari kan tijdens
 * het in- en uitklappen van de browserbalk heel kort een compositor-kier
 * onder een fixed element tonen. De overscan blijft buiten het zichtbare
 * vlak, maar voorkomt dat de pagina er tussendoor zichtbaar wordt.
 */
.srsc-sticky-cart::after {
    position: absolute;
    top: calc(100% - 2px);
    right: 0;
    left: 0;
    height: 96px;
    background: #fff;
    content: "";
    pointer-events: none;
}

.srsc-sticky-cart.is-visible {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    transition-delay: 0s;
}

/*
 * Na de eenmalige inschuifanimatie wordt de transform verwijderd. Dit geeft
 * mobile Safari een echt vast, niet-meeschuivend fixed element.
 */
.srsc-sticky-cart.is-visible.is-settled {
    transform: none;
    transition: none;
    will-change: auto;
}

.srsc-sticky-cart__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100%, 1280px);
    min-height: 60px;
    margin: 0 auto;
    padding: 5px 15px calc(5px + env(safe-area-inset-bottom));
    gap: 28px;
}

.srsc-sticky-cart__product {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
    gap: 13px;
}

.srsc-sticky-cart__thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.srsc-sticky-cart__image {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
}

.srsc-sticky-cart__details {
    width: 0;
    min-width: 0;
    flex: 1 1 auto;
}

.srsc-sticky-cart__title {
    display: block;
    width: 100%;
    max-width: none;
    overflow: hidden;
    color: var(--srsc-text);
    font-weight: 700;
    line-height: 1.32;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.srsc-sticky-cart__shipping-message {
    display: block;
    min-height: 18px;
    width: 100%;
    max-width: none;
    margin-top: 3px;
    overflow: hidden;
    color: #7ebf00;
    font-weight: 500;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.srsc-sticky-cart__shipping-message[hidden],
.srsc-sticky-cart__shipping-message:empty {
    display: none !important;
}

.srsc-sticky-cart__shipping-message a {
    display: inline-flex;
    align-items: center;
    margin-left: 3px;
    vertical-align: middle;
}

.srsc-sticky-cart__shipping-message img {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.srsc-sticky-cart__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    flex: 0 1 auto;
    gap: 12px;
}

.srsc-sticky-cart__price {
    min-width: 120px;
    max-width: 290px;
    color: var(--srsc-text);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.22;
    text-align: right;
    white-space: nowrap;
}

.srsc-sticky-cart__price .price,
.srsc-sticky-cart__price .amount,
.srsc-sticky-cart__price ins {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.srsc-sticky-cart__price ins {
    text-decoration: none;
}

.srsc-sticky-cart__price del {
    margin-right: 5px;
    color: #7d8188;
    font-size: 0.82em;
    font-weight: 500;
    opacity: 1;
}

.srsc-sticky-cart__price small,
.srsc-sticky-cart__price .woocommerce-price-suffix {
    display: block;
    margin-top: 2px;
    color: var(--srsc-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.15;
}

.srsc-sticky-cart__button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 218px;
    min-height: 48px;
    margin: 0 !important;
    padding: 0 22px !important;
    gap: 9px;
    color: #fff !important;
    background: #7ebf00 !important;
    border: 1px solid #7ebf00 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    cursor: pointer;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        transform 120ms ease,
        opacity 160ms ease;
}

.srsc-sticky-cart__button:hover,
.srsc-sticky-cart__button:focus-visible {
    color: #fff !important;
    background: #7ebf00 !important;
    border-color: #7ebf00 !important;
}

.srsc-sticky-cart__button:active {
    transform: translateY(1px);
}

.srsc-sticky-cart__button:focus-visible {
    outline: 3px solid rgba(23, 168, 227, 0.24);
    outline-offset: 2px;
}

.srsc-sticky-cart__button.is-disabled,
.srsc-sticky-cart__button:disabled {
    color: #fff !important;
    background: #a9afb5 !important;
    border-color: #a9afb5 !important;
    cursor: not-allowed;
    opacity: 0.9;
}

.srsc-sticky-cart__button-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.srsc-sticky-cart__button-icon-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
}

.srsc-sticky-cart__button-spinner {
    position: absolute;
    width: 19px;
    height: 19px;
    border: 2px solid rgba(255, 255, 255, 0.38);
    border-top-color: #fff;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation: srsc-spin 650ms linear infinite;
}

.srsc-sticky-cart__button.is-loading .srsc-sticky-cart__button-icon,
.srsc-sticky-cart__button.is-loading .srsc-sticky-cart__button-label {
    opacity: 0;
}

.srsc-sticky-cart__button.is-loading .srsc-sticky-cart__button-spinner {
    opacity: 1;
}

.srsc-sticky-cart__button.is-added {
    background: var(--srsc-success) !important;
    border-color: var(--srsc-success) !important;
}

.srsc-sticky-cart-spacer {
    display: block;
    width: 100%;
    height: var(--srsc-height);
    pointer-events: none;
}

.srsc-highlight-original-cart {
    animation: srsc-highlight 1300ms ease;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@keyframes srsc-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes srsc-highlight {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(23, 168, 227, 0);
    }
    35% {
        box-shadow: 0 0 0 5px rgba(23, 168, 227, 0.19);
    }
}


/*
 * LiveChat plaatst de launcher in #chat-widget-container. Alleen wanneer de
 * sticky bar echt actief is, wordt de geminimaliseerde chatlauncher op mobiel
 * en tablet met de gemeten balkhoogte omhoog gezet. Bij een geopend chatvenster
 * wordt de offset door JavaScript weer verwijderd.
 */
@media only screen and (max-width: 849px) {
    /*
     * Wanneer de sticky balk niet werkelijk zichtbaar is, zet de launcher
     * expliciet terug op de normale LiveChat-positie. Dit ruimt ook een oude
     * verhoogde positie uit Safari's back-forward cache of eerdere pluginstate op.
     */
    html.srsc-livechat-default #chat-widget-container {
        bottom: 10px !important;
        transition: none !important;
    }

    html.srsc-sticky-cart-active.srsc-livechat-offset #chat-widget-container {
        bottom: calc(var(--srsc-height) + 8px) !important;
        transition: none !important;
    }
}

@media only screen and (max-width: 849px) {
    .srsc-sticky-cart__inner {
        gap: 16px;
    }

    .srsc-sticky-cart__button {
        min-width: 190px;
        padding-right: 17px !important;
        padding-left: 17px !important;
    }
}

@media only screen and (max-width: 549px) {
    .srsc-sticky-cart {
        bottom: -2px;
        background: #fff;
        box-shadow: 0 -1px 8px #0000001a;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .srsc-sticky-cart::after {
        height: 128px;
        background: #fff;
    }

    .srsc-sticky-cart__inner {
        min-height: 60px;
        padding: 5px 15px calc(5px + env(safe-area-inset-bottom));
        gap: 12px;
    }

    .srsc-sticky-cart__product {
        display: none !important;
    }

    .srsc-sticky-cart__actions {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }

    .srsc-sticky-cart__price {
        min-width: 0;
        max-width: calc(100% - 72px);
        overflow: hidden;
        flex: 1 1 auto;
        line-height: 1.18;
        text-align: left;
        text-overflow: ellipsis;
        white-space: normal;
    }

    .srsc-sticky-cart__price small,
    .srsc-sticky-cart__price .woocommerce-price-suffix {
        font-size: 10px;
    }

    .srsc-sticky-cart__button {
        width: 58px;
        min-width: 58px;
        max-width: 58px;
        min-height: 54px;
        padding: 0 !important;
        flex: 0 0 58px;
        border-radius: 5px !important;
    }

    .srsc-sticky-cart__button-label {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
    }

    .srsc-sticky-cart__button-icon {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .srsc-sticky-cart,
    .srsc-sticky-cart__button {
        transition: none !important;
    }

    .srsc-sticky-cart__button-spinner,
    .srsc-highlight-original-cart {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
    }
}
