/**
 * Quick Order Grid — Volume pricing popover — core 1.0.0
 *
 * The tag icon in the price cell and the shared popover, ported from the Shopify app
 * (quick-order.css, "B2B volume pricing") and the design system file behind it. Every colour
 * and radius is a CSS variable with the design-system value as its fallback, so a platform
 * that themes the grid (Magento's custom styling) sets the variables and inherits the layout.
 *
 * The platform owns the price line itself (.qog-price-line and friends) — only .qog-vp-* is
 * shared. Alignment uses logical properties so the popover reads correctly under dir="rtl".
 */

.qog-vp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    /* Native <button> reset */
    border: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
    color: var(--qog-vp-muted, #8a8a8a);
    cursor: help;
    border-radius: 4px;
    outline: none;
    /* WCAG 2.5.8 target size: at least 24x24 CSS px. The negative block margin keeps the row
       height unchanged while the hit area stays a full 24px square. */
    min-width: 24px;
    min-height: 24px;
    padding: 0;
    margin: -4px 0;
    touch-action: manipulation;
}

.qog-vp-icon.qog-vp-active,
.qog-vp-icon:hover {
    color: var(--qog-vp-accent, #005bd3);
}

.qog-vp-icon:focus-visible {
    box-shadow: 0 0 0 2px var(--qog-vp-focus, rgba(0, 91, 211, 0.4));
}

/* One element on <body>, position: fixed — AG Grid cells clip, and thousands of nodes would
   not be free. The JS moves it and flips it below the icon when there is no room above. */
.qog-vp-pop {
    position: fixed;
    z-index: 2147483000;
    box-sizing: border-box;
    width: 268px;
    max-width: calc(100vw - 16px);
    background: var(--qog-vp-bg, #fff);
    border: 1px solid var(--qog-vp-border, #e3e3e3);
    border-radius: var(--qog-vp-radius, 10px);
    box-shadow: 0 8px 28px rgba(26, 26, 26, 0.2);
    padding: 12px;
    text-align: start;
    font-weight: 400;
    color: var(--qog-vp-text, #303030);
    cursor: default;
}

.qog-vp-pop--dual {
    width: 340px;
}

.qog-vp-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--qog-vp-text, #303030);
    line-height: 1.3;
}

.qog-vp-sub {
    font-size: 11px;
    color: var(--qog-vp-muted, #8a8a8a);
    margin-bottom: 9px;
    line-height: 1.3;
}

.qog-vp-grid {
    display: grid;
    grid-template-columns: 1fr 84px 42px;
    gap: 0 8px;
    align-items: center;
}

.qog-vp-grid--dual {
    grid-template-columns: 1fr 84px 84px 42px;
}

.qog-vp-grid .r {
    text-align: end;
    font-variant-numeric: tabular-nums;
}

.qog-vp-head {
    padding: 0 0 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--qog-vp-muted, #8a8a8a);
    border-bottom: 1px solid var(--qog-vp-border, #e3e3e3);
}

.qog-vp-base {
    padding: 6px 0;
    font-size: 11px;
    color: var(--qog-vp-base-text, #616161);
    border-bottom: 1px solid var(--qog-vp-border-soft, #f1f1f1);
}

.qog-vp-base .qog-vp-dash {
    color: var(--qog-vp-dash, #b5b5b5);
}

.qog-vp-row {
    margin: 0 -6px;
    padding: 6px;
    border-radius: 6px;
    font-size: 11px;
    color: var(--qog-vp-text, #303030);
    font-weight: 500;
}

.qog-vp-row.qog-vp-active-row {
    background: var(--qog-vp-active-bg, #ebf1ff);
    color: var(--qog-vp-active-text, #00369b);
    font-weight: 700;
}
