/* Scalable catalogue maintenance: dense lists stay visible while editors open on demand. */
.catalogue-list-card > .muted-copy {
    margin: 0;
    padding: .7rem .85rem;
    border-bottom: 1px solid var(--epos-border);
    font-size: .85rem;
    line-height: 1.45;
}

/* The filter strip's field proportions; the strip rhythm itself is `.admin-toolbar.admin-toolbar-strip`. */
.catalogue-filter-bar {
    display: grid;
    grid-template-columns: minmax(14rem, 1.8fr) repeat(4, minmax(8rem, 1fr)) minmax(4.8rem, .55fr) auto;
}

.catalogue-filter-bar.compact-filter-bar {
    grid-template-columns: minmax(16rem, 1fr) minmax(9rem, 12rem) auto;
}

.catalogue-search-input {
    position: relative;
    min-width: 0;
}

.catalogue-search-input > .epos-icon {
    position: absolute;
    top: 50%;
    left: .72rem;
    z-index: 1;
    width: 1rem;
    height: 1rem;
    color: var(--epos-ink-slate);
    transform: translateY(-50%);
    pointer-events: none;
}

.admin-content .catalogue-search-input input {
    padding-left: 2.2rem;
    padding-right: 2.35rem;
}

.catalogue-search-input input[type="search"]::-webkit-search-cancel-button {
    display: none;
    appearance: none;
}

.catalogue-search-input button {
    position: absolute;
    top: 50%;
    right: 0;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: var(--epos-radius-control);
    background: transparent;
    color: var(--epos-ink-slate);
    transform: translateY(-50%);
}

.catalogue-search-input button:hover {
    background: var(--color-muted);
    color: var(--epos-primary-strong);
}

.catalogue-search-input button .epos-icon {
    width: .92rem;
    height: .92rem;
}

.catalogue-clear-filters {
    min-width: 5.2rem;
}

.admin-content .catalogue-data-table {
    min-width: 48rem;
    table-layout: fixed;
}

/* Fits the 1366 content column (till and Cloud, about 67rem); narrower columns scroll inside `.table-wrap`. */
.admin-content .product-management-table {
    min-width: 60rem;
}

.catalogue-data-table tbody tr {
    min-height: 56px;
}

.catalogue-data-table .inactive-row {
    background: var(--epos-surface-tint);
    color: var(--epos-ink-faint);
}

.catalogue-data-table .inactive-row .colour-chip,
.catalogue-data-table .inactive-row .catalogue-product-identity,
.catalogue-data-table .inactive-row .catalogue-secondary-value {
    opacity: .68;
}

.product-management-table th:nth-child(1) { width: 17%; }
.product-management-table th:nth-child(2) { width: 12%; }
.product-management-table th:nth-child(3) { width: 12%; }
.product-management-table th:nth-child(4) { width: 9%; }
.product-management-table th:nth-child(5) { width: 13%; }
.product-management-table th:nth-child(6) { width: 7%; }
.product-management-table th:nth-child(7) { width: 12%; }
.product-management-table th:nth-child(8) { width: 12rem; }

.catalogue-product-identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .55rem;
}

.catalogue-product-identity strong,
.catalogue-product-identity small,
.catalogue-data-table td > strong,
.catalogue-data-table td > small {
    display: block;
}

.catalogue-product-identity small,
.catalogue-secondary-value,
.catalogue-data-table td > small {
    color: var(--epos-muted);
    font-size: .73rem;
}

.colour-chip {
    display: inline-block;
    width: .52rem;
    height: 2rem;
    border: 1px solid rgba(9, 42, 57, .12);
    border-radius: var(--epos-radius-control);
    vertical-align: -0.12rem;
    flex: 0 0 auto;
}

.catalogue-truncated-list {
    display: block;
    max-width: 100%;
}

.catalogue-price {
    font-variant-numeric: tabular-nums;
}

.catalogue-code-pair {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .1rem .35rem;
    align-items: baseline;
}

.catalogue-code-pair small {
    color: var(--epos-muted);
    font-size: .64rem;
    font-weight: 650;
    text-transform: uppercase;
}

.catalogue-code-pair b {
    overflow: hidden;
    font-size: .72rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalogue-status-stack {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
}

/* Equal widths keep Edit in one column whichever of Enable / Disable follows it. */
.admin-content .catalogue-row-actions .button {
    min-width: 4.75rem;
    margin-left: .28rem;
    padding: .35rem .55rem;
}

.admin-content .catalogue-pagination .button {
    padding: .35rem .6rem;
}

.catalogue-editor-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1250;
    display: flex;
    justify-content: flex-end;
    background: rgba(9, 31, 42, .42);
}

.catalogue-editor-panel {
    display: grid;
    width: min(47.5rem, calc(100vw - 5.75rem));
    max-width: 100%;
    height: 100dvh;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border-left: 1px solid var(--epos-scrollbar-thumb);
    background: var(--epos-surface-tint);
    box-shadow: -12px 0 35px rgba(9, 31, 42, .2);
    opacity: 1;
    transform: translateX(0);
    transition: opacity 180ms var(--epos-ease-out), transform 180ms var(--epos-ease-out);
}

.catalogue-editor-panel.compact-editor-panel {
    width: min(36rem, calc(100vw - 5.75rem));
}

.catalogue-editor-header,
.catalogue-editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem .9rem;
    background: var(--epos-surface);
}

.catalogue-editor-header {
    min-height: 72px;
    border-bottom: 1px solid var(--epos-border);
}

.catalogue-editor-header h2,
.catalogue-editor-header p {
    margin: 0;
}

.catalogue-editor-header h2 {
    margin-top: .08rem;
    font-size: 1.28rem;
}

.catalogue-editor-header .icon-button {
    display: grid;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--epos-border);
    border-radius: var(--epos-radius-control);
    background: var(--epos-surface);
    color: var(--epos-navy);
}

.catalogue-editor-header .icon-button:hover {
    border-color: var(--epos-border-strong);
    background: var(--epos-cyan-wash);
    color: var(--epos-primary-strong);
}

.catalogue-editor-body {
    display: grid;
    align-content: start;
    gap: .7rem;
    min-height: 0;
    padding: .75rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.catalogue-editor-body .field label {
    color: var(--epos-ink-deep);
    font-size: .78rem;
}

.catalogue-editor-body .form-grid {
    gap: .7rem;
}

.catalogue-kitchen-content textarea {
    min-height: 7rem;
    line-height: 1.45;
    resize: vertical;
}

.catalogue-admin-page .platform-mapping-page { display: grid; gap: .75rem; }
.catalogue-editor-body input[type="color"] {
    width: 4rem;
    min-height: 44px;
    padding: .25rem;
    cursor: pointer;
}

.catalogue-assignment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
}

.catalogue-assignment-picker {
    display: grid;
    align-content: start;
    min-width: 0;
    gap: .45rem;
}

.catalogue-assignment-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.catalogue-assignment-heading strong {
    font-size: .8rem;
}

.catalogue-assignment-heading span {
    color: var(--epos-muted);
    font-size: .72rem;
}

.catalogue-assignment-picker > input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--epos-border);
    border-radius: var(--epos-radius-control);
    padding: .55rem .7rem;
    background: var(--epos-surface-tint);
}

.catalogue-assignment-picker .checkbox-list,
.catalogue-editor-body .card-section > .checkbox-list {
    max-height: 12rem;
    border-radius: var(--epos-radius-control);
    padding: .35rem;
}

.catalogue-assignment-picker .checkbox-row,
.catalogue-editor-body .card-section > .checkbox-list .checkbox-row {
    min-height: 38px;
    border-radius: var(--epos-radius-control);
    padding: .3rem .4rem;
}

.catalogue-assignment-picker .checkbox-row:hover,
.catalogue-editor-body .card-section > .checkbox-list .checkbox-row:hover {
    background: var(--epos-surface-sunken);
}

.catalogue-editor-footer {
    min-height: 68px;
    justify-content: flex-end;
    border-top: 1px solid var(--epos-border);
}

@starting-style {
    .catalogue-editor-panel {
        opacity: 0;
        transform: translateX(1rem);
    }
}

@media (max-width: 760px) {
    /* The mobile header has no side rail, so an editor can use the full viewport instead of retaining desktop rail space. */
    .catalogue-editor-panel,
    .catalogue-editor-panel.compact-editor-panel {
        width: 100%;
        border-left: 0;
    }

    .catalogue-editor-header,
    .catalogue-editor-footer {
        gap: .65rem;
        padding: .65rem;
    }

    .catalogue-editor-footer .button { flex: 1 1 9rem; }
    .catalogue-assignment-grid { grid-template-columns: minmax(0, 1fr); }
    .catalogue-assignment-picker .checkbox-row,
    .catalogue-editor-body .card-section > .checkbox-list .checkbox-row { min-height: 44px; }
}
