/**
 * Quote Request — dedupe hook output when a theme echoes the same
 * product_add_to_cart_html_{id} twice inside the product card chrome.
 *
 * Audited storefront templates (single hook — no rule needed):
 *   - storefront/.../blocks/product_listing.tpl   (list row)
 *   - storefront/.../blocks/product_cell_grid.tpl (grid card)
 *   - storefront/.../blocks/product_list.tpl
 *   - novator(_143)/.../blocks/product_listing.tpl (list view; no .qty-status-block)
 *   - foxy_template/.../blocks/product_list.tpl
 *
 * Duplicate hook (first copy inside .qty-status-block, second beside cart control):
 *   - novator(_143)/.../blocks/product_multiple_carousel.tpl
 *   - novator(_143)/.../blocks/product_card.tpl (stock layout only; first echo in .qty-status-block)
 *
 * Scoped to .add-to-cart-block so list layouts and default grid/list stay unaffected.
 */
/* Hide duplicate listing chrome (e.g. Novator card/carousel): first copy lives in .qty-status-block. */
.add-to-cart-block .qty-status-block .quote-request-listing-add,
.add-to-cart-block .qty-status-block a[href*="quote_request/quote_request/add_to_quote"],
.add-to-cart-block .qty-status-block .quote-request-buttons {
    display: none !important;
}

img.quote-request-add-icon {
    vertical-align: -0.125em;
    object-fit: contain;
    flex-shrink: 0;
}

.quote-request-heading-icon {
    vertical-align: middle;
    object-fit: contain;
}

/* Fixed quote-list shortcut (bottom-right). FAB icon: same asset as PHP templateResource('/image/quote.png'). */
.quote-request-float-fab__icon {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    background: url('../image/quote.png') center / contain no-repeat;
    /* Line-art PNG reads clearly on green pill
    filter: brightness(0) invert(1); */
}

.quote-request-float-fab {
    gap: 0.35rem;
    position: fixed;
    right: 5px;
    /* Theme `#gotop` is fixed at bottom:2px and height:58px (see storefront/view/default/css/style.css).
       Push FAB above it to avoid overlap. */
    bottom: calc(max(1.25rem, env(safe-area-inset-bottom, 0px)) + 70px);
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 3.35rem;
    height: 3.35rem;
    padding: 0 0.65rem;
    border-radius: 999px;
    background-color: var(--bs-success, #198754);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

/* Novator theme uses `.go-top` (bottom:50px; right:50px). If the browser supports `:has()`,
   align FAB to that so it looks consistent across both themes. */
@supports selector(body:has(*)) {
    body:has(.go-top) .quote-request-float-fab {
        right: 50px;
        bottom: calc(max(1.25rem, env(safe-area-inset-bottom, 0px)) + 110px);
    }
}

.quote-request-float-fab:hover,
.quote-request-float-fab:focus-visible {
    /* Keep admin-set text color; do not force white */
    transform: scale(1.06);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
    outline: none;
}

.quote-request-float-fab__label {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: lowercase;
}

/* After AJAX add-to-quote: jQuery .hide() loses to Bootstrap .d-flex; force-hide the add row */
.quote-request-add-to-quote-hidden {
    display: none !important;
}

.quote-request-float-fab__badge {
    position: absolute;
    top: -0.2rem;
    right: -0.2rem;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.4rem;
    text-align: center;
    border-radius: 999px;
    background: #ffc107;
    color: #212529;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
