/*
 * Grade de quantidade por opção (módulo quantity_options).
 *
 * Bloco BEM próprio (`quantity-options`) para não colidir com o tema, no mesmo
 * padrão adotado pelo módulo quantity_price.
 */

.quantity-options {
    margin: 0 0 1rem;
}

.quantity-options__heading {
    font-weight: 600;
    margin-bottom: .5rem;
}

.quantity-options__rows {
    display: flex;
    flex-direction: column;
}

.quantity-options__row {
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: .5rem 0;
}

.quantity-options__row:last-child {
    border-bottom: 0;
}

.quantity-options__row--unavailable {
    opacity: .5;
}

.quantity-options__info {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    min-width: 0;
}

.quantity-options__label {
    font-weight: 600;
}

.quantity-options__price {
    color: inherit;
}

.quantity-options__stock {
    font-size: .8125rem;
    opacity: .7;
}

.quantity-options__stepper {
    align-items: stretch;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: 4px;
    display: flex;
    flex: 0 0 auto;
    overflow: hidden;
}

.quantity-options__step {
    background: transparent;
    border: 0;
    cursor: pointer;
    line-height: 1;
    min-width: 2.25rem;
    padding: .5rem;
}

.quantity-options__step:disabled {
    cursor: not-allowed;
    opacity: .4;
}

.quantity-options__input {
    border: 0;
    border-left: 1px solid rgba(0, 0, 0, .15);
    border-right: 1px solid rgba(0, 0, 0, .15);
    max-width: 4rem;
    padding: .5rem;
    text-align: center;
    width: 4rem;
}

/* Evita que o teclado numérico do desktop exiba as setas nativas. */
.quantity-options__input::-webkit-outer-spin-button,
.quantity-options__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-options__footer {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    margin-top: .75rem;
}

.quantity-options__summary {
    font-size: .875rem;
}

.quantity-options__moq {
    font-size: .8125rem;
    opacity: .75;
}

.quantity-options--moq-blocked .quantity-options__moq {
    color: #c0392b;
    font-weight: 600;
    opacity: 1;
}

.quantity-options__submit {
    flex: 1 1 auto;
}

@media (min-width: 576px) {
    .quantity-options__submit {
        flex: 0 0 auto;
    }
}

/*
 * Elementos que a grade substitui: o seletor da opção que virou grade e os
 * controles nativos de compra (que operam sobre uma única variação).
 * `!important` porque o tema define o display desses blocos em regras próprias.
 */
.quantity-options-native-hidden {
    display: none !important;
}
