/**
 * Echtlederjacken
 * Mobile Sticky Add to Cart
 */

.elj-mobile-sticky-cart {
    display: none;
}

@media (max-width: 767px) {
    body.single-product.elj-mobile-sticky-cart-enabled {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    .elj-mobile-sticky-cart {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9990;

        display: grid;
        grid-template-columns: minmax(0, 0.85fr) minmax(158px, 1.15fr);
        align-items: center;
        gap: 12px;

        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));

        border-top: 1px solid #e4dfd7;
        background: rgba(255, 255, 255, 0.97);
        box-shadow: 0 -10px 28px rgba(20, 20, 20, 0.10);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);

        opacity: 0;
        transform: translateY(110%);
        pointer-events: none;

        transition:
            transform 180ms ease,
            opacity 180ms ease;
    }

    .elj-mobile-sticky-cart.is-ready {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .elj-mobile-sticky-cart.is-native-visible,
    body.elj-checkout-drawer-open .elj-mobile-sticky-cart,
    body.elj-size-guide-open .elj-mobile-sticky-cart {
        opacity: 0;
        transform: translateY(110%);
        pointer-events: none;
    }

    .elj-mobile-sticky-cart__price-wrap {
        min-width: 0;
    }

    .elj-mobile-sticky-cart__price {
        color: #1f1f1f;
        font-size: 0.96rem;
        font-weight: 700;
        line-height: 1.15;
        white-space: nowrap;
    }

    .elj-mobile-sticky-cart__price .woocommerce-Price-amount {
        color: inherit;
        font: inherit;
    }

    .elj-mobile-sticky-cart__price del {
        margin-right: 0.28rem;
        color: #77716a;
        font-size: 0.75rem;
        font-weight: 500;
        opacity: 0.75;
    }

    .elj-mobile-sticky-cart__price ins {
        color: #1f1f1f;
        text-decoration: none;
    }

    .elj-mobile-sticky-cart__shipping {
        display: block;
        margin-top: 3px;
        overflow: hidden;
        color: #69645e;
        font-size: 0.62rem;
        font-weight: 500;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    html body.single-product button.elj-mobile-sticky-cart__button {
        appearance: none !important;
        width: 100% !important;
        min-height: 48px !important;
        margin: 0 !important;
        padding: 0.76rem 0.8rem !important;

        border: 1px solid #1f1f1f !important;
        border-radius: 0 !important;
        background: #1f1f1f !important;
        background-color: #1f1f1f !important;
        background-image: none !important;
        box-shadow: none !important;

        color: #ffffff !important;
        font: inherit !important;
        font-size: 0.78rem !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        text-align: center !important;

        cursor: pointer !important;
    }

    html body.single-product button.elj-mobile-sticky-cart__button:hover,
    html body.single-product button.elj-mobile-sticky-cart__button:focus,
    html body.single-product button.elj-mobile-sticky-cart__button:active {
        border-color: #1f1f1f !important;
        background: #1f1f1f !important;
        background-color: #1f1f1f !important;
        color: #ffffff !important;
        outline: none !important;
    }

    html body.single-product button.elj-mobile-sticky-cart__button:focus-visible {
        outline: 2px solid #ffffff !important;
        outline-offset: -4px !important;
    }

    html body.single-product button.elj-mobile-sticky-cart__button:disabled {
        cursor: default !important;
        opacity: 0.58 !important;
    }

    .elj-product-options.elj-sticky-cart-target {
        animation: eljStickyCartTarget 720ms ease;
    }

    @keyframes eljStickyCartTarget {
        0%, 100% {
            box-shadow: none;
        }

        45% {
            box-shadow: 0 0 0 3px rgba(31, 31, 31, 0.10);
        }
    }
}

@media (max-width: 360px) {
    .elj-mobile-sticky-cart {
        grid-template-columns: minmax(0, 0.78fr) minmax(148px, 1.22fr);
        gap: 9px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .elj-mobile-sticky-cart__price {
        font-size: 0.88rem;
    }

    .elj-mobile-sticky-cart__shipping {
        font-size: 0.58rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .elj-mobile-sticky-cart {
        transition: none;
    }

    .elj-product-options.elj-sticky-cart-target {
        animation: none;
    }
}