/* Systema Restricted Shipping — frontend product page notice */

.rs-product-restrictions {
    margin: 12px 0 18px;
    padding: 12px 14px;
    border-radius: 4px;
    background: #fcf9e8;
    border-left: 4px solid #dba617;
    color: #46410c;
    font-size: 14px;
    line-height: 1.45;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.rs-product-restrictions-line {
    margin: 0 0 6px;
}
.rs-product-restrictions-line:last-child { margin-bottom: 0; }

.rs-product-restrictions .rs-restriction-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    background: #dba617;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    margin-right: 6px;
    vertical-align: middle;
}

.rs-product-restrictions-line.rs-restriction-block {
    color: #5b1c1d;
}
.rs-product-restrictions-line.rs-restriction-block .rs-restriction-icon {
    background: #b32d2e;
}

.rs-product-restrictions-line.rs-restriction-license .rs-restriction-icon {
    background: #2271b1;
    color: #fff;
}
.rs-product-restrictions-line.rs-restriction-license {
    color: #14366a;
}

.rs-product-restrictions strong {
    color: inherit;
    font-weight: 700;
}

/* Cart / checkout aggregate variant ------------------------------------ */
.rs-cart-restrictions-list {
    margin: 6px 0 8px 26px;   /* indent past the icon */
    padding: 0;
    list-style: disc;
    font-size: 13px;
}
.rs-cart-restrictions-list li {
    margin: 2px 0;
}
.rs-cart-restrictions-list li:last-child {
    margin-bottom: 0;
}

/* ------------------------------------------------------------------ *
 * Per-line restriction injected via woocommerce_get_item_data
 * ------------------------------------------------------------------ *
 * Block cart wraps each item_data entry in:
 *   .wc-block-components-product-details__item
 *     .wc-block-components-product-details__name (the "key:")
 *     .wc-block-components-product-details__value (the "value")
 * When 'display' HTML is set, the value div renders our raw markup.
 * We hide the "key:" prefix and let our own pill-styled span carry it.
 */

/* Block cart: hide the "Shipping restriction:" label since our display
   HTML already states what kind of restriction it is. */
.wc-block-components-product-details__item:has(.rs-line-restriction)
    .wc-block-components-product-details__name {
    display: none;
}

/* Push the restriction line to the right edge of its container */
.wc-block-components-product-details__item:has(.rs-line-restriction) {
    text-align: right;
    margin-top: 4px;
}

/* Classic cart fallback: dl.variation entries — do similar */
dl.variation > dt:has(+ dd .rs-line-restriction) { display: none; }
dl.variation > dd:has(.rs-line-restriction) { text-align: right; margin-bottom: 0; }

/* The pill-style restriction line itself */
.rs-line-restriction {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    max-width: 100%;
    text-align: left;
}
.rs-line-restriction .rs-line-icon {
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    flex: 0 0 auto;
}
.rs-line-restriction strong { font-weight: 700; }

.rs-line-block {
    background: rgba(214, 54, 56, 0.12);
    color: #5b1c1d;
    border: 1px solid rgba(214, 54, 56, 0.35);
}
.rs-line-block .rs-line-icon { background: #b32d2e; }

.rs-line-license {
    background: rgba(34, 113, 177, 0.10);
    color: #14366a;
    border: 1px solid rgba(34, 113, 177, 0.30);
}
.rs-line-license .rs-line-icon { background: #2271b1; }
