/* Blog Booster — Exit Recommender Popup
 * Neutrales Modal mit Produkt-Grid. CSS-Vars per Renderer (--bb-er-primary). */

.bb-er {
    position: fixed;
    inset: 0;
    /* Promo-Layer (1035) — UNTER Modal-Backdrop (1040) und Cart-Modal (1075).
       Single Source of Truth: nova_premium_tools/.../sidecart.css */
    z-index: var(--z-promo, 1035);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bb-er__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(2px);
}

.bb-er__box {
    position: relative;
    background: #fff;
    color: #1f2937;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    max-width: 820px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 24px 24px;
    font-family: inherit;
}

.bb-er__close {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    color: #6b7280;
    border: 0;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
}
.bb-er__close:hover,
.bb-er__close:focus {
    color: #1f2937;
    outline: 2px solid var(--bb-er-primary, #1f2937);
    outline-offset: 2px;
}

.bb-er__title {
    margin: 0 0 6px;
    font-size: 22px;
    line-height: 1.25;
    text-align: center;
}

.bb-er__subtitle {
    margin: 0 0 16px;
    text-align: center;
    color: #4b5563;
    font-size: 15px;
}

.bb-er__coupon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(31, 41, 55, .04);
    border: 1px dashed var(--bb-er-primary, #1f2937);
    border-radius: 6px;
    padding: 10px 14px;
    margin: 0 auto 18px;
    max-width: 420px;
    font-size: 14px;
}
.bb-er__coupon-label {
    color: #4b5563;
}
.bb-er__coupon-code {
    background: var(--bb-er-primary, #1f2937);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 600;
    letter-spacing: .04em;
}
.bb-er__coupon-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    color: var(--bb-er-primary, #1f2937);
    border: 1px solid var(--bb-er-primary, #1f2937);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.bb-er__coupon-copy:hover,
.bb-er__coupon-copy:focus {
    background: var(--bb-er-primary, #1f2937);
    color: #fff;
    outline: none;
}
.bb-er__coupon-copy.is-copied {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.bb-er__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
    min-height: 100px;
}

.bb-er__card {
    display: flex;
    flex-direction: column;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.bb-er__card:hover,
.bb-er__card:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
    border-color: var(--bb-er-primary, #1f2937);
}

.bb-er__link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    flex: 1;
}
.bb-er__link:hover,
.bb-er__link:focus {
    text-decoration: none;
    color: inherit;
}

.bb-er__add-to-cart {
    display: block;
    width: calc(100% - 16px);
    margin: 0 8px 8px;
    padding: 8px 10px;
    background: var(--bb-er-primary, #1f2937);
    color: #fff;
    border: 0;
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: background .15s ease, opacity .15s ease;
}
.bb-er__add-to-cart:hover,
.bb-er__add-to-cart:focus {
    opacity: .9;
    color: #fff;
    text-decoration: none;
    outline: 2px solid var(--bb-er-primary, #1f2937);
    outline-offset: 2px;
}
.bb-er__add-to-cart.is-loading {
    opacity: .7;
    cursor: progress;
}
.bb-er__add-to-cart.is-added {
    background: #16a34a;
    cursor: default;
}
.bb-er__add-to-cart.is-error {
    background: #dc2626;
    cursor: default;
}
.bb-er__add-to-cart:disabled {
    cursor: default;
}

.bb-er__img {
    aspect-ratio: 1 / 1;
    background: #fff center/contain no-repeat;
    border-bottom: 1px solid #e5e7eb;
}

.bb-er__body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.bb-er__name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bb-er__stars {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0 4px;
    font-size: 13px;
    line-height: 1;
}
.bb-er__stars-track {
    position: relative;
    display: inline-block;
    color: #d1d5db;
    letter-spacing: 1px;
    font-family: inherit;
}
.bb-er__stars-fill {
    position: absolute;
    inset: 0;
    overflow: hidden;
    color: #f59e0b;
    white-space: nowrap;
    letter-spacing: 1px;
    font-family: inherit;
}
.bb-er__rating-count {
    color: #6b7280;
    font-size: 12px;
}

.bb-er__price {
    font-size: 14px;
    color: var(--bb-er-primary, #1f2937);
    font-weight: 600;
    margin-top: auto;
}

.bb-er__cta {
    margin-top: 6px;
    font-size: 13px;
    color: var(--bb-er-primary, #1f2937);
    font-weight: 500;
}

.bb-er__loading,
.bb-er__error {
    grid-column: 1 / -1;
    text-align: center;
    color: #6b7280;
    padding: 20px;
    font-size: 14px;
}

@media (max-width: 480px) {
    .bb-er__box {
        padding: 24px 16px 16px;
    }
    .bb-er__title {
        font-size: 19px;
    }
    .bb-er__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bb-er__card {
        transition: none;
    }
}
