﻿/* ============================================================================
   Package editor dialog
   ----------------------------------------------------------------------------
   Package overview, field grids, preview, option groups, transfer workspace,
   editor tables, custom controls, hover states, and responsive layouts.

   Source: Pasted text (3)(1).txt
   ============================================================================ */

.store-package-editor-dialog {
    width: min(88rem, calc(100vw - 2rem));
    max-width: 88rem;
}

    .store-package-editor-dialog .mud-dialog-content {
        max-height: calc(100dvh - 7.5rem);
        padding: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .store-package-editor-dialog .store-package-editor-loading {
        display: grid;
        place-items: center;
        align-content: center;
        gap: 0.75rem;
        min-height: 18rem;
        padding: 2rem;
        color: var(--store-text-secondary);
    }

    .store-package-editor-dialog .store-package-editor-content, .store-package-editor-dialog .store-package-editor-primary {
        display: grid;
        gap: 1.5rem;
        min-width: 0;
    }

    .store-package-editor-dialog .store-package-editor-overview {
        display: grid;
        grid-template-columns: minmax(0, 1.65fr) minmax(17rem, 0.65fr);
        align-items: start;
        gap: 1.5rem;
        min-width: 0;
    }

    .store-package-editor-dialog .store-package-editor-field-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        min-width: 0;
    }

    .store-package-editor-dialog .store-package-editor-field-full {
        grid-column: 1 / -1;
    }

    .store-package-editor-dialog .store-package-editor-subsection, .store-package-editor-dialog .store-package-editor-section {
        padding-top: 1.5rem;
        border-top: 1px solid var(--store-divider);
    }

    .store-package-editor-dialog .store-package-editor-note {
        display: flex;
        align-items: flex-start;
        gap: 0.55rem;
        padding: 0.7rem 0.85rem;
        color: var(--store-text-secondary);
        background: color-mix(in srgb, var(--store-main-color) 6%, var(--store-white));
        border-radius: 0.65rem;
    }

    .store-package-editor-dialog .store-package-editor-graphic-controls {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 0.75rem;
        min-width: 0;
    }

    .store-package-editor-dialog .store-package-editor-preview {
        position: sticky;
        top: 1rem;
        min-width: 0;
        overflow: hidden;
        background: var(--store-white);
        border: 1px solid var(--store-border);
        border-radius: var(--store-radius-sm);
    }

    .store-package-editor-dialog .store-package-editor-preview-header {
        padding: 0.9rem 1rem;
        border-bottom: 1px solid var(--store-border);
    }

    .store-package-editor-dialog .store-package-editor-preview-title, .store-package-editor-dialog .store-package-editor-custom-title, .store-package-editor-dialog .store-package-editor-list-title {
        margin: 0;
        color: var(--store-text-main);
        font-size: 0.95rem;
        font-weight: 800;
        line-height: 1.35;
    }

    .store-package-editor-dialog .store-package-editor-preview-description, .store-package-editor-dialog .store-package-editor-list-description {
        display: block;
        margin-top: 0.2rem;
        color: var(--store-text-muted);
        font-size: 0.78rem;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    .store-package-editor-dialog .store-package-editor-preview-frame {
        display: grid;
        place-items: center;
        min-height: 19rem;
        padding: 1rem;
        background: var(--store-surface-subtle);
    }

    .store-package-editor-dialog .store-package-editor-preview-image {
        display: block;
        width: auto;
        max-width: 100%;
        height: auto;
        max-height: 24rem;
        object-fit: contain;
    }

    .store-package-editor-dialog .store-package-editor-preview-empty {
        display: grid;
        place-items: center;
        gap: 0.5rem;
        max-width: 15rem;
        color: var(--store-text-muted);
        text-align: center;
    }

    .store-package-editor-dialog .store-package-editor-option-groups {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: start;
        gap: 1rem;
        min-width: 0;
    }

    .store-package-editor-dialog .store-package-editor-option-group {
        min-width: 0;
        margin: 0;
        padding: 0.9rem 1rem 1rem;
        background: var(--store-surface-subtle);
        border: 1px solid var(--store-border);
        border-radius: var(--store-radius-sm);
    }

        .store-package-editor-dialog .store-package-editor-option-group legend {
            padding: 0 0.35rem;
            color: var(--store-text-main);
            font-size: 0.85rem;
            font-weight: 800;
        }

    .store-package-editor-dialog .store-package-editor-option-grid {
        display: grid;
        gap: 0.25rem;
        min-width: 0;
    }

    .store-package-editor-dialog .store-package-editor-byo-option {
        min-width: 0;
    }

    .store-package-editor-dialog .store-package-editor-byo-quantity {
        margin: 0.25rem 0 0 2.5rem;
        width: min(12rem, calc(100% - 2.5rem));
    }

    .store-package-editor-dialog .store-package-editor-custom-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1rem;
        min-width: 0;
    }

    .store-package-editor-dialog .store-package-editor-custom-card {
        display: grid;
        align-content: start;
        gap: 0.85rem;
        min-width: 0;
        padding: 1rem;
        background: var(--store-surface-subtle);
        border: 1px solid var(--store-border);
        border-radius: var(--store-radius-sm);
    }

    .store-package-editor-dialog .store-package-editor-transfer-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        min-width: 0;
    }

    .store-package-editor-dialog .store-package-editor-list-panel {
        min-width: 0;
        overflow: hidden;
        background: var(--store-white);
        border: 1px solid var(--store-border);
        border-radius: var(--store-radius-sm);
    }

    .store-package-editor-dialog .store-package-editor-list-header {
        min-height: 4.5rem;
        padding: 0.85rem 1rem;
        border-bottom: 1px solid var(--store-border);
    }

    .store-package-editor-dialog .store-package-editor-table {
        min-width: 0;
    }

    .store-package-editor-dialog .store-package-editor-table-full {
        margin-top: 1rem;
        border: 1px solid var(--store-border);
        border-radius: var(--store-radius-sm);
        overflow: hidden;
    }

    .store-package-editor-dialog .store-package-editor-table .mud-table-head .mud-table-cell {
        color: var(--store-text-secondary);
        font-size: 0.75rem;
        font-weight: 800;
        background: var(--store-surface-subtle);
        border-bottom-color: var(--store-border);
    }

    .store-package-editor-dialog .store-package-editor-table .mud-table-cell {
        vertical-align: middle;
    }

    .store-package-editor-dialog .store-package-editor-table-action {
        width: 7rem;
        text-align: right;
        white-space: nowrap;
    }

    .store-package-editor-dialog .store-package-editor-row-action {
        min-width: 0;
        min-height: 2.25rem;
        padding: 0.35rem 0.6rem;
        border-radius: 0.6rem;
        font-weight: 750;
        text-transform: none;
    }

    .store-package-editor-dialog .store-package-editor-empty {
        padding: 1.5rem 1rem;
        color: var(--store-text-muted);
        text-align: center;
    }

    .store-package-editor-dialog .store-package-editor-type-form {
        display: grid;
        grid-template-columns: minmax(9rem, 1fr) minmax(12rem, 1.35fr) auto minmax(8rem, 0.8fr) minmax(8rem, 0.75fr) auto;
        align-items: start;
        gap: 0.75rem;
        min-width: 0;
    }

    .store-package-editor-dialog .store-package-editor-size-form, .store-package-editor-dialog .store-package-editor-side-form {
        display: grid;
        grid-template-columns: minmax(8rem, 0.75fr) minmax(8rem, 1fr) minmax(8rem, 0.75fr) auto;
        align-items: start;
        gap: 0.75rem;
        min-width: 0;
    }

    .store-package-editor-dialog .store-package-editor-quick-sizes {
        display: grid;
        gap: 0.75rem;
        margin-top: 1rem;
        padding: 0.85rem 1rem;
        background: var(--store-surface-subtle);
        border-radius: var(--store-radius-sm);
    }

    .store-package-editor-dialog .store-package-editor-quick-size-group {
        display: grid;
        grid-template-columns: 3.5rem minmax(0, 1fr);
        align-items: start;
        gap: 0.75rem;
        min-width: 0;
    }

    .store-package-editor-dialog .store-package-editor-quick-size-label {
        padding-top: 0.35rem;
        color: var(--store-text-secondary);
        font-weight: 800;
    }

    .store-package-editor-dialog .store-package-editor-chip-row {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
        min-width: 0;
    }

@media (hover: hover) and (pointer: fine) {
    .store-package-editor-dialog .store-package-editor-row-action:hover:not(:disabled) {
        background: var(--store-danger-soft);
    }
}

@media screen and (max-width: 1199.98px) {
    .store-package-editor-dialog .store-package-editor-option-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .store-package-editor-dialog .store-package-editor-custom-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .store-package-editor-dialog .store-package-editor-type-form {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto;
    }
}

@media screen and (max-width: 600px) {
    .store-package-editor-dialog .store-package-editor-field-grid, .store-package-editor-dialog .store-package-editor-graphic-controls, .store-package-editor-dialog .store-package-editor-type-form, .store-package-editor-dialog .store-package-editor-size-form, .store-package-editor-dialog .store-package-editor-side-form, .store-package-editor-dialog .store-package-editor-custom-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .store-package-editor-dialog .store-package-editor-field-full {
        grid-column: auto;
    }

    .store-package-editor-dialog .store-package-editor-preview-frame {
        min-height: 14rem;
    }

    .store-package-editor-dialog .store-package-editor-quick-size-group {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.25rem;
    }
}

@media screen and (max-width: 899.98px) {
    .store-package-editor-dialog .store-package-editor-overview, .store-package-editor-dialog .store-package-editor-option-groups, .store-package-editor-dialog .store-package-editor-transfer-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .store-package-editor-dialog .store-package-editor-preview {
        position: static;
    }

    .store-package-editor-dialog .store-package-editor-type-form, .store-package-editor-dialog .store-package-editor-size-form, .store-package-editor-dialog .store-package-editor-side-form {
        grid-template-columns: minmax(0, 1fr);
    }
}
