.fi-resource-relation-manager .psr-active-cell {
    background-color: var(--ps-active-cell-bg) !important;
    color: var(--ps-row-input-text) !important;
}

.fi-resource-relation-manager .psr-active-cell--stripe {
    box-shadow: inset 4px 0 0 var(--ps-active-cell-stripe);
}

.fi-resource-relation-manager .psr-active-cell *,
.fi-resource-relation-manager .psr-active-cell .fi-ta-text,
.fi-resource-relation-manager .psr-active-cell .fi-input,
.fi-resource-relation-manager .psr-active-cell input,
.fi-resource-relation-manager .psr-active-cell textarea {
    color: var(--ps-row-input-text) !important;
}

.fi-resource-relation-manager .psr-active-cell .fi-input-wrp,
.fi-resource-relation-manager .psr-active-cell .fi-input-wrp-content-ctn,
.fi-resource-relation-manager .psr-active-cell .fi-input,
.fi-resource-relation-manager .psr-active-cell input,
.fi-resource-relation-manager .psr-active-cell textarea {
    background: transparent !important;
    border-color: var(--ps-row-input-border) !important;
}

.fi-resource-relation-manager .psr-active-cell .fi-input-wrp {
    background: var(--ps-row-input-bg) !important;
}

.fi-resource-relation-manager .psr-row-input--quantity,
.fi-resource-relation-manager .psr-row-input--quantity .fi-input-wrp,
.fi-resource-relation-manager .psr-row-input--quantity .fi-input-wrp-content-ctn,
.fi-resource-relation-manager .psr-row-input--quantity .fi-input,
.fi-resource-relation-manager .psr-row-input--quantity input {
    width: var(--ps-quantity-width) !important;
    min-width: var(--ps-quantity-width) !important;
    max-width: var(--ps-quantity-width) !important;
}

.fi-resource-relation-manager .psr-row-input--quantity {
    flex: 0 0 var(--ps-quantity-width);
}

.fi-resource-relation-manager td:has(.psr-row-input--quantity) {
    padding-inline-end: 0.75rem !important;
}

.fi-resource-relation-manager .psr-row-input--comment,
.fi-resource-relation-manager .psr-row-input--comment .fi-input-wrp,
.fi-resource-relation-manager .psr-row-input--comment .fi-input-wrp-content-ctn,
.fi-resource-relation-manager .psr-row-input--comment .fi-input,
.fi-resource-relation-manager .psr-row-input--comment input,
.fi-resource-relation-manager .psr-row-input--comment textarea {
    min-width: var(--ps-comment-width) !important;
}

.fi-resource-relation-manager .psr-row-input--comment {
    min-width: var(--ps-comment-width);
}

.fi-resource-relation-manager .psr-quantity-input__field {
    appearance: textfield;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    padding-right: 0.75rem !important;
    text-align: right;
}

.fi-resource-relation-manager .psr-quantity-input__field::-webkit-outer-spin-button,
.fi-resource-relation-manager .psr-quantity-input__field::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Offer count badge inline with product name */
.psr-offer-badge-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.psr-product-name-link {
    color: var(--fi-primary-color, #d97706);
}

.psr-product-name-link:hover {
    text-decoration: underline;
}

.psr-offer-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.3rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    flex-shrink: 0;
}

.psr-offer-badge--has-offers {
    background-color: rgb(220 252 231);
    color: rgb(22 101 52);
}

.psr-offer-badge--no-offers {
    background-color: rgb(243 244 246);
    color: rgb(107 114 128);
}

@media (prefers-color-scheme: dark) {
    .psr-offer-badge--has-offers {
        background-color: rgb(20 83 45 / 0.5);
        color: rgb(134 239 172);
    }

    .psr-offer-badge--no-offers {
        background-color: rgb(55 65 81 / 0.5);
        color: rgb(156 163 175);
    }
}
