.aromy-expected-stock {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px 5px;
    margin: 4px 0 0;
    color: #65596c;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.aromy-expected-stock-label {
    max-inline-size: 100%;
    text-wrap: balance;
}

.aromy-expected-stock-guide,
.aromy-expected-stock .apt-stock {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 2px;
}

.aromy-expected-stock .apt-stock i {
    display: block;
    flex: 0 0 9px;
    inline-size: 9px;
    block-size: 9px;
    background: currentColor;
}

.aromy-expected-stock .apt-stock[data-level="1"] { color: #ff2525; }
.aromy-expected-stock .apt-stock[data-level="2"] { color: #ff8700; }
.aromy-expected-stock .apt-stock[data-level="3"] { color: #b4e300; }
.aromy-expected-stock .apt-stock[data-level="4"] { color: #88ff00; }
.aromy-expected-stock .apt-stock[data-level="5"] { color: #00d64e; }

.aromy-expected-stock .apt-legend {
    position: relative;
    display: inline-flex;
}

.aromy-expected-stock button.apt-legend-toggle,
#apt .aromy-expected-stock button.apt-legend-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 22px;
    block-size: 22px;
    min-block-size: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6d6574;
}

.aromy-expected-stock .apt-legend-toggle svg {
    inline-size: 16px;
    block-size: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.aromy-expected-stock .apt-legend-popup {
    display: none;
}

.aromy-expected-stock .aromy-expected-legend-open > .apt-legend-popup {
    position: absolute;
    z-index: 40;
    inset-block-start: calc(100% + 5px);
    inset-inline-start: 0;
    display: block;
    inline-size: 245px;
    max-inline-size: calc(100vw - 24px);
    padding: 10px 12px;
    border: 1px solid #e1dce5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 3px 12px rgb(37 30 43 / 12%);
    color: #251e2b;
    font-size: 12px;
    font-weight: 400;
}

.aromy-expected-legend-open .apt-legend-row {
    display: flex;
    align-items: center;
    gap: 7px;
    min-block-size: 22px;
}

.aromy-expected-legend-open .apt-legend-row .apt-stock {
    flex: 0 0 38px;
}

.aromy-expected-legend-open .apt-legend-row .apt-stock i {
    flex-basis: 6px;
    inline-size: 6px;
    block-size: 6px;
}

.product-small:has(.aromy-expected-stock) .out-of-stock-label {
    display: none;
}

.apd-stock + .aromy-expected-stock,
.woosq-product .aromy-expected-stock {
    margin-block: 5px 10px;
}

.apd-stock-expected > .aromy-expected-stock {
    margin: 0;
}

#apt .apt-table td:nth-child(3) > .aromy-expected-stock {
    flex: 0 0 100%;
    margin-block-start: 2px;
    font-size: 11px;
}

#apt .apt-table td:nth-child(3) > .apt-stock,
#apt .apt-table .aromy-expected-stock-guide > .apt-stock {
    gap: 2px;
}

#apt .apt-table td:nth-child(3) > .apt-stock > i,
#apt .apt-table .aromy-expected-stock-guide > .apt-stock > i {
    flex-basis: 7px;
    inline-size: 7px;
    block-size: 8px;
}

:is(.apd-summary, .ae-qv, .apd-related-grid article) > .apd-stock:has(+ .aromy-expected-stock) {
    margin-block-end: 0;
}

:is(.apd-summary, .ae-qv, .apd-related-grid article) > .apd-stock + .aromy-expected-stock {
    margin-block-start: 2px;
}

.apd-related-grid article > .apd-stock:has(+ .aromy-expected-stock) {
    margin-block-start: 8px;
}

@media (min-width: 701px) and (max-width: 1199px) {
    #apt:is(.apt-catalog, .apt-home-view)[data-view="table"] .apt-table:has(.aromy-expected-stock) th:nth-child(3) {
        width: 128px;
    }

    #apt:is(.apt-catalog, .apt-home-view)[data-view="table"] .apt-table td:nth-child(3) > .aromy-expected-stock {
        font-size: 10px;
    }

    #apt:is(.apt-catalog, .apt-home-view)[data-view="table"] .apt-table .apt-quick {
        min-inline-size: 0;
        padding-inline: 0;
        font-size: 12px;
        gap: 4px;
    }
}

@media (min-width: 1200px) {
    #apt:is(.apt-catalog, .apt-home-view)[data-view="table"] .apt-table:has(.aromy-expected-stock) th:nth-child(3) {
        width: 214px;
    }
}

@media (max-width: 700px) {
    #apt:is(.apt-catalog, .apt-home-view)[data-view="grid"] .apt-table .apt-mobile-tags {
        order: -1;
    }
}

@media (max-width: 599px) {
    #apt:is(.apt-catalog, .apt-home-view)[data-view="grid"] .apt-table td:nth-child(3) {
        column-gap: 3px;
    }

    #apt:is(.apt-catalog, .apt-home-view)[data-view="grid"] .apt-table td:nth-child(3) > .aromy-expected-stock {
        font-size: 10px;
    }
}

#apt:is(.apt-catalog, .apt-home-view)[data-view="grid"] .apt-table td:nth-child(3):has(> .aromy-expected-stock) {
    flex-wrap: wrap;
    row-gap: 2px;
}

#apt:is(.apt-catalog, .apt-home-view)[data-view="grid"] .apt-table tr.apt-is-unavailable:has(> td:nth-child(3) > .aromy-expected-stock) > td:nth-child(2) {
    flex: 0 0 auto;
}

#apt:is(.apt-catalog, .apt-home-view)[data-view="grid"] .apt-table tr.apt-is-unavailable td:nth-child(3):has(> .aromy-expected-stock) {
    display: flex !important;
}

#apt:is(.apt-catalog, .apt-home-view)[data-view="grid"] .apt-table tr.apt-is-unavailable td:nth-child(3) > .aromy-expected-stock {
    margin-block-start: 0;
}

#apt:is(.apt-catalog, .apt-home-view)[data-view="grid"] .apt-table tr.apt-is-unavailable td:nth-child(3):has(> .aromy-expected-stock)::before {
    content: none;
}
