﻿/* --- Position außerhalb des Containers --- */
#discount-widget {
    position: sticky; /* oder sticky, wenn es kleben soll */
    top: var(--header-height, 0px);
    z-index: 5;
    width: 100%;
}

@media(max-width: 992px) {
    #discount-widget {
        position: static;
        margin-bottom: 20px;
    }
}

/* --- Icon Cluster --- */
#discount-icons {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
}

    #discount-icons .condition {
        position: relative;
        width: 58px;
        height: 58px;
    }

    #discount-icons img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        filter: grayscale(70%);
        opacity: 0.7;
        transition: 0.25s ease-in-out;
    }

    /* Badge */
    #discount-icons .badge {
        position: absolute;
        bottom: -4px;
        /* horizontale Zentrierung */ left: 50%;
        transform: translateX(-50%);
        padding: 0.5rem 1rem;
        font-size: 1.0rem;
        font-weight: bold;
        border-radius: 12px;
        box-shadow: 0 0 6px rgba(0,0,0,0.3);
        display: inline-block
    }

    /* Standard-Info */
    .badge-info {
        background: #ffc107;
        color: #333;
}

    /* Rabatt aktiv */
    .badge-discount {
        background: var(--brand-primary); /* grün */
        color: #fff;
        font-weight: bold;
}

    /* Aktiver Zustand */
    #discount-icons .condition.active img {
        filter: none;
        opacity: 1;
    }

    #discount-icons .condition.active .badge {
        background: #2ecc71;
        color: white;
    }

    /* Icons im Normalzustand (nicht erfüllt) */
    #discount-icons img {
        opacity: 0.6;
        filter: saturate(80%);
        transition: 0.25s ease-in-out;
    }

    /* Aktiver Zustand: klare Farben + Leuchten */
    #discount-icons .condition.active img {
        opacity: 1;
        filter: saturate(150%);
        box-shadow: 0 0 10px rgba(30, 144, 255, 0.6); /* blaues Glow */
        border-radius: 10px;
        transform: scale(1.05); /* leichte Betonung */
    }

    /* Badge im aktiven Zustand (optional stärker) */
    #discount-icons .condition.active .badge {
        background: #1e90ff;
        color: white;
        box-shadow: 0 0 8px rgba(30,144,255,0.6);
    }

/* --- Tooltip Panel --- */
.tooltip-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 260px;
    padding: 14px;
    background: white;
    border-radius: 10px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    z-index: 5100;
}

    .tooltip-panel h4 {
        margin-top: 0;
    }

@media(max-width: 992px) {
    .tooltip-panel {
        position: static;
        width: 100%;
        margin-top: 8px;
    }
}

/* Tooltip anzeigen */
#discount-widget.show-tooltip .tooltip-panel {
    display: block;
}
/* ===== MOBILE BUBBLE ===== */
.mobile-bubble {
    display: none;
    padding: 8px 14px;
    border-radius: 18px;
    font-size: 14px;
    margin-bottom: 10px;
    cursor: pointer;
}

/* Mobile zeigt nur Bubble */
@media(max-width: 992px) {
    #discount-icons {
        display: none;
    }

    .mobile-bubble {
        display: inline-block;
    }
}

/* Wenn geöffnet → Icons sichtbar */
@media(max-width: 992px) {
    #discount-widget.show-tooltip #discount-icons {
        display: flex;
        flex-direction: column;
    }
}

/* ===== PROGRESSBAR ===== */
#progress-container {
    width: 100%;
    height: 10px;
    background: #eee;
    border-radius: 6px;
    margin: 12px 0 6px 0;
    overflow: hidden;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background: #1976d2;
    transition: width 0.4s ease;
}

#progress-text {
    font-size: 13px;
    margin-bottom: 10px;
    color: #444;
}

/* Nebeneinander-Anordnung */
#discount-icons .icon-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

/* Macht jedes Icon gleich groß */
#discount-icons .condition {
    width: 58px;
    height: 58px;
}

/* Mobile Ansicht — Icons übereinander */
@media(max-width: 992px) {
    #discount-icons .icon-row {
        display: block;
        margin-bottom: 10px;
    }

    #discount-icons .condition {
        margin-bottom: 8px;
    }
}
/* Trenner zwischen Icon-Reihen */
.icon-separator {
    height: 4px; /* Dicke der Linie */
    background-color: #ccc; /* Farbe der Linie */
    margin: 12px 0; /* Abstand oben/unten */
    width: 20%; /* volle Breite des Icon-Bereichs */
}

/* Optional: weicher Übergang auf Hover */
#discount-widget:hover .icon-separator {
    background-color: #999;
}
.icon-row {
    display: flex;
    align-items: center;
    gap: 2px; /* Abstand zwischen Icons */
}

/* Vertikaler Trenner zwischen Fass und Kanister */
.icon-separator-vertical-line {
    width: 4px; /* Dicke der Linie */
    background-color: var(--brand-primary);
    height: 40px; /* Höhe passend zu den Icons */
}

/* Vertikaler Trenner zwischen Fass und Kanister */
.icon-separator-vertical-text {
    writing-mode: vertical-rl; /* Textfluss von oben nach unten */
    text-orientation: upright; /* Buchstaben bleiben aufrecht */
    font-weight: bold;
    color: var(--brand-primary);
    height: 40px; /* Höhe passend zu den Icons */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Optional: hover */
.icon-row:hover .icon-separator-vertical {
    background-color: #999;
}

/* Mobile: trenner horizontal */
@media(max-width: 992px) {
    .icon-row {
        flex-direction: column;
        gap: 12px;
    }

    .icon-separator-vertical {
        width: 100%;
        height: 1px;
    }
}
/* Plus zwischen Gewicht und Fass */
.icon-plus {
    font-size: 24px;
    font-weight: bold;
    color: #333; /* Standardfarbe */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Optional: aktive Farbe, wenn beide Bedingungen erfüllt */
#cond-weight.active + .icon-plus,
#cond-barrel.active ~ .icon-plus {
    color: #1e90ff; /* Blau passend zu Icons */
}
