/* Eshop-owned quick order. Host themes supply optional --cei-* design tokens. */
.eshop-quick-order {
    --eq-accent: var(--cei-accent, var(--eshop-color-accent, #146b78));
    --eq-error: var(--cei-error, #a72629);
    --eq-border: var(--cei-border, #bbc9cc);
    --eq-radius: var(--eshop-quick-order-radius, var(--cei-radius, .4rem));
    /* One spacing scale; RWS when hosted, Eshop theme when standalone.
       Projects can override --eshop-quick-order-space-* without editing this file. */
    --eq-space-xs: var(--eshop-quick-order-space-xs, var(--space-1, var(--eshop-spacing-xs, .25rem)));
    --eq-space-sm: var(--eshop-quick-order-space-sm, var(--space-2, var(--eshop-spacing-sm, .5rem)));
    --eq-space-md: var(--eshop-quick-order-space-md, var(--space-3, .75rem));
    --eq-space-lg: var(--eshop-quick-order-space-lg, var(--space-4, var(--eshop-spacing-md, 1rem)));
    --eq-space-xl: var(--eshop-quick-order-space-xl, var(--space-5, var(--eshop-spacing-lg, 1.5rem)));
    font-family: var(--eshop-quick-order-font, inherit);
    color: var(--eshop-quick-order-text, var(--cei-text, #203239));
    background: var(--eshop-quick-order-canvas, var(--cei-canvas, transparent));
    overflow-wrap: anywhere;
}
.eshop-quick-order * { box-sizing: border-box; }
.eshop-quick-order :focus-visible { outline: 3px solid var(--cei-focus, #095ba8); outline-offset: 3px; }
.eshop-quick-order :disabled { opacity: .55; cursor: default; }
.eshop-quick-order summary { cursor: pointer; min-height: 2.75rem; padding: var(--eq-space-sm) 0; font-weight: 700; }
/* Disclosures owned by the Eshop workspace no longer inherit Bridge-wide
   details rules. Keep the code editor/rejected-input disclosure appearance. */
.eshop-quick-order > details:not(.eq-help),
.eshop-quick-order .eq-work > details {
    margin-block: var(--eq-space-lg);
    padding: var(--eq-space-sm);
    border: 1px solid var(--eq-border);
    border-radius: var(--eq-radius);
}
.eshop-quick-order > details:not(.eq-help) > summary,
.eshop-quick-order .eq-work > details > summary {
    padding: var(--eq-space-sm) var(--eq-space-md);
    border: 1px solid var(--eq-border);
    border-radius: var(--eq-radius);
}
.eshop-quick-order .eq-errors { color: var(--eq-error); }
.eshop-quick-order button,
.eshop-quick-order input[type=submit] {
    min-height: 2.75rem;
    margin: 0;
    padding: .4rem .65rem;
    border: 1px solid var(--eq-border);
    border-radius: var(--eq-radius);
    background: var(--cei-surface, #fff);
    color: inherit;
    cursor: pointer;
    font: inherit;
    white-space: normal;
}
.eshop-quick-order input:not([type=submit]):not([type=checkbox]):not([type=hidden]),
.eshop-quick-order select {
    min-width: 0;
    max-width: 100%;
    min-height: 2.75rem;
    padding: var(--eq-space-sm);
    border: 1px solid var(--eq-border);
    border-radius: var(--eq-radius);
    background: var(--cei-surface, #fff);
    color: inherit;
    font: inherit;
}
.eshop-quick-order input.eq-continue {
    margin-top: .3rem;
    border-color: transparent;
    background: var(--eshop-quick-order-action, var(--eq-accent));
    color: var(--cei-on-accent, #fff);
    font-weight: 700;
}
.eshop-quick-order nav { display: grid; gap: var(--eq-space-xs); }

/* Contextual help: one boundary, structured instructions inside. */
.eshop-quick-order .eq-help {
    margin: 0 0 1rem;
    padding: 0;
    border: 1px solid var(--eq-border);
    border-radius: var(--eq-radius);
    background: transparent;
}
.eshop-quick-order .eq-help > summary {
    padding: var(--eq-space-md) var(--eq-space-lg);
    border: 0;
    background: transparent;
    box-shadow: none;
}
.eshop-quick-order .eq-help[open] > summary { border-bottom: 1px solid var(--eq-border); }
.eshop-quick-order .eq-help-content { padding: var(--eq-space-xs) var(--eq-space-lg) var(--eq-space-md); line-height: 1.55; }
.eshop-quick-order .eq-help-content p { margin: .7rem 0; }
.eshop-quick-order .eq-help-content ol { margin: .65rem 0; padding-inline-start: 1.5rem; }
.eshop-quick-order .eq-help-content li + li { margin-top: .4rem; }
.eshop-quick-order .eq-help-note { color: var(--cei-muted, #4c6069); font-size: .9rem; }

/* Products, search, editing and server review. */
.eshop-quick-order .eq-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 15rem;
    align-items: start;
    gap: var(--eshop-quick-order-gap, var(--eq-space-xl));
}
.eshop-quick-order .eq-work { min-width: 0; }
.eshop-quick-order .eq-search { display: flex; flex-wrap: wrap; gap: var(--eq-space-sm); align-items: center; }
.eshop-quick-order .eq-row {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr) 11rem;
    align-items: center;
    gap: var(--eq-space-md);
    padding: var(--eq-space-md);
    border-bottom: 1px solid var(--eq-border);
}
.eshop-quick-order .eq-row[data-selected=true] {
    background: var(--cei-selected-surface, #e5f3f0);
    box-shadow: inset .2rem 0 var(--eq-accent);
}
.eshop-quick-order .eq-row img { max-width: 100%; height: 4rem; object-fit: contain; }
.eshop-quick-order .eq-photo { color: var(--cei-muted, #4c6069); font-size: .75rem; }
.eshop-quick-order .eq-product > a,
.eshop-quick-order .eq-product > strong { font-weight: 700; line-height: 1.3; }
.eshop-quick-order .eq-product > div { margin-top: .2rem; font-size: .9rem; }
.eshop-quick-order .eq-offer { display: flex; flex-wrap: wrap; gap: .25rem .8rem; }
.eshop-quick-order .eq-selected { margin-inline-start: .5rem; color: var(--eq-accent); font-weight: 700; }
.eshop-quick-order .eq-quantity {
    display: grid;
    grid-template-columns: auto minmax(3rem, 1fr) auto;
    gap: var(--eq-space-sm);
}
.eshop-quick-order .eq-quantity label { grid-column: 1 / -1; font-size: .85rem; }
.eshop-quick-order .eq-quantity input { width: 100%; }
.eshop-quick-order .eq-quantity small,
.eshop-quick-order .eq-quantity button[name^=remove] { grid-column: 1 / -1; }
.eshop-quick-order .eq-code-row { display: flex; gap: var(--eq-space-sm); flex-wrap: wrap; align-items: center; margin-block: var(--eq-space-md); }
.eshop-quick-order fieldset { border: 1px solid var(--eq-border); }
.eshop-quick-order .eq-management { padding: var(--eq-space-sm); border: 1px solid var(--eq-border); border-radius: var(--eq-radius); }

/* Manage lists: a visible overview, with rare actions tucked below each row. */
.eshop-quick-order .eq-list-manager > h3 { margin: 0 0 var(--eq-space-sm); }
.eshop-quick-order .eq-list-manager > p { margin: var(--eq-space-sm) 0 var(--eq-space-lg); color: var(--cei-muted, #4c6069); }
.eshop-quick-order .eq-list-overview { border-top: 1px solid var(--eq-border); }
.eshop-quick-order .eq-list-card { padding: var(--eq-space-lg) 0; border-bottom: 1px solid var(--eq-border); }
.eshop-quick-order .eq-list-summary { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--eq-space-md); }
.eshop-quick-order .eq-list-info { display: grid; gap: .18rem; min-width: 0; }
.eshop-quick-order .eq-list-info > strong { font-size: 1.04rem; }
.eshop-quick-order .eq-list-info > span { color: var(--cei-muted, #4c6069); font-size: .88rem; }
.eshop-quick-order .eq-list-summary > button { border-color: var(--eq-accent); color: var(--eq-accent); font-weight: 600; }
/* List management: preserve two clear actions, but use one quiet neutral
   surface per disclosure instead of nested outlines. Colors can be adjusted
   by the host theme without changing Eshop templates. */
.eshop-quick-order .eq-list-card > details {
    margin: var(--eq-space-sm) 0 0;
    padding: 0;
    border: 1px solid var(--color-border-muted, #e5eaee);
    border-radius: var(--eq-radius);
    background: var(--eshop-quick-order-list-soft-surface, var(--color-surface-muted, #edf1f4));
    box-shadow: none;
    overflow: hidden;
}
.eshop-quick-order .eq-list-card > details > summary {
    display: list-item;
    min-height: 2.75rem;
    margin: 0;
    padding: var(--eq-space-sm) var(--eq-space-md);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--cei-text, #203239);
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.35;
}
.eshop-quick-order .eq-list-card > details > summary:hover { color: var(--eq-accent); }
.eshop-quick-order .eq-list-card > details[open] > summary {
    border-bottom: 1px solid var(--color-border-muted, #e5eaee);
}
.eshop-quick-order .eq-list-card > .eq-list-contents > ul {
    margin: .6rem .9rem .85rem;
    padding-inline-start: 1.4rem;
}
.eshop-quick-order .eq-list-card > .eq-list-contents > p {
    margin: .65rem .9rem .85rem;
}
.eshop-quick-order .eq-list-card > .eq-list-settings > .eq-list-settings-body {
    padding: var(--eq-space-md) var(--eq-space-lg) var(--eq-space-lg);
}
.eshop-quick-order .eq-list-contents li { margin: .2rem 0; }
.eshop-quick-order .eq-list-settings-body { display: grid; gap: var(--eq-space-lg); }
.eshop-quick-order .eq-list-rename { display: grid; justify-items: start; gap: var(--eq-space-sm); }
.eshop-quick-order .eq-list-rename input[type=text] { width: min(100%, 30rem); }
.eshop-quick-order .eq-list-delete { display: grid; justify-items: start; gap: var(--eq-space-sm); padding-top: var(--eq-space-md); border-top: 1px solid var(--eq-border); }
.eshop-quick-order .eq-list-delete label { line-height: 1.45; }
.eshop-quick-order .eq-list-empty { padding: .8rem 0; }

/* Repeated transfers: show the separate confirmation form *before* the editor.
   It must never be nested inside the editor form or pushed below the sidebar. */
.eshop-quick-order .eq-review {
    margin: 0 0 var(--eq-space-xl);
    padding: var(--eq-space-lg) var(--eq-space-xl);
    border: 1px solid var(--eq-border);
    border-inline-start: .22rem solid var(--eq-accent);
    border-radius: var(--eq-radius);
    background: var(--eshop-quick-order-panel-surface, var(--cei-surface, #fff));
}
.eshop-quick-order .eq-review h3 { margin: 0 0 var(--eq-space-sm); }
.eshop-quick-order .eq-review p { margin: var(--eq-space-md) 0; line-height: 1.5; }
.eshop-quick-order .eq-review-intro { font-weight: 600; }
.eshop-quick-order .eq-review-products { margin: var(--eq-space-lg) 0; padding-inline-start: var(--eq-space-xl); }
.eshop-quick-order .eq-review-products > li { padding: var(--eq-space-xs) 0; }
.eshop-quick-order .eq-review-products > li + li { border-top: 1px solid var(--eq-border); }
.eshop-quick-order .eq-review-products ul { margin: var(--eq-space-sm) 0; padding-inline-start: var(--eq-space-xl); }
.eshop-quick-order .eq-review form { margin-top: var(--eq-space-md); }
.eshop-quick-order .eq-review-pending { margin: 0; font-size: .86rem; color: var(--cei-muted, #4c6069); line-height: 1.45; }

/* The destination, mode and finishing actions share one sidebar surface. */
.eshop-quick-order .eq-controls {
    position: sticky;
    top: var(--eshop-quick-order-sticky-top, 1rem);
    display: grid;
    gap: 0;
    max-height: calc(100dvh - var(--eshop-quick-order-sticky-top, 1rem) - 1rem);
    overflow-y: auto;
    padding: var(--eq-space-lg);
    border: 1px solid var(--eq-border);
    border-radius: var(--eq-radius);
    background: var(--eshop-quick-order-panel-surface, var(--cei-surface, #fff));
    box-shadow: 0 .2rem .85rem rgba(15, 35, 45, .035);
}
.eshop-quick-order .eq-panel-heading { display: flex; flex-direction: column; gap: .12rem; padding-bottom: .9rem; }
.eshop-quick-order .eq-panel-heading strong { font-size: 1.04rem; }
.eshop-quick-order .eq-panel-heading span { color: var(--cei-muted, #4c6069); font-size: .83rem; }
.eshop-quick-order .eq-destinations {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.eshop-quick-order .eq-destinations > summary {
    padding: .55rem 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: .91rem;
}
.eshop-quick-order .eq-compact-active { display: none; color: var(--cei-muted, #4c6069); font-weight: 400; }
.eshop-quick-order .eq-targets {
    grid-template-columns: minmax(0, 1fr);
    gap: .15rem;
    max-height: min(30vh, 16rem);
    margin: 0;
    padding: 0;
    overflow-y: auto;
}
.eshop-quick-order .eq-targets button {
    display: block;
    width: 100%;
    min-height: 2.35rem;
    padding: var(--eq-space-sm) var(--eq-space-md);
    border: 1px solid transparent;
    background: transparent;
    font-size: .91rem;
    line-height: 1.3;
    text-align: left;
}
.eshop-quick-order .eq-targets button:hover { background: var(--cei-selected-surface, #e5f3f0); }
.eshop-quick-order .eq-targets button[aria-current=page] {
    border-color: var(--eq-border);
    background: var(--cei-selected-surface, #e5f3f0);
    box-shadow: inset .19rem 0 var(--eq-accent);
    font-weight: 700;
}
.eshop-quick-order .eq-destination-actions { display: flex; flex-wrap: wrap; gap: var(--eq-space-sm); padding-top: var(--eq-space-md); }
.eshop-quick-order .eq-destination-actions :is(button, input[type=submit]) {
    flex: 1 1 5.8rem;
    min-height: 2.2rem;
    padding: .3rem .45rem;
    border-color: var(--eq-border);
    background: transparent;
    font-size: .82rem;
}
.eshop-quick-order .eq-mode-group {
    margin-top: var(--eq-space-md);
    padding: var(--eq-space-md) 0;
    border-top: 1px solid var(--eq-border);
    border-bottom: 1px solid var(--eq-border);
}
.eshop-quick-order .eq-group-label { display: block; margin: 0 0 var(--eq-space-sm); font-size: .91rem; }
.eshop-quick-order .eq-modes { gap: var(--eq-space-xs); }
.eshop-quick-order .eq-modes button {
    width: 100%;
    min-height: 2.45rem;
    padding: var(--eq-space-sm) var(--eq-space-md);
    border: 1px solid transparent;
    background: transparent;
    font-size: .91rem;
    text-align: left;
}
.eshop-quick-order .eq-modes button:hover { background: var(--cei-selected-surface, #e5f3f0); }
.eshop-quick-order .eq-modes button[aria-current=page] {
    border-color: var(--eq-border);
    background: var(--cei-selected-surface, #e5f3f0);
    box-shadow: inset .19rem 0 var(--eq-accent);
    font-weight: 700;
}
.eshop-quick-order .eq-finish { display: grid; gap: var(--eq-space-sm); padding-top: var(--eq-space-md); }
.eshop-quick-order .eq-save-status { color: var(--cei-muted, #4c6069); font-size: .82rem; line-height: 1.35; }
.eshop-quick-order .eq-cart-link { display: inline-block; justify-self: start; padding: var(--eq-space-xs) 0; font-size: .91rem; }

/* Medium/mobile: destination and mode above products, finishing actions below. */
@media (max-width: 70rem) {
    .eshop-quick-order .eq-workspace { grid-template-columns: minmax(0, 1fr); gap: var(--eq-space-md); }
    .eshop-quick-order .eq-controls { display: contents; }
    .eshop-quick-order .eq-panel-heading { grid-row: 1; padding: .55rem 0 0; }
    .eshop-quick-order .eq-destinations {
        grid-row: 2;
        padding: .45rem .7rem;
        border: 1px solid var(--eq-border);
        border-radius: var(--eq-radius);
    }
    .eshop-quick-order .eq-destinations > summary { padding: var(--eq-space-sm) 0; }
    .eshop-quick-order .eq-compact-active { display: inline; }
    .eshop-quick-order .eq-targets { grid-template-columns: 1fr; max-height: 12rem; }
    .eshop-quick-order .eq-mode-group { grid-row: 3; margin: 0; padding: .35rem 0; border: 0; }
    .eshop-quick-order .eq-group-label { margin: .35rem 0; }
    .eshop-quick-order .eq-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--eq-space-sm); }
    .eshop-quick-order .eq-modes button { min-height: 2.65rem; padding: .4rem .35rem; border: 1px solid var(--eq-border); text-align: center; }
    .eshop-quick-order .eq-work { grid-row: 4; }
    .eshop-quick-order .eq-finish {
        grid-row: 5;
        padding: .8rem;
        border: 1px solid var(--eq-border);
        border-radius: var(--eq-radius);
        background: var(--eshop-quick-order-panel-surface, var(--cei-surface, #fff));
    }
}
@media (max-width: 42rem) {
    .eshop-quick-order .eq-row { grid-template-columns: 3rem minmax(0, 1fr); }
    .eshop-quick-order .eq-row img { height: 3rem; }
    .eshop-quick-order .eq-quantity { grid-column: 2; max-width: 16rem; }
    .eshop-quick-order .eq-modes button { font-size: .82rem; line-height: 1.2; }
    .eshop-quick-order .eq-help-content { padding: var(--eq-space-xs) var(--eq-space-md) var(--eq-space-md); }
}
