/* Admin-only: shrink the box to the price content (not the full-width block) so the
   injected Quote button hugs the price instead of stretching to the row's edge. */
body[data-admin-user="1"] .js-quick-quote { display: inline-block; }

/* Popover styled to match the storefront (Bootstrap 5 tokens, Inter, flat light panel
   like .dropdown-menu / .product-item). Uses the site's CSS variables so it inherits
   the active light/dark theme, with fallbacks if a var is absent. */
.quick-quote {
    position: absolute;
    z-index: 2100;
    min-width: 232px;
    max-width: 380px;
    background: var(--body-bg, #fff);
    color: var(--body-color, #222);
    border: 1px solid var(--border-color-translucent, rgba(0, 0, 0, 0.175));
    border-radius: var(--border-radius, 0.375rem);
    box-shadow: var(--box-shadow, 0 0.5rem 1rem rgba(0, 0, 0, 0.15));
    font-family: var(--body-font-family, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    font-size: 0.8125rem;
    line-height: 1.5;
    overflow: hidden;
}

/* Flush header bar, mirrors .product-info-title */
.qq-title {
    padding: 0.45rem 0.75rem;
    background: rgba(var(--emphasis-color-rgb, 34, 34, 34), 0.05);
    border-bottom: 1px solid var(--border-color-translucent, rgba(0, 0, 0, 0.1));
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0.7;
}

.qq-table { width: 100%; border-collapse: collapse; }
.qq-table td { padding: 0.3rem 0.75rem; vertical-align: baseline; }
.qq-table tr:first-child td { padding-top: 0.55rem; }
.qq-table td:last-child {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* "unit × qty" sub-label, mirrors .product-price-per */
.qq-calc {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #57b108;
    font-weight: 600;
}

/* Padding matches .qq-money so input rows are all the same height. */
.qq-qty {
    width: 3.5rem;
    text-align: right;
    font: inherit;
    font-variant-numeric: tabular-nums;
    padding: 0 0.35rem;
    border: 1px solid var(--border-color-translucent, rgba(0, 0, 0, 0.2));
    border-radius: var(--border-radius-sm, 0.25rem);
}

/* Total row — emphasized in the site's price colour (matches .product-price-total) */
.qq-total td {
    border-top: 1px solid var(--border-color-translucent, rgba(0, 0, 0, 0.15));
    padding-top: 0.5rem;
    padding-bottom: 0.6rem;
    font-weight: 700;
}
.qq-total td:last-child { color: var(--danger, #dc3545); }

.qq-note { padding: 0.6rem 0.75rem; opacity: 0.7; }

.qq-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    margin-left: 0.4rem;
    padding: 0.12rem 0.55rem;
    border: 1px solid var(--border-color-translucent, rgba(0, 0, 0, 0.2));
    border-radius: 999px;
    background: rgba(var(--emphasis-color-rgb, 34, 34, 34), 0.06);
    color: var(--body-color, #222);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    /* Baseline (not middle) lines it up with the small .product-price-per label
       instead of centering against the large price digits next to it. */
    vertical-align: baseline;
    white-space: nowrap;
}
.qq-icon:hover {
    background: rgba(var(--emphasis-color-rgb, 34, 34, 34), 0.12);
    border-color: rgba(var(--emphasis-color-rgb, 34, 34, 34), 0.35);
}
.qq-icon-glyph { font-size: 0.85rem; line-height: 1; }
.quick-quote .qq-title { display: flex; align-items: center; justify-content: space-between; }
.qq-close { border: 0; background: transparent; font-size: 1.1rem; line-height: 1; cursor: pointer; color: inherit; opacity: 0.7; padding: 0 0.15rem; }
.qq-close:hover { opacity: 1; }
/* Editable dollar field. The border lives on the wrapper so the "$" sits inside it and
   typed amounts line up with the computed ones in the right-hand column. */
.qq-money {
    display: inline-flex;
    align-items: baseline;
    gap: 0.1rem;
    padding: 0 0.35rem;
    border: 1px solid var(--border-color-translucent, rgba(0, 0, 0, 0.175));
    border-radius: var(--border-radius-sm, 0.25rem);
    background: var(--body-bg, #fff);
}
.qq-money:focus-within { border-color: rgba(var(--emphasis-color-rgb, 34, 34, 34), 0.45); }
/* Left-aligned, so the digits sit against the "$" and read as one value. Right-aligning
   them inside a fixed-width box opened a trench between the two on short amounts. */
.qq-money input {
    width: 3.5rem;
    border: 0;
    padding: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    font-variant-numeric: tabular-nums;
}
.qq-money input:focus { outline: none; }

/* No spinners on the dollar fields — nobody nudges a labor rate a cent at a time.
   Tire qty keeps its spinner, where stepping by one is exactly what you want. */
.qq-labor::-webkit-outer-spin-button, .qq-labor::-webkit-inner-spin-button,
.qq-fees::-webkit-outer-spin-button, .qq-fees::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qq-labor, .qq-fees { -moz-appearance: textfield; appearance: textfield; }
.qq-table label { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0; cursor: pointer; }
.qq-table input[type="checkbox"] { margin: 0; }
.qq-off { opacity: 0.4; text-decoration: line-through; }
.qq-off input[type="checkbox"] { text-decoration: none; }
