﻿/* ============================================================================
   Promo Codes page composition
   ----------------------------------------------------------------------------
   Promo-code viewport wrapper, wide shell, compact header, two-form layout,
   voucher card, and table-height overrides. Every override is page-scoped.

   Source: Pasted text (2)(2).txt:9-590, restricted to page-owned selectors.
   ============================================================================ */

/* Intentional correction: the original `store-admin-header-promo-code` selector lacked a leading period. */

.store-admin-page-promo-code {
    height: calc(100dvh - var(--store-app-bar-height, 4rem));
    min-height: 0;
    padding: 0.625rem clamp(0.75rem, 1.25vw, 1.125rem);
    overflow: hidden;
    box-sizing: border-box;
}

.store-admin-shell-promo-code {
    display: flex;
    flex-direction: column;
    width: min(100%, 112rem);
    max-width: none;
    min-width: 0;
    height: 100%;
    min-height: 0;
    margin-inline: auto;
}

.store-admin-header-promo-code {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    min-width: 0;
    min-height: 0;
    padding: 0.5rem 0.875rem;
    margin-bottom: 0.5rem;
}

    .store-admin-header-promo-code .store-admin-title {
        margin: 0 !important;
        color: var(--store-text);
        font-size: 1.3rem !important;
        font-weight: 750;
        line-height: 1.2 !important;
    }

.store-admin-page-promo-code .store-page-forms {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 25rem);
    flex: 0 0 auto;
    align-items: start;
    gap: 0.625rem;
    width: 100%;
    min-width: 0;
    margin-bottom: 0.625rem;
}

.store-admin-page-promo-code .store-page-form-card--voucher {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
}

.store-admin-page-promo-code .store-data-card {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

    .store-admin-page-promo-code .store-data-card > .mud-table {
        flex: 1 1 auto;
        min-height: 0;
    }

@media (max-width: 1099.98px) {
    .store-admin-page-promo-code {
        height: auto;
        min-height: calc(100dvh - var(--store-app-bar-height, 4rem));
        overflow: auto;
    }

    .store-admin-shell-promo-code {
        height: auto;
        min-height: 0;
    }

    .store-admin-page-promo-code .store-page-forms {
        grid-template-columns: minmax(0, 1fr);
    }

    .store-admin-page-promo-code .store-data-card {
        flex: none;
        min-height: 30rem;
    }
}

@media (max-width: 599.98px) {
    .store-admin-page-promo-code {
        padding: 0.625rem;
    }

    .store-admin-header-promo-code {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.5rem;
    }

        .store-admin-header-promo-code .store-admin-title {
            font-size: 1.2rem !important;
        }
}

/* ===== END: pages/ViewPromoCodes.css ===== */

/* ===== BEGIN: pages/ViewSpecialOrders.css ===== */
/* ============================================================================
   Special Orders compatibility declarations
   ----------------------------------------------------------------------------
   Only declarations from the first two implementations that remain active in
   the original cascade and are not redeclared by the final implementation.

   Source: Pasted text (2)(2).txt:662-2318.
   ============================================================================ */

.special-orders-overview-card, .special-orders-actions-card {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.special-orders-metric-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.special-orders-section-label {
    line-height: 1.2;
}

.special-orders-financial-label, .special-orders-financial-value {
    min-width: 0;
}

.special-orders-financial-value {
    line-height: 1.2;
}

.special-orders-scan-heading {
    min-width: 0;
}

.special-orders-control-label {
    line-height: 1.2;
}

.special-orders-scan-controls {
    width: 100%;
    min-width: 0;
}

.special-orders-scan-input {
    display: block;
    line-height: 2.5rem;
    box-shadow: none;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

    .special-orders-scan-input::placeholder {
        color: var(--store-text-muted, #667069);
        opacity: 0.8;
    }

    .special-orders-scan-input:hover {
        border-color: var(--store-main-color, #006838);
    }

.special-orders-update-button {
    white-space: nowrap;
}

.special-orders-actions-card {
    padding: 0.625rem 0.875rem 0.75rem;
}

.special-orders-action-groups {
    grid-template-columns: minmax(23rem, 1.15fr) minmax(18rem, 0.85fr) minmax(30rem, 1.35fr);
}

.special-orders-action-group + .special-orders-action-group {
    padding-left: 0.75rem;
    border-left: 1px solid var(--store-border, #d8ddd8);
}

.special-orders-table-note-icon {
    margin-top: 0.0625rem;
}

.special-orders-table-note-text {
    max-width: 100ch;
}

.special-orders-subject {
    min-width: 0;
}

.special-orders-item-preview {
    max-height: 5.5rem;
}

.special-orders-amount {
    line-height: 1.2 !important;
}

@media (min-width: 960px) {
    .special-orders-data-table table {
        min-width: 88rem;
    }
}

@media (max-width: 1199.98px) {
    .special-orders-page .store-admin-shell-promo-code {
        min-height: 0;
    }

    .special-orders-action-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .special-orders-action-group--output {
        grid-column: 1 / -1;
        padding-top: 0.75rem;
        padding-left: 0;
        border-top: 1px solid var(--store-border, #d8ddd8);
        border-left: 0;
    }
}

@media (max-width: 799.98px) {
    .special-orders-action-groups {
        grid-template-columns: minmax(0, 1fr);
    }

    .special-orders-action-group + .special-orders-action-group {
        padding-top: 0.75rem;
        padding-left: 0;
        border-top: 1px solid var(--store-border, #d8ddd8);
        border-left: 0;
    }

    .special-orders-action-group--output {
        grid-column: auto;
    }
}

@media (max-width: 599.98px) {
    .special-orders-overview-header {
        gap: 0.625rem;
        padding: 0.625rem 0.75rem;
    }

    .special-orders-actions-card {
        padding: 0.625rem 0.75rem 0.75rem;
    }

    .special-orders-actions-header {
        align-items: stretch;
        flex-direction: column;
    }

    .special-orders-selected-count {
        width: 100%;
        justify-content: space-between;
        border-radius: 0.5rem;
    }

    .special-orders-action-buttons {
        align-items: stretch;
        flex-direction: column;
    }

    .special-orders-action-button {
        width: 100%;
    }

    .special-orders-table-toolbar .store-data-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .special-orders-table-toolbar .store-data-search-wrapper {
        width: 100%;
        max-width: none;
    }

    .special-orders-table-note {
        padding: 0.5rem 0.75rem;
    }
}

.special-orders-primary-count-value {
    line-height: 1;
}

.special-orders-financial-summary, .special-orders-scan-card {
    min-width: 0;
    padding: 0.625rem 0.75rem;
    background: var(--store-surface-subtle, #f5f6f4);
    border: 1px solid var(--store-border, #d8ddd8);
    border-radius: 0.5rem;
}

.special-orders-table-action-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    padding: 0.4375rem 0.875rem;
    background: var(--store-surface-subtle, #f5f6f4);
    border-top: 1px solid var(--store-border, #d8ddd8);
}

.special-orders-table-status-actions, .special-orders-table-output-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3125rem;
}

@media (max-width: 1199.98px) {
    .store-admin-page-promo-code.special-orders-page {
        height: auto;
        min-height: calc(100dvh - var(--store-app-bar-height, 4rem));
        overflow: auto;
    }

    .special-orders-page .store-admin-shell-promo-code {
        height: auto;
    }

    .special-orders-overview-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    }

    .special-orders-scan-card {
        grid-column: 1 / -1;
    }

    .special-orders-table-card {
        flex: none;
        min-height: 32rem;
    }
}

@media (max-width: 999.98px) {
    .special-orders-table-main-toolbar {
        grid-template-columns: minmax(0, 1fr);
    }

    .special-orders-table-action-row {
        align-items: flex-start;
        flex-direction: column;
    }

        .special-orders-table-action-row .mud-spacer {
            display: none;
        }
}

@media (max-width: 799.98px) {
    .special-orders-overview-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .special-orders-scan-card {
        grid-column: auto;
    }
}

@media (max-width: 599.98px) {
    .special-orders-metric-group {
        grid-template-columns: minmax(0, 1fr);
    }

    .special-orders-selection-buttons, .special-orders-table-status-actions, .special-orders-table-output-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .special-orders-toolbar-button {
        width: 100%;
    }
}
