/* =============================================================
   Stål Oasen Mængderabat - Frontend (product page)
   Brand palette inspired by staaloasen.dk:
   - Fresh green (CTAs):       #7eb946
   - Hover green:              #6fab2f
   - Dark olive (headings):    #4a5d23
   - Deep olive (sections):    #3c4f1f
   - Cream background:         #f7f3eb
   - Soft border:              #e5e0d3
   ============================================================= */

.staaloasen-mr-box {
    --so-green: #7eb946;
    --so-green-dark: #6fab2f;
    --so-olive: #4a5d23;
    --so-olive-deep: #3c4f1f;
    --so-cream: #f7f3eb;
    --so-cream-2: #fbf8f1;
    --so-border: #e5e0d3;
    --so-border-strong: #d9d1bb;
    --so-text: #2f3a14;
    --so-text-soft: #6c7558;

    margin: 24px 0;
    padding: 0;
    background: var(--so-cream-2);
    border: 1px solid var(--so-border);
    border-radius: 14px;
    overflow: hidden;
    font-family: inherit;
    color: var(--so-text);
    box-shadow: 0 1px 2px rgba(60, 79, 31, 0.04);
}

/* ---------- Header ---------- */
.staaloasen-mr-box__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--so-olive);
    color: #fff;
}

.staaloasen-mr-box__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    flex-shrink: 0;
}

.staaloasen-mr-box__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    flex: 1;
}

.staaloasen-mr-box__subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* ---------- Tiers ---------- */
.staaloasen-mr-box__tiers {
    display: flex;
    flex-direction: column;
    padding: 6px;
    gap: 6px;
    background: var(--so-cream-2);
}

.staaloasen-mr-tier {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) auto 28px;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1.5px solid var(--so-border);
    border-radius: 10px;
    transition: all 0.2s ease;
    position: relative;
}

.staaloasen-mr-tier:hover {
    border-color: var(--so-border-strong);
}

.staaloasen-mr-tier__qty {
    font-weight: 600;
    font-size: 1rem;
    color: var(--so-olive);
}

.staaloasen-mr-tier__discount {
    display: flex;
    align-items: baseline;
    gap: 6px;
    text-align: right;
}

.staaloasen-mr-tier__pct {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--so-green-dark);
    line-height: 1;
    letter-spacing: -0.01em;
}

.staaloasen-mr-tier__label {
    font-size: 0.85rem;
    color: var(--so-text-soft);
    font-weight: 500;
}

.staaloasen-mr-tier__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    color: transparent;
    border: 2px solid var(--so-border);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Active tier styling */
.staaloasen-mr-tier.is-active {
    background: linear-gradient(135deg, #f1f7e6 0%, #e8f1d8 100%);
    border-color: var(--so-green);
    box-shadow: 0 0 0 3px rgba(126, 185, 70, 0.15);
}

.staaloasen-mr-tier.is-active .staaloasen-mr-tier__pct {
    color: var(--so-olive-deep);
}

.staaloasen-mr-tier.is-active .staaloasen-mr-tier__check {
    background: var(--so-green);
    border-color: var(--so-green);
    color: #fff;
}

/* Next-tier hint styling (the tier just above the current one) */
.staaloasen-mr-tier.is-next {
    border-color: var(--so-green-dark);
    border-style: dashed;
}

/* ---------- Status row ---------- */
.staaloasen-mr-box__status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--so-cream);
    border-top: 1px solid var(--so-border);
    font-size: 0.92rem;
    color: var(--so-text-soft);
    line-height: 1.4;
}

.staaloasen-mr-box__status-icon {
    display: inline-flex;
    color: var(--so-olive);
    flex-shrink: 0;
}

.staaloasen-mr-box__status-text {
    flex: 1;
}

/* When status indicates an active discount */
.staaloasen-mr-box__status.is-active {
    background: linear-gradient(135deg, #eaf5d6 0%, #e1f0c8 100%);
    color: var(--so-olive-deep);
    font-weight: 600;
}

.staaloasen-mr-box__status.is-active .staaloasen-mr-box__status-icon {
    color: var(--so-green-dark);
}

.staaloasen-mr-box__status .staaloasen-mr-box__saved {
    font-weight: 700;
    color: var(--so-olive-deep);
}

/* ---------- Cart line item "saved" badge ---------- */
.staaloasen-mr-cart-saved {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    background: #eaf5d6;
    color: #4a5d23;
    border-radius: 999px;
    font-size: 0.82em;
    font-weight: 600;
}
.staaloasen-mr-cart-saved strong {
    color: #3c4f1f;
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
    .staaloasen-mr-box__header {
        flex-wrap: wrap;
        gap: 8px;
    }
    .staaloasen-mr-box__subtitle {
        flex-basis: 100%;
        font-size: 0.78rem;
        white-space: normal;
    }
    .staaloasen-mr-tier {
        padding: 12px 14px;
        gap: 10px;
    }
    .staaloasen-mr-tier__qty {
        font-size: 0.95rem;
    }
    .staaloasen-mr-tier__pct {
        font-size: 1.1rem;
    }
}
