﻿/* ============================================================================
   Background pricesheet and package-plan assignment dialogs
   ----------------------------------------------------------------------------
   Transfer workspace, sorting, panels, drag/drop rows, actions, package-plan
   scrollbar behavior, hover states, and responsive stacking.

   Source: Pasted text (3)(1).txt
   ============================================================================ */

.store-background-pricesheet-dialog {
    width: min(76rem, calc(100vw - 2rem));
    max-width: 76rem;
}

    .store-background-pricesheet-dialog .store-background-pricesheet-content {
        display: grid;
        gap: 1.5rem;
        min-width: 0;
    }

    .store-background-pricesheet-dialog .store-background-pricesheet-details {
        width: min(100%, 30rem);
    }

    .store-background-pricesheet-dialog .store-background-selection {
        min-width: 0;
    }

    .store-background-pricesheet-dialog .store-background-selection-heading {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 0.9rem;
    }

    .store-background-pricesheet-dialog .store-background-selection-copy {
        min-width: 0;
    }

    .store-background-pricesheet-dialog .store-background-selection-title {
        margin: 0;
        color: var(--store-text-main);
        font-size: 1rem;
        font-weight: 800;
        line-height: 1.35;
    }

    .store-background-pricesheet-dialog .store-background-selection-description {
        display: block;
        margin-top: 0.2rem;
        color: var(--store-text-muted);
        font-size: 0.8rem;
        line-height: 1.45;
    }

    .store-background-pricesheet-dialog .store-background-sort-controls {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        flex: 0 0 auto;
    }

    .store-background-pricesheet-dialog .store-background-sort-select {
        width: 11.5rem;
        margin: 0 !important;
    }

    .store-background-pricesheet-dialog .store-background-sort-direction {
        width: 2.75rem;
        height: 2.75rem;
        border: 1px solid var(--store-border);
        border-radius: 0.7rem;
    }

    .store-background-pricesheet-dialog .store-background-transfer-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        min-width: 0;
    }

    .store-background-pricesheet-dialog .store-background-loading {
        margin-bottom: 0.75rem;
    }

    .store-background-pricesheet-dialog .store-background-drop-container {
        min-width: 0;
    }

    .store-background-pricesheet-dialog .store-background-panel {
        display: flex;
        flex-direction: column;
        min-width: 0;
        overflow: hidden;
        background: var(--store-white);
        border: 1px solid var(--store-border);
        border-radius: var(--store-radius-sm);
    }

    .store-background-pricesheet-dialog .store-background-panel-header {
        min-height: 4.65rem;
        padding: 0.9rem 1rem;
        border-bottom: 1px solid var(--store-border);
    }

    .store-background-pricesheet-dialog .store-background-panel-title {
        margin: 0;
        color: var(--store-text-main);
        font-size: 0.95rem;
        font-weight: 800;
        line-height: 1.35;
    }

    .store-background-pricesheet-dialog .store-background-panel-description {
        display: block;
        margin-top: 0.2rem;
        color: var(--store-text-muted);
        font-size: 0.78rem;
        line-height: 1.4;
    }

    .store-background-pricesheet-dialog .store-background-search {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--store-divider);
    }

    .store-background-pricesheet-dialog .store-background-dropzone {
        flex: 1 1 22rem;
        min-height: 20rem;
        max-height: min(48vh, 28rem);
        padding: 0.4rem;
        overflow: auto;
        background: var(--store-white);
        scrollbar-gutter: stable;
        transition: background-color 160ms ease, box-shadow 160ms ease;
    }

    .store-background-pricesheet-dialog .store-background-dropzone-can-drop {
        background: color-mix(in srgb, var(--store-main-color) 7%, var(--store-white));
        box-shadow: inset 0 0 0 2px var(--store-main-color);
    }

    .store-background-pricesheet-dialog .store-background-dropzone-no-drop {
        background: var(--store-surface-subtle);
        box-shadow: inset 0 0 0 2px var(--store-border);
    }

    .store-background-pricesheet-dialog .store-background-drop-row {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.65rem;
        min-width: 0;
        margin: 0.35rem;
        padding: 0.65rem 0.7rem;
        color: var(--store-text-main);
        background: var(--store-white);
        border: 1px solid var(--store-divider);
        border-radius: 0.65rem;
        box-shadow: none;
        cursor: grab;
        transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
    }

        .store-background-pricesheet-dialog .store-background-drop-row:active {
            cursor: grabbing;
        }

    .store-background-pricesheet-dialog .store-background-drag-indicator {
        color: var(--store-text-muted);
    }

    .store-background-pricesheet-dialog .store-background-drop-copy {
        min-width: 0;
    }

    .store-background-pricesheet-dialog .store-background-drop-name, .store-background-pricesheet-dialog .store-background-drop-external-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .store-background-pricesheet-dialog .store-background-drop-name {
        color: var(--store-text-main);
        font-weight: 750;
    }

    .store-background-pricesheet-dialog .store-background-drop-external-name {
        display: block;
        margin-top: 0.1rem;
        color: var(--store-text-muted);
    }

    .store-background-pricesheet-dialog .store-background-drop-action {
        display: flex;
        justify-content: flex-end;
        white-space: nowrap;
    }

    .store-background-pricesheet-dialog .store-background-row-action {
        min-width: 0;
        min-height: 2.25rem;
        padding: 0.4rem 0.65rem;
        border-radius: 0.65rem;
        font-weight: 750;
        line-height: 1.2;
        text-transform: none;
    }

    .store-background-pricesheet-dialog .store-background-add {
        background: color-mix(in srgb, var(--store-main-color) 9%, transparent);
    }

    .store-background-pricesheet-dialog .store-background-remove {
        background: var(--store-danger-soft);
    }

    .store-background-pricesheet-dialog .store-background-empty {
        display: grid;
        place-items: center;
        gap: 0.45rem;
        min-height: 9rem;
        padding: 2rem 1rem;
        color: var(--store-text-muted);
        text-align: center;
    }

@media (hover: hover) and (pointer: fine) {
    .store-background-pricesheet-dialog .store-background-drop-row:hover {
        border-color: color-mix(in srgb, var(--store-main-color) 35%, var(--store-border));
        box-shadow: var(--store-shadow-sm);
        transform: translateY(-1px);
    }

    .store-background-pricesheet-dialog .store-background-add:hover:not(:disabled) {
        background: color-mix(in srgb, var(--store-main-color) 16%, transparent);
    }

    .store-background-pricesheet-dialog .store-background-remove:hover:not(:disabled) {
        background: color-mix(in srgb, var(--store-danger) 14%, transparent);
    }
}

.store-background-pricesheet-dialog.store-package-plan-dialog .mud-dialog-content, .store-background-pricesheet-dialog.store-package-plan-dialog .store-background-dropzone {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .store-background-pricesheet-dialog.store-package-plan-dialog .mud-dialog-content::-webkit-scrollbar, .store-background-pricesheet-dialog.store-package-plan-dialog .store-background-dropzone::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

.store-background-pricesheet-dialog.store-package-plan-dialog .store-background-dropzone {
    flex-basis: auto;
    min-height: min(14rem, 28vh);
    max-height: min(32vh, 20rem);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: auto;
}

@media screen and (max-width: 600px) {
    .store-background-pricesheet-dialog .store-background-pricesheet-content {
        gap: 1.25rem;
    }

    .store-background-pricesheet-dialog .store-background-selection-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .store-background-pricesheet-dialog .store-background-sort-select {
        width: 100%;
    }

    .store-background-pricesheet-dialog .store-background-sort-controls {
        width: 100%;
    }

    .store-background-pricesheet-dialog .store-background-panel-header, .store-background-pricesheet-dialog .store-background-search {
        padding-right: 0.85rem;
        padding-left: 0.85rem;
    }

    .store-background-pricesheet-dialog .store-background-dropzone {
        min-height: 16rem;
        max-height: 20rem;
    }
}

@media screen and (max-width: 899.98px) {
    .store-background-pricesheet-dialog .store-background-transfer-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
