/*
 * Mesolab B2B expiry-product frontend styles.
 * All catalogue compatibility rules are scoped to expiry products only.
 */

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
ul.products li.product,
li.product {
    position: relative;
}

.mesolab-expiry-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 7px 11px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.045em;
    pointer-events: none;
    box-sizing: border-box;
    white-space: nowrap;
}

/* Keep the expiry label below the existing B2B "Du sparer" badge. */
.mesolab-expiry-product--has-b2b-saving .mesolab-expiry-card-badge {
    top: 48px;
}

.mesolab-expiry-card-badge--soon {
    background: #f8e984;
    color: #111827;
}

.mesolab-expiry-card-badge--expired {
    background: #d8605c;
    color: #ffffff;
}

/*
 * Price typography is intentionally not styled here. Expiry products must use
 * exactly the same WooCommerce/B2B/specific-price typography as every other
 * product card; this plugin only owns the expiry status UI.
 */

.mesolab-expiry-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    margin: 8px 0 12px;
    padding: 10px 12px;
    border: 1px solid #f0c36d;
    border-radius: 8px;
    background: #fff8e5;
    color: #3d2a00;
    font-size: 14px;
    line-height: 1.45;
    box-sizing: border-box;
}

.mesolab-expiry-notice__label {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    border-radius: 999px;
    background: #000000;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.mesolab-expiry-notice__text {
    display: block;
    flex: 1 1 auto;
}

.mesolab-expiry-notice--single {
    max-width: 620px;
    margin-top: 10px;
    margin-bottom: 18px;
    font-size: 15px;
}

.mesolab-expiry-notice--expired {
    border-color: #d63638;
    background: #fff0f0;
    color: #4a0909;
}

.mesolab-expiry-notice--soon {
    border-color: #dba617;
    background: #fff8e5;
}

@media (max-width: 600px) {
    .mesolab-expiry-card-badge {
        top: 8px;
        right: 8px;
        min-height: 27px;
        max-width: calc(100% - 16px);
        padding: 6px 9px;
        font-size: 10px;
        white-space: normal;
        text-align: center;
    }

    .mesolab-expiry-product--has-b2b-saving .mesolab-expiry-card-badge {
        top: 42px;
    }

}
