/* sales-invoice-grid-overlay.css
   Invoice-only visual helpers.
   Do not solve shared picker/ProductPicker positioning here.
   Picker behavior is component-owned by ProductPicker/WarehouseComponent and the Aksa overlay coordinator.
*/

/* Keep the compact discount controls beside the value on the invoice grid.
   This file is intentionally global because the invoice page already loads it
   directly, avoiding stale scoped-CSS bundles while iterating on this grid. */
.sales-document-editor .warehouse-discount-strip {
    display: grid !important;
    align-items: center !important;
    gap: .22rem !important;
    width: 100% !important;
    min-width: 0 !important;
}

.sales-document-editor .warehouse-discount-strip--has-scope {
    grid-template-columns: auto auto minmax(3.6rem, 1fr) !important;
}

.sales-document-editor .warehouse-discount-strip--no-scope,
.sales-document-editor .warehouse-discount-strip--legacy {
    grid-template-columns: auto minmax(4.2rem, 1fr) !important;
}

.sales-document-editor .warehouse-discount-segment {
    display: inline-flex !important;
    align-items: center !important;
    gap: .12rem !important;
    min-width: 0 !important;
    padding: .1rem !important;
    border: 1px solid var(--bs-border-color) !important;
    border-radius: .38rem !important;
    background: var(--bs-tertiary-bg) !important;
    white-space: nowrap !important;
}

.sales-document-editor .warehouse-discount-segment--scope {
    background: color-mix(in srgb, var(--bs-info) 7%, var(--bs-tertiary-bg)) !important;
}

.sales-document-editor .warehouse-discount-chip {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 1.35rem !important;
    min-width: 1.35rem !important;
    height: 1.28rem !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: .28rem !important;
    background: transparent !important;
    color: var(--bs-secondary-color) !important;
    font-size: .68rem !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    font-variant-numeric: tabular-nums !important;
}

.sales-document-editor .warehouse-discount-chip:hover:not(:disabled),
.sales-document-editor .warehouse-discount-chip:focus-visible {
    background: color-mix(in srgb, var(--bs-primary) 10%, transparent) !important;
    color: var(--bs-primary) !important;
}

.sales-document-editor .warehouse-discount-chip.is-active {
    background: var(--bs-primary) !important;
    color: var(--bs-primary-inverse, #fff) !important;
}

.sales-document-editor .warehouse-discount-chip:disabled {
    opacity: .45 !important;
    cursor: not-allowed !important;
}

.sales-document-editor .warehouse-discount-strip__value {
    min-width: 0 !important;
}

.sales-document-editor .warehouse-discount-strip__value .rz-numeric,
.sales-document-editor .warehouse-discount-strip__value .ak-numeric-group,
.sales-document-editor .warehouse-discount-strip__value input.rz-numeric-input {
    min-height: 1.55rem !important;
    height: 1.55rem !important;
}

.sales-document-editor .warehouse-discount-strip__value input.rz-numeric-input {
    font-size: .74rem !important;
    font-weight: 800 !important;
}
