/* OnSale: page-owned composition; widget behavior remains with Bootstrap/Kendo. */
.onsale-page { min-width: 0; }
.onsale-page > .card { margin: 0; }
.onsale-page .card-body { padding: 24px; }
.onsale-section + .onsale-section { border-top: 1px solid var(--mkp-border); margin-top: 8px; padding-top: 24px; }
.onsale-section h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; letter-spacing: -.015em; }
.onsale-help { margin: 0 0 20px; color: var(--mkp-muted-foreground); line-height: 1.5; }
.onsale-section .row { --bs-gutter-x: 24px; }
.onsale-form .k-datepicker, .onsale-form .k-numerictextbox { width: 100%; }
.onsale-product-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.onsale-page .table-responsive, #productModal .table-responsive { overflow: visible; min-width: 0; }
/* Codes are identifiers, never prose: preserve every character on one line. */
#gridProducts td.onsale-code, #gridProductsSearch td.onsale-code { white-space: nowrap; overflow-wrap: normal; font-variant-numeric: tabular-nums; }
#gridProducts .k-column-title, #gridProductsSearch .k-column-title { white-space: nowrap; overflow-wrap: normal; }
#productModal .onsale-search-filters > .col-md { flex: 1 1 170px; min-width: 0; }
#productModal .onsale-search-filters > .col-md:has(#productName) { flex-basis: 210px; }
#productModal .onsale-search-filters .form-label { display: block; }
#productModal .onsale-help { margin-bottom: 16px; }
#productModal .modal-body { min-width: 0; }
@media (max-width: 767.98px) {
    .onsale-page .card-body { padding: 16px; }
    .onsale-section + .onsale-section { padding-top: 20px; }
    #productModal .onsale-search-filters > .col-md { flex-basis: calc(50% - 16px); }
    #productModal .onsale-search-filters > .col-md:has(#productName) { flex-basis: calc(100% - 64px); }
    #productModal .onsale-search-filters > .col-md-auto { width: auto; }
}

#productModal .onsale-search-hint { padding: 16px; margin: 0 0 16px; border: 1px dashed var(--mkp-border); border-radius: var(--mkp-radius); color: var(--mkp-muted-foreground); background: var(--mkp-muted); }
#productModal #gridProductsSearch.onsale-search-pending { height: 180px !important; }

/* Preserve the form sections, leaving more room for reviewing products. */
.onsale-section > h2 + .row { margin-top: 16px; }
.onsale-products > .table-responsive { margin-inline: -24px; }
.onsale-products > .table-responsive > .k-grid { border-inline: 0; border-radius: 0; }

/* Readable headings and quiet row actions, scoped to this module. */
.onsale-page .k-grid .k-grid-header th.k-header {
    color: var(--mkp-foreground);
    font-size: 14px;
    font-weight: 500;
    background: var(--mkp-muted);
}
.onsale-page .k-grid .k-grid-header th.k-header .k-column-title { color: var(--mkp-foreground); }
.onsale-grid .k-grid { --mkp-grid-cell-y: 9px; }
.onsale-grid td .btn-group { gap: 4px; }
.onsale-grid td .btn-group .btn {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    border-radius: var(--mkp-radius-sm);
}
.onsale-grid td .btn-group .btn:hover,
.onsale-grid td .btn-group .btn:focus-visible { background: var(--mkp-muted); border-color: var(--mkp-border); }
.onsale-grid td .badge[data-value] { display: inline-flex; align-items: center; gap: 6px; }
.onsale-grid td .badge[data-value]::before { font-family: FontAwesome; font-size: 13px; }
.onsale-grid td .badge[data-value="0"]::before { content: "\f017"; }
.onsale-grid td .badge[data-value="1"]::before { content: "\f058"; }
.onsale-grid td .badge[data-value="2"]::before { content: "\f04c"; }
.onsale-list-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.onsale-filter-label { font-weight: 500; margin-right: 8px; }
.onsale-list-toolbar .btn { border-style: dashed; gap: 6px; }
@media (max-width: 767.98px) {
    .onsale-products > .table-responsive { margin-inline: -16px; }
    .onsale-filter-label { flex-basis: 100%; }
}
