/**
 * com.on WooCommerce – Kaufleiste.
 *
 * Farben, Abstand nach unten (z. B. über einer festen Kontaktleiste) und
 * Radien über CSS-Variablen, die das Theme setzt.
 */

.comon-kaufleiste {
    --comon-kaufleiste-flaeche: #fff;
    --comon-kaufleiste-text: #1d1d1b;
    --comon-kaufleiste-leise: #6b6f6c;
    --comon-kaufleiste-linie: #e6e3da;
    --comon-kaufleiste-akzent: #184328;
    --comon-kaufleiste-akzent-text: #fff;
    --comon-kaufleiste-radius: 999px;
    --comon-kaufleiste-unten: 0px;
    --comon-kaufleiste-breite: 1250px;

    position: fixed;
    right: 0;
    bottom: var(--comon-kaufleiste-unten);
    left: 0;
    z-index: 9990;
    border-top: 1px solid var(--comon-kaufleiste-linie);
    background: var(--comon-kaufleiste-flaeche);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .08);
    color: var(--comon-kaufleiste-text);
    transform: translateY(calc(100% + var(--comon-kaufleiste-unten)));
    visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
}

.comon-kaufleiste.is-sichtbar {
    transform: none;
    visibility: visible;
    transition: transform .25s ease, visibility 0s;
}

@media (prefers-reduced-motion: reduce) {
    .comon-kaufleiste,
    .comon-kaufleiste.is-sichtbar {
        transition: none;
    }
}

/* Inhalt der Seite nicht verdecken, solange die Leiste steht. */
body.comon-kaufleiste-sichtbar {
    padding-bottom: var(--comon-kaufleiste-hoehe, 72px);
}

.comon-kaufleiste__innen {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 96%;
    max-width: var(--comon-kaufleiste-breite);
    margin: 0 auto;
    padding: 10px 0;
}

.comon-kaufleiste__bild img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.comon-kaufleiste__text {
    flex: 1;
    min-width: 0;
}

.comon-kaufleiste__name,
.comon-kaufleiste__auswahl {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comon-kaufleiste__name {
    font-weight: 700;
    line-height: 1.3;
}

.comon-kaufleiste__auswahl {
    font-size: .85em;
    color: var(--comon-kaufleiste-leise);
}

.comon-kaufleiste__preis {
    font-weight: 700;
    white-space: nowrap;
}

/* Grundpreis- und Steuerangaben in der Leiste nicht wiederholen. */
.comon-kaufleiste__preis .wgm-info,
.comon-kaufleiste__preis .wgm-tax,
.comon-kaufleiste__preis .price-per-unit,
.comon-kaufleiste__preis small {
    display: none;
}

.comon-kaufleiste__preis del {
    margin-right: 6px;
    font-weight: 400;
    opacity: .6;
}

.comon-kaufleiste__preis ins {
    text-decoration: none;
}

.comon-kaufleiste__menge {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--comon-kaufleiste-linie);
    border-radius: var(--comon-kaufleiste-radius);
}

.comon-kaufleiste__menge[hidden] {
    display: none;
}

.comon-kaufleiste__stufe {
    width: 36px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.comon-kaufleiste__menge input {
    width: 44px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: center;
    -moz-appearance: textfield;
}

.comon-kaufleiste__menge input::-webkit-outer-spin-button,
.comon-kaufleiste__menge input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.comon-kaufleiste__knopf {
    padding: 11px 24px;
    border: 1px solid var(--comon-kaufleiste-akzent);
    border-radius: var(--comon-kaufleiste-radius);
    background: var(--comon-kaufleiste-akzent);
    color: var(--comon-kaufleiste-akzent-text);
    font: inherit;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.comon-kaufleiste__knopf:hover,
.comon-kaufleiste__knopf:focus-visible {
    filter: brightness(1.15);
}

.comon-kaufleiste__knopf:disabled {
    opacity: .5;
    cursor: not-allowed;
}

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

/* Schmal: Bild und Auswahltext weg, Name kleiner. */
@media (max-width: 600px) {
    .comon-kaufleiste__innen {
        gap: 10px;
        padding: 8px 0;
    }

    /* Kein Platz für Bild und Namen: Preis, Menge und Knopf genügen,
       das Produkt steht ja darüber. */
    .comon-kaufleiste__bild,
    .comon-kaufleiste__text {
        display: none;
    }

    .comon-kaufleiste__preis {
        flex: 1;
        font-size: .9em;
    }

    .comon-kaufleiste__stufe {
        width: 28px;
    }

    .comon-kaufleiste__menge input {
        width: 30px;
    }

    .comon-kaufleiste__knopf {
        padding: 10px 14px;
    }
}

@media (max-width: 380px) {
    .comon-kaufleiste__menge {
        display: none;
    }
}
