/*
* Prefixed by:
* PostCSS: v7.0.29,
* Autoprefixer: v9.7.6
* Browsers: last 4 version
*/

#custom-cart-overlay {
    position: fixed;
    right: -2px;
    top: 25%;
    height: auto;
    min-height: 300px;
    width: 0px; 
    background: #f8f8f8;
    z-index: 1000;
    -webkit-transition: width 0.3s ease-in-out;
    -o-transition: width 0.3s ease-in-out;
    transition: width 0.3s ease-in-out;
    -webkit-box-shadow: 0 0 7px #00000048;
            box-shadow: 0 0 7px #00000048;
    border: 1px solid #fff;
}

/* Leerer Warenkorb: Overlay bleibt komplett aus. Die Klasse wird vom
   Server bzw. von den WooCommerce-Cart-Fragments gesetzt. */
#custom-cart-overlay.is-empty {
    display: none;
}

/* Geoeffnet wird ueber die Klasse .open (Klick/Tap/Tastatur). */
#custom-cart-overlay.open {
    width: 300px;
}

/* Zusaetzlich Hover - aber nur auf Geraeten mit echtem Mauszeiger.
   Auf Touchscreens fuehrte die reine Hover-Loesung zu haengenden Zustaenden. */
@media (hover: hover) and (pointer: fine) {
    #custom-cart-overlay:hover {
        width: 300px;
    }
}

#custom-cart-icon {
    position: absolute;
    left: -40px;
    top: 50px;
    width: 80px;
    height: 80px;
    cursor: pointer;
    background-color: var(--e-global-color-secondary);
    border-radius: 50%;
    overflow: hidden;
    -webkit-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    -webkit-box-shadow: 0 0 7px #00000048;
            box-shadow: 0 0 7px #00000048;
    border: 1px solid #fff;
}

#custom-cart-item-wrapper {
    height: 80px;
    width: 100%;
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    padding-left: 12px;
    z-index: 1;
}

#custom-cart-icon img {
    display: block;
    width: 20px !important;
    -webkit-filter: invert(100);
    filter: invert(100);
}

#custom-cart-content {
    display: block;
    z-index: 2;
    width: 100%;
    padding: 20px;
    min-width: 300px;
    height: 100%;
    min-height: 300px;
    background-color: #f8f8f8;
    position: relative;
}

#custom-cart-overlay.open #custom-cart-icon {
    background-color: #f8f8f8 !important;
}

#custom-cart-overlay.open #custom-cart-icon img {
    -webkit-filter: invert(0);
    filter: invert(0);
}

@media (hover: hover) and (pointer: fine) {
    #custom-cart-overlay:hover #custom-cart-icon {
        background-color: #f8f8f8 !important;
    }

    #custom-cart-overlay:hover  #custom-cart-icon img {
        -webkit-filter: invert(0);
        filter: invert(0);
    }
}

/* Sichtbarer Fokus fuer die Tastaturbedienung. */
#custom-cart-icon:focus-visible,
#custom-cart-close:focus-visible {
    outline: 3px solid var(--e-global-color-accent);
    outline-offset: 2px;
}

#custom-cart-close {
    position: absolute;
    top: 4px;
    right: 8px;
    z-index: 3;
    background: none;
    border: 0;
    padding: 0 6px;
    font-size: 28px;
    line-height: 1;
    color: #333;
    cursor: pointer;
}

#custom-cart-close:hover,
#custom-cart-close:focus {
    color: #000;
}

/* Auf dem Touchscreen genuegt der Schliessen-Button; am Desktop reicht das
   Verlassen des Overlays, dort bleibt er als zusaetzliche Moeglichkeit. */

#custom-cart-content ul {
    margin-left: 0;
    padding-left: 0;
    list-style-type: none;
    border-top: 1px solid #ccc;
    max-height: 300px;
    overflow-x: hidden;
    overflow-y: scroll;
    padding: 0 20px;
    width: 100%;
    margin-bottom: 20px;
}

#custom-cart-content ul li {
    position: relative;
    padding: 20px 0 10px 0;
    border-bottom: 1px solid #ccc;
}

#custom-cart-content ul li a.remove {
    position: absolute;
    right: 0;
    top: -5px;
    font-size: 30px;
}

#custom-cart-content a.button {
    display: block;
    position: absolute;
    bottom: 20px;
    left: 40px;
    right: 20px;
    background-color: var(--e-global-color-accent);
    color: #fff;
    padding: 10px 20px;
    font-family: "Oswald", sans-serif;
    text-transform: uppercase;
    font-size: 1em;
    font-weight: 600;
    min-width: 220px;
    text-align: center;
    border: 5px solid var(--e-global-color-31591e5);
    -webkit-transition: all .3s ease-in-out;
    -o-transition: all .3s ease-in-out;
    transition: all .3s ease-in-out;
}
#custom-cart-content a.button:hover,
#custom-cart-content a.button:focus,
#custom-cart-content a.button:active,
#custom-cart-content a.button:focus-visible {
    background-color: var(--e-global-color-secondary);
    border-color: var(--e-global-color-b29f9e9);
}

#custom-cart-content h4 {
    font-family: "Oswald", sans-serif;
    text-transform: uppercase;
    font-size: 1.1em;
    font-weight: 600;
}

#custom-cart-content .cart-item-price {
    display: block;
}

#custom-cart-content .cart-item-name {
    font-weight: 600;
}