/* Multibuy quantity options on the product page (functions.php, hw_qty_options). */
.hw-qty-options { display: flex; flex-direction: column; gap: 30px; margin-bottom: 24px; }
.hw-qty-options label.hw-qty-option { position: relative; display: flex; min-height: 88px; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 20px 28px; border: 2px solid transparent; border-radius: 10px; background: #fbf9ff; color: #3e3849; font-family: inherit; font-size: 18px; font-weight: 400; line-height: 23px; text-transform: none; letter-spacing: normal; cursor: pointer; transition: border-color .2s, background-color .2s; }
.hw-qty-options label.hw-qty-option input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.hw-qty-options label.hw-qty-option:hover { border-color: rgba(32, 242, 155, .4); }
/* Selected: the same as a selected cross-sell (plugins/hw-product-page-cross-sells). */
.hw-qty-options label.hw-qty-option:has(input:checked) { border-color: var(--bat-color-primary, #20f29b); background-color: #eefff8; }
.hw-qty-options label.hw-qty-option:has(input:focus-visible) { outline: 2px solid #3e3849; outline-offset: 2px; }
.hw-qty-option__text, .hw-qty-option__price { display: flex; flex-direction: column; gap: 4px; }
.hw-qty-option__price { flex-shrink: 0; align-items: flex-end; text-align: right; white-space: nowrap; }
.hw-qty-option__sub { color: #6f6a78; font-size: 15px; line-height: 20px; }
.hw-qty-option .woocommerce-Price-amount, .hw-qty-option .woocommerce-Price-currencySymbol { font: inherit; color: inherit; letter-spacing: inherit; }
.hw-qty-option__badge { position: absolute; top: 0; left: 24px; transform: translateY(-50%); padding: 4px 12px; border-radius: 999px; background: linear-gradient(90deg, #5ce6a2, #5fd6ca); color: #1d1a22; font-family: Poppins, sans-serif; font-size: 13px; font-weight: 600; line-height: 17px; white-space: nowrap; }

@media (max-width: 991px) {
    .hw-qty-options label.hw-qty-option { padding: 18px 20px; font-size: 15px; line-height: 20px; }
    .hw-qty-option__sub { font-size: 13px; line-height: 18px; }
}

@media (min-width: 992px) {
    .hw-qty-options { max-width: 400px; }
}

/* "Choose your quantity" dialog from the add-to-cart button in product loops (functions.php, hw_qty_dialog_footer).
   Same look as the THM marketing page's dialog (p1-meter-2.css, .thm2-qty-dialog). */
.hw-qty-dialog { width: 100%; max-width: 100%; margin: auto 0 0; padding: 0; border: 0; border-radius: 16px 16px 6px 6px; background: #fbf9ff; color: #3e3849; }
.hw-qty-dialog::backdrop { background: rgba(41, 37, 47, .2); }
html:has(.hw-qty-dialog[open]) { overflow: hidden; }
.hw-qty-dialog__box { display: flex; flex-direction: column; gap: 8px; padding: 40px 20px; }
.hw-qty-dialog__close-row { display: flex; justify-content: flex-end; margin: 0; }
.hw-qty-dialog .hw-qty-dialog__close { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; min-height: 0; padding: 8px; border: 0; border-radius: 8px; background: #fff; box-shadow: none; cursor: pointer; }
.hw-qty-dialog__close img { flex-shrink: 0; max-width: none; }
.hw-qty-dialog__body { display: flex; flex-direction: column; gap: 32px; text-align: center; }
.hw-qty-dialog .hw-qty-dialog__title { margin: 0; color: inherit; font-family: Poppins, sans-serif; font-size: 28px; font-weight: 600; line-height: normal; }
.hw-qty-dialog .hw-qty-dialog__title::after { display: none !important; }
.hw-qty-dialog__options { display: flex; flex-direction: column; gap: 24px; }
.hw-qty-dialog .hw-qty-dialog__option { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 88px; padding: 18px 20px; border: 0; border-radius: 10px; background: #fff; color: #3e3849; font-size: 15px; line-height: 20px; text-align: left; text-decoration: none; transition: box-shadow .2s; }
.hw-qty-dialog .hw-qty-dialog__option:hover { box-shadow: inset 0 0 0 2px var(--bat-color-primary, #20f29b); color: #3e3849; }
.hw-qty-dialog__option .hw-qty-option__text { flex: 1 1 auto; min-width: 0; }

/* Mobile: slides up from the bottom, the backdrop fades in. */
@media (max-width: 991px) and (prefers-reduced-motion: no-preference) {
    .hw-qty-dialog { transform: translateY(100%); transition: transform var(--transition-height, .4s ease), overlay var(--transition-height, .4s ease) allow-discrete, display var(--transition-height, .4s ease) allow-discrete; }
    .hw-qty-dialog[open] { transform: none; }
    .hw-qty-dialog::backdrop { opacity: 0; transition: opacity var(--transition-short, .25s ease), overlay var(--transition-short, .25s ease) allow-discrete, display var(--transition-short, .25s ease) allow-discrete; }
    .hw-qty-dialog[open]::backdrop { opacity: 1; }
    @starting-style {
        .hw-qty-dialog[open] { transform: translateY(100%); }
        .hw-qty-dialog[open]::backdrop { opacity: 0; }
    }
}

@media (min-width: 992px) {
    .hw-qty-dialog { width: 560px; margin: auto; border-radius: 16px; }
    .hw-qty-dialog__box { padding: 24px; }
    .hw-qty-dialog__body { padding: 8px 40px 32px; }
    .hw-qty-dialog .hw-qty-dialog__title { font-size: 34px; }
    .hw-qty-dialog .hw-qty-dialog__option { padding: 20px 28px; font-size: 18px; line-height: 23px; }
    .hw-qty-dialog .hw-qty-option__sub { font-size: 15px; line-height: 20px; }
}
