.installment-pay {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: max-content;
    max-width: 100%;
    min-width: 0;
    min-height: var(--installment-pay-desktop-min-height, 20px);
    margin-block: 5px 0;
    padding: var(--installment-pay-desktop-padding-y, 0) var(--installment-pay-desktop-padding-x, 5px);
    border: var(--installment-pay-desktop-border-width, 0) solid var(--installment-pay-border, #b9cb69);
    border-radius: var(--installment-pay-desktop-radius, 4px);
    background: var(--installment-pay-background, #dfff82);
    color: var(--installment-pay-detail, #202743);
    font-family: prk-font, inherit;
    line-height: 1.7;
    text-align: right;
    white-space: normal;
}

.installment-pay[data-installment-pay-injected="1"] {
    margin-inline: 0;
}

.installment-pay__icon {
    display: none;
}

.installment-pay__copy {
    display: inline-flex;
    align-items: baseline;
    min-width: 0;
}

.installment-pay__title,
.installment-pay__detail {
    min-width: 0;
}

.installment-pay__title {
    color: var(--installment-pay-title, #304fe8);
    font-size: var(--installment-pay-desktop-title-size, 11px);
    font-weight: var(--installment-pay-title-weight, 600);
}

.installment-pay__detail {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    color: var(--installment-pay-detail, #202743);
}

.installment-pay__detail-label {
    font-size: var(--installment-pay-desktop-detail-size, 11px);
    font-weight: var(--installment-pay-detail-weight, 600);
}

.installment-pay__amount {
    color: var(--installment-pay-amount, #202743);
    font-family: inherit;
    font-size: var(--installment-pay-desktop-amount-size, 11px);
    font-style: normal;
    font-weight: var(--installment-pay-amount-weight, 800);
}

.installment-pay__currency {
    color: var(--installment-pay-currency, #202743);
    font-size: var(--installment-pay-desktop-currency-size, 11px);
    font-weight: var(--installment-pay-currency-weight, 600);
}

.installment-pay__detail-label:empty,
.installment-pay__currency:empty {
    display: none;
}

.installment-pay__detail:not([hidden])::before {
    content: "؛";
    margin-inline: 2px;
}

.installment-pay__detail[hidden] {
    display: none !important;
}

/* The original Archive V4 card wraps seller and price in one product link. */
.prk-av4-card--tailwind > article > .prk-av4-card__link {
    flex: 1 1 auto;
    height: auto;
}

.installment-pay__commerce {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

.installment-pay__commerce > .prk-av4-card__seller {
    width: 100%;
}

.installment-pay__commerce > .installment-pay {
    align-self: flex-start;
    margin-block: 2px 0;
}

.installment-pay__price-link {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.prk-av4-card--classic .prk-av4-card__body > .installment-pay {
    align-self: flex-start;
    margin-block: 2px 0;
}

/* Amount-first installment card for two-column mobile product grids. */
@media (max-width: 767px) {
    .installment-pay {
        direction: rtl;
        display: flex;
        width: 100%;
        min-height: var(--installment-pay-mobile-min-height, 52px);
        margin-block: 4px 0;
        padding: var(--installment-pay-mobile-padding-y, 7px) var(--installment-pay-mobile-padding-x, 8px);
        border: var(--installment-pay-mobile-border-width, 1px) solid var(--installment-pay-border, #b9cb69);
        border-radius: var(--installment-pay-mobile-radius, 9px);
        background: var(--installment-pay-background, #dfff82);
        gap: var(--installment-pay-mobile-gap, 7px);
        justify-content: flex-start;
        text-align: right;
        white-space: normal;
    }

    .installment-pay__icon {
        display: var(--installment-pay-icon-display, inline-flex);
        flex: 0 0 calc(var(--installment-pay-mobile-icon-size, 24px) + 2px);
        align-items: center;
        justify-content: center;
        width: calc(var(--installment-pay-mobile-icon-size, 24px) + 2px);
        height: calc(var(--installment-pay-mobile-icon-size, 24px) + 2px);
        color: var(--installment-pay-icon, #304fe8);
    }

    .installment-pay__icon svg {
        display: block;
        width: var(--installment-pay-mobile-icon-size, 24px);
        height: var(--installment-pay-mobile-icon-size, 24px);
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .installment-pay__copy {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        overflow: visible;
    }

    .installment-pay__title {
        max-width: 100%;
        color: var(--installment-pay-title, #304fe8);
        font-size: var(--installment-pay-mobile-title-size, 9px);
        font-weight: var(--installment-pay-title-weight, 600);
        line-height: 1.5;
        white-space: nowrap;
    }

    .installment-pay__detail {
        display: inline-flex;
        align-items: baseline;
        gap: 3px;
        max-width: 100%;
        color: var(--installment-pay-detail, #202743);
        font-size: var(--installment-pay-mobile-detail-size, 9px);
        font-weight: var(--installment-pay-detail-weight, 600);
        font-variant-numeric: tabular-nums;
        line-height: 1.35;
        white-space: nowrap;
    }

    .installment-pay__amount {
        color: var(--installment-pay-amount, #202743);
        font-size: var(--installment-pay-mobile-amount-size, 15px);
        font-weight: var(--installment-pay-amount-weight, 800);
        letter-spacing: -0.2px;
        line-height: 1.25;
    }

    .installment-pay__detail-label {
        font-size: var(--installment-pay-mobile-detail-size, 9px);
        font-weight: var(--installment-pay-detail-weight, 600);
    }

    .installment-pay__currency {
        color: var(--installment-pay-currency, #202743);
        font-size: var(--installment-pay-mobile-currency-size, 9px);
        font-weight: var(--installment-pay-currency-weight, 600);
    }

    .installment-pay__detail:not([hidden])::before {
        content: none;
        margin: 0;
    }

    .installment-pay__commerce {
        gap: 0;
    }

    .installment-pay__commerce > .prk-av4-card__seller {
        min-width: 0;
        min-height: 24px;
        flex-wrap: wrap;
        gap: 2px 4px;
        font-size: 10px;
        line-height: 1.6;
    }

    .installment-pay__commerce > .prk-av4-card__seller strong {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .installment-pay__commerce > .installment-pay,
    .prk-av4-card--classic .prk-av4-card__body > .installment-pay {
        align-self: stretch;
        margin-block: 3px 0;
    }

    .installment-pay__price-link .prk-av4-card__pricebox {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        height: auto !important;
        min-height: 38px;
        margin-block: 6px !important;
    }

    .installment-pay__price-link .final-price-box {
        min-width: 0;
        flex-wrap: nowrap;
    }

    .installment-pay__price-link .current-price {
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
    }
}

@media (max-width: 380px) {
    .installment-pay {
        position: relative;
        display: block;
    }

    .installment-pay__icon {
        position: absolute;
        inset-block-start: var(--installment-pay-mobile-padding-y, 7px);
        inset-inline-start: var(--installment-pay-mobile-padding-x, 8px);
        width: calc(var(--installment-pay-mobile-icon-size, 24px) + 2px);
        height: calc(var(--installment-pay-mobile-icon-size, 24px) + 2px);
    }

    .installment-pay__copy {
        width: 100%;
        overflow: visible;
    }

    .installment-pay__title {
        padding-inline-start: var(--installment-pay-icon-space, calc(var(--installment-pay-mobile-icon-size, 24px) + 4px));
    }

    .installment-pay__detail {
        gap: 2px;
    }

    .installment-pay__price-link .prk-av4-card__pricebox {
        margin-block: 4px !important;
    }
}

/* The option only hides seller information inside known product cards. */
.installment-pay-hide-card-seller :is(
    li.product,
    .prk-av4-card,
    .product-card,
    .prk-fashion-card-slide,
    .prk-mini-offer__slide,
    .product_wee,
    .prk-multi-line__product,
    .prk-game-product-card,
    .grid_item,
    .item-pro,
    [data-prk-mini-product],
    [data-prk-momentary-item],
    [data-prk-multi-product-item],
    [data-prk-special-panel]
) :is(
    .prk-av4-card__seller,
    .author-ar,
    .product-card__seller,
    .product-seller,
    .product-seller-name,
    .vendor-name,
    [data-product-seller]
) {
    display: none !important;
}
