/* Warenkorb-Retter – Optik passend zu „Design 2026“ (wecomatic_theme), Theme-Variablen mit Fallback.
   --wm-gold ist die Markenfarbe (keg Gold, weco Orange). */

.wmcr-bar,
.wmcr-send,
.wmcr-optin {
    --wmcr-ink: var(--wm-ink, #1c1d20);
    --wmcr-muted: var(--wm-muted, #5a5f67);
    --wmcr-line: var(--wm-line, #e4e1db);
    --wmcr-soft: var(--wm-gold-soft, #fff2c4);
    --wmcr-brand: var(--wm-gold, #f8bf00);
    --wmcr-surface: var(--wm-surface, #f1efeb);
}

/* ---------------------------------------------------------- Rückkehr-Hinweis */

.wmcr-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 16px auto;
    max-width: 1100px;
    padding: 12px 14px 12px 12px;
    background: #fff;
    border: 1px solid var(--wmcr-line);
    border-left: 4px solid var(--wmcr-brand);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(28, 29, 32, .07);
    color: var(--wmcr-ink);
    animation: wmcr-in .25s ease-out;
}

@keyframes wmcr-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

.wmcr-bar__media {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--wmcr-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--wmcr-ink);
}

.wmcr-bar__media img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: #fff;
}

.wmcr-bar__txt {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.wmcr-bar__txt b {
    font-size: 15px;
}

.wmcr-bar__txt span {
    font-size: 13.5px;
    color: var(--wmcr-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wmcr-bar .wmcr-bar__go {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 8px 18px;
    font-weight: 600;
    white-space: nowrap;
}

.wmcr-bar__x {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--wmcr-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.wmcr-bar__x:hover,
.wmcr-bar__x:focus-visible {
    background: var(--wmcr-surface);
    color: var(--wmcr-ink);
}

@media (max-width: 575.98px) {
    .wmcr-bar {
        flex-wrap: wrap;
        margin: 10px 12px;
        gap: 10px 12px;
    }
    .wmcr-bar__txt {
        flex: 1 1 0;
    }
    .wmcr-bar__txt span {
        white-space: normal;
    }
    .wmcr-bar .wmcr-bar__go {
        order: 4;
        flex: 1 1 100%;
        min-height: 44px;
    }
    .wmcr-bar__x {
        width: 44px;
        height: 44px;
    }
}

.wmcr-bar--note .wmcr-bar__txt b {
    font-weight: 600;
}

.wmcr-bar--note.is-warn {
    border-left-color: #d97706;
}

@media (max-width: 575.98px) {
    .wmcr-bar--note {
        flex-wrap: nowrap;
    }
}

/* ------------------------------------------------- Warenkorb per E-Mail senden */

.wmcr-send {
    margin: 12px 0 18px;
}

.wmcr-send__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 6px 2px;
    border: 0;
    background: transparent;
    color: var(--wmcr-ink);
    font-size: 14.5px;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--wmcr-line);
    cursor: pointer;
}

.wmcr-send__toggle:hover,
.wmcr-send__toggle[aria-expanded="true"] {
    text-decoration-color: var(--wmcr-brand);
}

.wmcr-send__form {
    margin-top: 4px;
    padding: 14px;
    border: 1px solid var(--wmcr-line);
    border-radius: 12px;
    background: #fff;
}

.wmcr-send__form[hidden],
.wmcr-send__row[hidden],
.wmcr-optin__msg[hidden] {
    display: none;
}

.wmcr-send__hint {
    margin: 0 0 10px;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--wmcr-muted);
}

.wmcr-send__row {
    display: flex;
    gap: 8px;
}

.wmcr-send__row .form-control {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
}

.wmcr-send__row .btn {
    flex: 0 0 auto;
    min-height: 44px;
    border-radius: 999px;
    padding-left: 18px;
    padding-right: 18px;
}

.wmcr-send__msg {
    margin: 8px 0 0;
    font-size: 14px;
}

.wmcr-send__msg:empty {
    display: none;
}

.wmcr-send__msg.is-ok {
    margin-top: 0;
    font-weight: 600;
    color: var(--wm-ok, #1a7f37);
}

.wmcr-send__msg.is-error {
    color: #b42318;
}

.wmcr-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

/* ------------------------------------------------------ Einwilligung Kasse */

.wmcr-optin {
    margin: 4px 0 14px;
}

.wmcr-optin .custom-control-label {
    font-size: 15px;
    line-height: 1.4;
    cursor: pointer;
}

.wmcr-optin__hint {
    display: block;
}

.wmcr-optin__hint a {
    color: inherit;
    text-decoration: underline;
}

.wmcr-optin__msg {
    margin: 6px 0 0;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--wmcr-soft);
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--wmcr-ink);
}

/* ------------------------------------------- Rückkehr-Fenster (seit 1.1.0 statt Leiste) */

html.wmcr-modal-open,
html.wmcr-modal-open body {
    overflow: hidden;
}

/* WhatsApp-Blase, Kaufleiste, runder Warenkorb-Knopf liegen sonst über dem Fenster */
html.wmcr-modal-open :is(.ws5-wa-wrap, .wm-buy-bar, .wm-cart-fab) {
    display: none !important;
}

.wmcr-modal {
    --wmcr-ink: var(--wm-ink, #1c1d20);
    --wmcr-muted: var(--wm-muted, #5a5f67);
    --wmcr-line: var(--wm-line, #e4e1db);
    --wmcr-soft: var(--wm-gold-soft, #fff2c4);
    --wmcr-brand: var(--wm-gold, #f8bf00);
    --wmcr-surface: var(--wm-surface, #f1efeb);
    position: fixed;
    inset: 0;
    z-index: 2147482000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: var(--wm-sans, inherit);
    color: var(--wmcr-ink);
}

.wmcr-modal__back {
    position: absolute;
    inset: 0;
    background: rgba(28, 29, 32, .5);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .22s ease;
}

.wmcr-modal__box {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 28px 26px 18px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(28, 29, 32, .28);
    opacity: 0;
    transform: translateY(14px) scale(.97);
    transition: opacity .22s ease, transform .22s ease;
    outline: none;
}

.wmcr-modal.is-open .wmcr-modal__back { opacity: 1; }
.wmcr-modal.is-open .wmcr-modal__box { opacity: 1; transform: none; }

.wmcr-modal__x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--wmcr-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.wmcr-modal__x:hover,
.wmcr-modal__x:focus-visible {
    background: var(--wmcr-surface);
    color: var(--wmcr-ink);
}

.wmcr-modal__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 32px;
    margin-bottom: 10px;
}

.wmcr-modal__ico {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--wmcr-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wmcr-modal__ico svg {
    width: 22px;
    height: 22px;
}

.wmcr-modal__title {
    margin: 0;
    font-family: var(--wm-serif, inherit);
    font-size: 23px;
    font-weight: 400;
    line-height: 1.15;
    color: var(--wmcr-ink);
}

.wmcr-modal__text {
    margin: 0 0 16px;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--wmcr-muted);
}

.wmcr-modal__list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    border-top: 1px solid var(--wmcr-line);
}

.wmcr-modal__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--wmcr-line);
}

.wmcr-modal__img {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--wmcr-line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wmcr-modal__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wmcr-modal__info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.wmcr-modal__info b {
    font-size: 14px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wmcr-modal__info small,
.wmcr-modal__price small {
    font-size: 12.5px;
    color: var(--wmcr-muted);
}

.wmcr-modal__price {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 14px;
    white-space: nowrap;
}

.wmcr-modal__more {
    padding: 10px 0;
    font-size: 13.5px;
    color: var(--wmcr-muted);
    border-bottom: 1px solid var(--wmcr-line);
}

.wmcr-modal__sum {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--wmcr-muted);
}

.wmcr-modal__sum b {
    font-size: 17px;
    color: var(--wmcr-ink);
}

.wmcr-modal .wmcr-modal__go {
    display: block;
    width: 100%;
    min-height: 50px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
}

.wmcr-modal__no {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px;
    border: 0;
    background: none;
    font-size: 14px;
    color: var(--wmcr-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.wmcr-modal__no:hover { color: var(--wmcr-ink); }

/* Handy: Blatt von unten */
@media (max-width: 575.98px) {
    .wmcr-modal {
        align-items: flex-end;
        padding: 0;
    }
    .wmcr-modal__box {
        max-width: none;
        max-height: 88vh;
        border-radius: 22px 22px 0 0;
        padding: 24px 18px calc(12px + env(safe-area-inset-bottom));
        transform: translateY(40px);
    }
    .wmcr-modal__title { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
    .wmcr-modal__back,
    .wmcr-modal__box { transition: none; }
}
