/**
 * Inventory badges — destaque amarelo nos tamanhos com baixo estoque.
 * Sem texto acima. Legenda abaixo do grid.
 */

/* ── Botão com baixo estoque — borda amarela ── */

.size-btn.low-stock {
    border-color: #d97706 !important;
    background: rgba(217, 119, 6, 0.06);
}

.size-btn.low-stock:hover {
    border-color: #b45309 !important;
    background: rgba(217, 119, 6, 0.10);
}

/* Selected: fundo verde, borda amarela mantém */
.size-buttons-grid .size-btn.low-stock.selected,
td.value .size-buttons-grid .size-btn.low-stock.selected {
    background: #3c7052 !important;
    color: #fff !important;
    border-color: #d97706 !important;
}

.size-buttons-grid .size-btn.low-stock.selected:hover,
td.value .size-buttons-grid .size-btn.low-stock.selected:hover {
    background: #2f5a42 !important;
    border-color: #b45309 !important;
}

/* ── Cor global de seleção: todos os botões de tamanho e sistema ── */

.size-buttons-grid .size-btn.selected,
.size-buttons-grid .size-btn.selected:hover,
td.value .size-buttons-grid .size-btn.selected {
    background: #3c7052 !important;
    color: #fff !important;
    border-color: #3c7052 !important;
}

.size-buttons-grid .size-btn.selected:hover,
td.value .size-buttons-grid .size-btn.selected:hover {
    background: #2f5a42 !important;
    border-color: #2f5a42 !important;
}

.size-system-toggle .system-btn.active {
    background: #3c7052 !important;
    color: #fff !important;
    border-color: #3c7052 !important;
}

.size-system-toggle .system-btn.active:hover {
    background: #2f5a42 !important;
    border-color: #2f5a42 !important;
}

/* ── Legenda abaixo do grid ── */

/* Fix: grid cortava bordas por overflow:hidden da animação */
.size-buttons-grid.show {
    overflow: visible !important;
    padding: 2px;
    margin: -2px;
}

.dsm-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 11px;
    color: #888;
}

.dsm-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d97706;
    flex-shrink: 0;
    animation: dsm-pulse 2.5s ease-in-out infinite;
}

@keyframes dsm-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ── Urgency text no mini cart e cart page ── */

/* Mini cart: abaixo do qty selector */
.cart-widget-side .dsm-cart-urgency {
    display: block;
    font-size: 16px;
    color: #ff2020;
    font-weight: 500;
    padding: 2px 0 0 0;
    line-height: 1.2;
    grid-column: 1 / -1;
}

/* Cart page: inline ao lado da lixeira */
.cart-item-actions .dsm-cart-urgency {
    font-size: 18px;
    color: #ff2020;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 8px;
}

/* ── Responsivo ── */

@media (max-width: 768px) {
    .cart-item-actions .dsm-cart-urgency {
        font-size: 14px;
        margin-left: 4px;
    }
}

@media (max-width: 480px) {
    .dsm-legend {
        font-size: 10px;
    }

    .cart-item-actions .dsm-cart-urgency {
        font-size: 14px;
        margin-left: 2px;
    }
}
