/*!
 * Mindestbestellwert Plus - Gestaltung
 *
 * Nimmt die Farben des Themes auf (Bootstrap-Variablen von NOVA) und faellt
 * auf die Hebela-Markenfarben zurueck, falls die Variablen fehlen. So passt
 * der Hinweis auch nach einem Theme-Wechsel noch ins Bild.
 */

.mbwplus-hint {
    --mbwplus-accent: var(--primary, #bc1818);
    --mbwplus-text: var(--gray-darker, #2d3e51);
    --mbwplus-surface: var(--gray-medium, #ebebeb);

    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border-left: 4px solid var(--mbwplus-accent);
    border-radius: 3px;
    background: var(--mbwplus-surface);
    color: var(--mbwplus-text);
    font-size: 0.95rem;
    line-height: 1.45;
}

.mbwplus-hint__text {
    margin: 0;
    font-weight: 600;
}

/* Auffaelliger Warnkasten */
.mbwplus-hint--warning {
    --mbwplus-surface: #fdf3f3;
    --mbwplus-accent: var(--danger, #b90000);
    border-width: 4px;
}

/* Dezent: nur Text, kein Kasten */
.mbwplus-hint--subtle {
    padding: 0.35rem 0;
    border: 0;
    border-radius: 0;
    background: none;
}

.mbwplus-hint--subtle .mbwplus-hint__text {
    font-weight: 500;
}

/* Erreicht: ruhige Bestaetigung, nicht alarmierend */
.mbwplus-hint--ok {
    --mbwplus-surface: #f2f8f2;
    --mbwplus-accent: var(--success, #1c871e);
}

.mbwplus-hint--static {
    margin-bottom: 0.75rem;
}

/* Im Mini-Warenkorb ist der Platz knapp */
.mbwplus-hint--minicart {
    margin: 0.5rem 0.75rem;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
}

.mbwplus-hint--minicart .mbwplus-progress {
    margin-top: 0.45rem;
}

/* ----------------------------------------------------- Fortschrittsbalken */

.mbwplus-progress {
    overflow: hidden;
    height: 6px;
    margin-top: 0.6rem;
    border-radius: 3px;
    background: rgba(45, 62, 81, 0.15);
}

.mbwplus-progress__bar {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: var(--mbwplus-accent);
    transition: width 0.3s ease;
}

/* ------------------------------------------------- Gesperrter Kassenbutton */

.mbwplus-locked {
    position: relative;
    opacity: 0.55;
    cursor: not-allowed !important;
    pointer-events: auto; /* Klicks muessen ankommen, damit sie abgefangen werden */
    filter: grayscale(35%);
}

.mbwplus-locked:hover,
.mbwplus-locked:focus {
    opacity: 0.55;
    box-shadow: none;
}

/* Express-Zahlwege (PayPal, Amazon Pay, Google Pay). Diese Container werden
   von fremden SDKs gefuellt, teils mit einem iframe. pointer-events: none
   wirkt auch dort, wo Event-Handler nicht hinkommen. */
.mbwplus-blocked {
    position: relative;
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(100%);
    cursor: not-allowed;
}

/* Zusatzzeile mit dem Restbetrag im statischen Hinweis */
.mbwplus-hint__rest {
    margin: 0.35rem 0 0;
    font-weight: 500;
}

/* ------------------------------------------------------ Ergaenzungsartikel */

.mbwplus-fillup {
    margin: 1.5rem 0;
    padding: 1.25rem;
    border: 1px solid var(--gray-light, #d8d9da);
    border-radius: 4px;
    background: #fff;
}

.mbwplus-fillup__headline {
    margin: 0 0 1rem;
    color: var(--gray-darker, #2d3e51);
    font-size: 1.05rem;
    font-weight: 700;
}

.mbwplus-fillup__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mbwplus-fillup__item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.75rem;
    border: 1px solid var(--gray-light, #d8d9da);
    border-radius: 3px;
    text-align: center;
}

.mbwplus-fillup__img {
    width: 100%;
    height: 90px;
    object-fit: contain;
    margin-bottom: 0.25rem;
}

.mbwplus-fillup__name {
    color: var(--gray-darker, #2d3e51);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
}

.mbwplus-fillup__name:hover,
.mbwplus-fillup__name:focus {
    color: var(--primary, #bc1818);
    text-decoration: underline;
}

.mbwplus-fillup__price {
    color: var(--gray-darker, #2d3e51);
    font-size: 0.95rem;
    font-weight: 700;
}

.mbwplus-fillup__action {
    margin-top: 0.35rem;
}

@media (max-width: 575px) {
    .mbwplus-fillup {
        padding: 1rem 0.75rem;
    }

    .mbwplus-fillup__list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.65rem;
    }

    .mbwplus-fillup__img {
        height: 70px;
    }
}

@media print {
    .mbwplus-fillup {
        display: none;
    }
}
