/*rzm:s7*/
/*
 * eBazar Post — cart & checkout styles.
 *
 * Migrated verbatim out of add_shipping_logo_styles_adib()'s footer <style>
 * block so that it is cacheable, deduplicated and visible to WP Rocket's
 * Remove Unused CSS pass. Declarations below the marked section were added
 * for the «محاسبه نشده» rate state and use no !important.
 */

.woocommerce-shipping-methods label {
        display: inline-flex !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    
    .woocommerce-shipping-methods label img {
        max-height: 28px !important;
        width: auto !important;
        border-radius: 4px !important;
        vertical-align: middle !important;
        margin-left: 8px !important;
    }
    
    .woocommerce-shipping-methods label .shipping-icon-svg {
        width: 24px !important;
        height: 24px !important;
        flex-shrink: 0 !important;
        vertical-align: middle !important;
        margin-left: 8px !important;
        filter: drop-shadow(0 6px 12px rgba(2, 6, 23, 0.12)) !important;
    }
    
    .woocommerce-shipping-methods label span {
        vertical-align: middle !important;
    }


    .ebazar-free-shipping-wrapper {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
    }
    
    .ebazar-free-shipping-wrapper--v2026 {
        gap: 10px !important;
        line-height: 1.2 !important;
    }
    
    .ebazar-free-shipping-original--v2026 {
        position: relative !important;
        display: inline-flex !important;
        align-items: center !important;
        padding: 4px 10px !important;
        border-radius: 999px !important;
        background: rgba(239, 68, 68, 0.08) !important;
        border: 1px solid rgba(239, 68, 68, 0.25) !important;
        color: rgba(185, 28, 28, 0.95) !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
    }
    
    .ebazar-free-shipping-original--v2026 .woocommerce-Price-amount,
    .ebazar-free-shipping-original--v2026 > span {
        color: inherit !important;
        font-weight: 800 !important;
        text-decoration: none !important;
        white-space: nowrap !important;
    }
    
    .ebazar-free-shipping-original--v2026::after {
        content: "" !important;
        position: absolute !important;
        left: 8px !important;
        right: 8px !important;
        top: 50% !important;
        height: 2px !important;
        transform: translateY(-50%) rotate(-6deg) !important;
        background: linear-gradient(90deg, rgba(239, 68, 68, 0), rgba(239, 68, 68, 0.95), rgba(239, 68, 68, 0)) !important;
        border-radius: 999px !important;
        filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.45)) !important;
    }
    
    .ebazar-free-shipping-badge {
        position: relative !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 5px 12px !important;
        border-radius: 999px !important;
        background: linear-gradient(135deg, #22c55e 0%, #0ea5e9 60%, #6366f1 100%) !important;
        color: #fff !important;
        font-weight: 900 !important;
        white-space: nowrap !important;
        box-shadow: 0 14px 34px rgba(14, 165, 233, 0.16), 0 10px 26px rgba(34, 197, 94, 0.14) !important;
        overflow: hidden !important;
    }
    
    .ebazar-free-shipping-badge::before {
        content: "" !important;
        position: absolute !important;
        top: -45% !important;
        bottom: -45% !important;
        width: 64px !important;
        left: -90px !important;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0)) !important;
        transform: rotate(18deg) !important;
        opacity: 0.65 !important;
    }
    
    .woocommerce-shipping-methods label:hover .ebazar-free-shipping-badge::before {
        left: calc(100% + 90px) !important;
    }
    
    .ebazar-free-shipping-text {
        color: inherit !important;
        font-weight: 900 !important;
        letter-spacing: -0.2px !important;
    }

    .ebazar-postpaid-wrapper {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .ebazar-postpaid-badge {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 5px 12px !important;
        border-radius: 999px !important;
        background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
        color: #fff !important;
        font-weight: 900 !important;
        white-space: nowrap !important;
        box-shadow: 0 10px 26px rgba(217, 119, 6, 0.18) !important;
    }

    .ebazar-postpaid-text {
        color: inherit !important;
        font-weight: 900 !important;
    }
    
    .ebazar-free-shipping-reason {
        display: inline-flex !important;
        align-items: center !important;
        padding: 4px 10px !important;
        border-radius: 999px !important;
        background: rgba(2, 6, 23, 0.04) !important;
        border: 1px solid rgba(2, 6, 23, 0.08) !important;
        color: rgba(2, 6, 23, 0.72) !important;
        font-weight: 700 !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }
    
    @media (max-width: 420px) {
        .ebazar-free-shipping-badge {
            padding: 5px 10px !important;
        }
        .ebazar-free-shipping-original--v2026 {
            padding: 4px 9px !important;
        }
        .ebazar-free-shipping-reason {
            font-size: 12px !important;;
        }
    }


/* =====================================================================
 * «محاسبه نشده» — the pre-paid post rate before its price is known.
 *
 * Rendered server side by Bazar_Post_Shipping_Method::add_pending_rate(), so it
 * is present in the HTML even if every script on the page is delayed or blocked.
 * No !important is used here: nothing else in the stack targets these classes.
 * ===================================================================== */

.woocommerce-shipping-methods .ebazar-price-pending {
    display: inline-flex;
    align-items: center;
    margin-inline-start: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: clamp(12px, 2.6vw, 13px);;
    font-weight: 700;
    line-height: 1.7;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    white-space: nowrap;
}

.woocommerce-shipping-methods .ebazar-pending-note {
    display: none;
    flex-basis: 100%;
    width: 100%;
    margin-top: 6px;
    font-size: clamp(12px, 2.5vw, 12.5px);;
    font-weight: 500;
    line-height: 1.8;
    color: #92400e;
    text-align: right;
    direction: rtl;
}

/* The explanation appears the moment the customer picks the uncalculated rate.
   Two selectors so this works on the standard input+label markup as well as on
   themes that wrap the pair in a list item. */
.woocommerce-shipping-methods input.shipping_method:checked + label .ebazar-pending-note,
.woocommerce-shipping-methods li:has(input.shipping_method:checked) .ebazar-pending-note {
    display: block;
}

.woocommerce-shipping-methods input.shipping_method:checked + label .ebazar-price-pending,
.woocommerce-shipping-methods li:has(input.shipping_method:checked) .ebazar-price-pending {
    color: #7c2d12;
    background: #fde68a;
    border-color: #f59e0b;
}

.ebazar-rate-pending-flag {
    display: none;
}

/* The shipping warning is no longer a standalone notice: it is rendered into the
   row's own .shipping-description-box, styled as the warning variant of that
   component in premium-order-pay-plugin/assets/css/order-pay-premium.css. There is
   deliberately nothing here, so the box has exactly one owner. */

/* -----------------------------------------------------------------
 * Shipping rows: these four declarations used to be written into the
 * page by beautiful-fast-cart/assets/js/shipping-fix.js as a runtime
 * <style id="remove-shipping-line-style"> element plus a sweep of
 * inline .css() calls. Expressed here once, in the cascade.
 * ----------------------------------------------------------------- */
@media (min-width: 750px) {

    .woocommerce-cart tr.woocommerce-shipping-totals.shipping,
    .woocommerce-cart tr.woocommerce-shipping-totals.shipping th,
    .woocommerce-cart tr.woocommerce-shipping-totals.shipping td,
    .woocommerce-checkout tr.woocommerce-shipping-totals.shipping,
    .woocommerce-checkout tr.woocommerce-shipping-totals.shipping th,
    .woocommerce-checkout tr.woocommerce-shipping-totals.shipping td,
    .cart_totals tr.woocommerce-shipping-totals.shipping,
    .cart_totals tr.woocommerce-shipping-totals.shipping th,
    .cart_totals tr.woocommerce-shipping-totals.shipping td {
        border-bottom: 0;
    }

    .woocommerce-cart #shipping_method li,
    .woocommerce-cart #shipping_method li label,
    .woocommerce-cart .woocommerce-shipping-methods li,
    .woocommerce-cart .woocommerce-shipping-methods li label,
    .woocommerce-cart .shipping__list_item,
    .woocommerce-cart .shipping__list_item label,
    .woocommerce-checkout #shipping_method li,
    .woocommerce-checkout #shipping_method li label {
        border-bottom: 0;
    }

    .woocommerce-cart tr.woocommerce-shipping-totals.shipping::before,
    .woocommerce-cart tr.woocommerce-shipping-totals.shipping::after,
    .woocommerce-cart tr.woocommerce-shipping-totals.shipping th::before,
    .woocommerce-cart tr.woocommerce-shipping-totals.shipping th::after,
    .woocommerce-cart tr.woocommerce-shipping-totals.shipping td::before,
    .woocommerce-cart tr.woocommerce-shipping-totals.shipping td::after,
    .woocommerce-cart #shipping_method li::before,
    .woocommerce-cart #shipping_method li::after,
    .woocommerce-cart #shipping_method li label::before,
    .woocommerce-cart #shipping_method li label::after,
    .woocommerce-cart .woocommerce-shipping-methods li::before,
    .woocommerce-cart .woocommerce-shipping-methods li::after,
    .woocommerce-cart .woocommerce-shipping-methods li label::before,
    .woocommerce-cart .woocommerce-shipping-methods li label::after,
    .woocommerce-checkout #shipping_method li::before,
    .woocommerce-checkout #shipping_method li::after,
    .woocommerce-checkout #shipping_method li label::before,
    .woocommerce-checkout #shipping_method li label::after {
        content: none;
        border: 0;
        background: none;
        display: none;
    }
}

/* Small screens: keep the rate rows readable without horizontal overflow. */
@media (max-width: 480px) {

    .woocommerce-shipping-methods label {
        font-size: clamp(12px, 3.4vw, 14px);
        line-height: 1.8;
    }

    .woocommerce-shipping-methods .ebazar-price-pending {
        margin-inline-start: 6px;
        padding: 2px 8px;
    }
}
