.rp-quantity-notice {
    box-sizing: border-box;
    display: block;
    grid-column: 1 / -1;
    inline-size: fit-content;
    max-inline-size: min(100%, 24rem);
    margin: 0.375rem 0 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid #f0deb1;
    border-inline-start: 3px solid #b16410;
    border-radius: 0.375rem;
    background: #fff8e7;
    color: #623c14;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: start;
    white-space: normal;
    overflow-wrap: anywhere;
}

.rp-quantity-notice:empty {
    display: none;
}

.rp-quantity-notice[data-rp-quantity-error] {
    margin-block: 0 0.75rem;
}

.product-detail__top + .rp-quantity-notice {
    margin-block-start: 1rem;
    margin-inline-start: auto;
}

.c-product-counter + .rp-quantity-notice {
    margin-block-end: 0.375rem;
}

.variants-table .actions:has(> .rp-quantity-notice:not(:empty)) {
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    min-inline-size: 0;
}

.variants-table .actions > .rp-quantity-notice {
    max-inline-size: min(100%, 14rem);
}

@media (max-width: 991.98px) {
    .product-detail__top + .rp-quantity-notice {
        margin-block-start: 1.5rem;
    }

    .variants-table .actions:has(> .rp-quantity-notice:not(:empty)) {
        align-items: flex-start;
    }

    .variants-table .actions:has(> .rp-quantity-notice:not(:empty)) > .c-product-counter {
        margin-inline-start: 0;
    }

    .variants-table tr:has(> .actions > .rp-quantity-notice:not(:empty)) > .pricing {
        position: static;
    }
}
