﻿/* ============================================================================
   Pricesheet editor dialog
   ----------------------------------------------------------------------------
   Pricesheet details, assignment workspace, sortable package rows, package
   metadata, actions, loading/empty states, and responsive layouts.

   Source: Pasted text (3)(1).txt
   ============================================================================ */

.store-pricesheet-editor-dialog {
    width: min(92rem, calc(100vw - 2rem));
    max-width: 92rem;
    max-height: calc(100dvh - 1rem);
}

    .store-pricesheet-editor-dialog .mud-dialog-content {
        max-height: calc(100dvh - 7.5rem);
        padding: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
    }

    .store-pricesheet-editor-dialog .mud-dialog-actions {
        position: relative;
        z-index: 2;
        flex: 0 0 auto;
        background: var(--store-white);
        border-top: 1px solid var(--store-border);
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-content {
        padding: clamp(1rem, 2vw, 1.5rem);
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-layout {
        display: grid;
        gap: 1.5rem;
        min-width: 0;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-details {
        width: min(100%, 52rem);
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-field-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        min-width: 0;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-assignment {
        min-width: 0;
        padding-top: 1.4rem;
        border-top: 1px solid var(--store-divider);
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-assignment-heading {
        margin-bottom: 0.85rem;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-sorting-note {
        display: flex;
        align-items: flex-start;
        gap: 0.6rem;
        margin-bottom: 1rem;
        padding: 0.75rem 0.85rem;
        color: var(--store-text-secondary);
        background: color-mix(in srgb, var(--store-main-color) 6%, var(--store-white));
        border-left: 3px solid var(--store-main-color);
        border-radius: 0.2rem var(--store-radius-sm) var(--store-radius-sm) 0.2rem;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-note-icon {
        flex: 0 0 auto;
        margin-top: 0.1rem;
        color: var(--store-main-color);
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-note-text {
        margin: 0;
        font-size: 0.82rem;
        line-height: 1.45;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-loading {
        margin-bottom: 0.75rem;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-drop-container {
        min-width: 0;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-workspace {
        display: grid;
        grid-template-columns: minmax(18rem, 0.85fr) minmax(26rem, 1.45fr);
        align-items: stretch;
        gap: 1rem;
        min-width: 0;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-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-pricesheet-editor-dialog .store-pricesheet-editor-panel-header {
        min-height: 4.6rem;
        padding: 0.85rem 1rem;
        background: var(--store-surface-subtle);
        border-bottom: 1px solid var(--store-border);
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-panel-title {
        margin: 0;
        color: var(--store-text-main);
        font-size: 0.94rem;
        font-weight: 800;
        line-height: 1.35;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-panel-description {
        display: block;
        margin-top: 0.15rem;
        color: var(--store-text-muted);
        font-size: 0.76rem;
        line-height: 1.4;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-search {
        padding: 0.7rem 0.85rem;
        border-bottom: 1px solid var(--store-divider);
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-dropzone {
        flex: 1 1 auto;
        min-height: min(15rem, 30vh);
        max-height: min(38vh, 26rem);
        padding: 0.4rem;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--store-white);
        scrollbar-gutter: stable;
        transition: background-color 160ms ease, box-shadow 160ms ease;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-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-pricesheet-editor-dialog .store-pricesheet-editor-dropzone-no-drop {
        background: var(--store-surface-subtle);
        box-shadow: inset 0 0 0 2px var(--store-border);
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-drop-row {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
        gap: 0.65rem;
        min-width: 0;
        margin: 0.35rem;
        padding: 0.7rem;
        color: var(--store-text-main);
        background: var(--store-white);
        border: 1px solid var(--store-divider);
        border-radius: 0.65rem;
        cursor: grab;
        transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
    }

        .store-pricesheet-editor-dialog .store-pricesheet-editor-drop-row:active {
            cursor: grabbing;
        }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-drop-row-selected {
        padding: 0.8rem;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-drag-indicator {
        margin-top: 0.15rem;
        color: var(--store-text-muted);
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-drop-content, .store-pricesheet-editor-dialog .store-pricesheet-editor-drop-copy {
        min-width: 0;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-package-heading {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.75rem;
        min-width: 0;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-drop-name, .store-pricesheet-editor-dialog .store-pricesheet-editor-drop-external-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-drop-name {
        color: var(--store-text-main);
        font-weight: 750;
        line-height: 1.35;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-drop-external-name {
        display: block;
        margin-top: 0.1rem;
        color: var(--store-text-muted);
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-drop-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.25rem;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-row-action {
        min-width: 0;
        min-height: 2.15rem;
        padding: 0.35rem 0.6rem;
        border-radius: 0.6rem;
        font-size: 0.75rem;
        font-weight: 750;
        line-height: 1.2;
        text-transform: none;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-add {
        background: color-mix(in srgb, var(--store-main-color) 8%, transparent);
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-edit {
        background: color-mix(in srgb, var(--store-info, #0288d1) 8%, transparent);
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-remove {
        background: var(--store-danger-soft);
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-package-details {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem 0.75rem;
        margin-top: 0.65rem;
        padding-top: 0.65rem;
        border-top: 1px solid var(--store-divider);
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-package-detail {
        min-width: 0;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-detail-label {
        display: block;
        color: var(--store-text-muted);
        font-size: 0.66rem;
        font-weight: 750;
        line-height: 1.25;
        text-transform: uppercase;
        letter-spacing: 0.035em;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-detail-value {
        display: block;
        margin-top: 0.1rem;
        overflow: hidden;
        color: var(--store-text-secondary);
        font-size: 0.75rem;
        font-weight: 650;
        line-height: 1.35;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-price {
        color: var(--store-text-main);
        font-weight: 800;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-statuses {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
        margin-top: 0.6rem;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-empty {
        display: grid;
        place-items: center;
        gap: 0.4rem;
        min-height: 7rem;
        padding: 1.5rem 1rem;
        color: var(--store-text-muted);
        text-align: center;
        white-space: normal;
    }

@media (hover: hover) and (pointer: fine) {
    .store-pricesheet-editor-dialog .store-pricesheet-editor-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-pricesheet-editor-dialog .store-pricesheet-editor-add:hover:not(:disabled) {
        background: color-mix(in srgb, var(--store-main-color) 15%, transparent);
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-edit:hover:not(:disabled) {
        background: color-mix(in srgb, var(--store-info, #0288d1) 14%, transparent);
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-remove:hover:not(:disabled) {
        background: color-mix(in srgb, var(--store-danger) 14%, transparent);
    }
}

@media screen and (max-width: 1199.98px) {
    .store-pricesheet-editor-dialog .store-pricesheet-editor-workspace {
        grid-template-columns: minmax(17rem, 0.8fr) minmax(24rem, 1.2fr);
    }
}

@media screen and (max-width: 899.98px) {
    .store-pricesheet-editor-dialog .store-pricesheet-editor-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-available, .store-pricesheet-editor-dialog .store-pricesheet-editor-selected {
        min-width: 0;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-dropzone {
        min-height: 14rem;
        max-height: min(22rem, 40vh);
    }
}

@media screen and (max-width: 600px) {
    .store-pricesheet-editor-dialog .store-pricesheet-editor-field-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-content {
        padding: 1rem;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-sorting-note {
        padding: 0.7rem;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-package-heading {
        flex-direction: column;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-drop-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .store-pricesheet-editor-dialog .store-pricesheet-editor-package-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
