/* VisionPb: order flows beyond the list and the order page (create, quick order, quotes, smart orders). Area sheet; every rule under the VisionPb scope. */

/* Form sections (create and update order header, shared FormSection): a cotton card, the head a quiet hairline row instead of a grey band. */
.vision-theme-scope[data-vision-theme="visionpb"] .form-section {
    background: var(--vpb-cotton);
    border: 0;
    border-radius: var(--vpb-radius-card);
    box-shadow: var(--vpb-edge-stock), var(--vpb-cast-stock);
}

.vision-theme-scope[data-vision-theme="visionpb"] .form-section .form-section-header {
    background: transparent;
    border-block-end: 1px solid var(--color-rule);
}

.vision-theme-scope[data-vision-theme="visionpb"] .form-section .form-section-content {
    background: transparent;
}

.vision-theme-scope[data-vision-theme="visionpb"] .form-section .form-section-title {
    color: var(--color-ink);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.vision-theme-scope[data-vision-theme="visionpb"] .form-section .form-section-header .mud-icon-root {
    color: var(--color-accent);
}

/* Page heading of the create-header form: ink, tight, with the account line muted. */
.vision-theme-scope[data-vision-theme="visionpb"] .create-order-heading .mud-typography-h5 {
    color: var(--color-ink);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.vision-theme-scope[data-vision-theme="visionpb"] .create-order-heading .mud-text-secondary {
    color: var(--color-ink-2);
    font-variant-numeric: tabular-nums;
}

/* Sticky save bar: a cotton strip with a soft cast, Save the one filled blue button. */
.vision-theme-scope[data-vision-theme="visionpb"] .pb-sticky-actions {
    background: var(--vpb-cotton);
    border: 0;
    border-radius: var(--vpb-radius-card);
    box-shadow: var(--vpb-edge-stock), var(--vpb-cast-stock);
}

/* Create New Order (account picker): the picked-account alert is a soft blue tint, not an outlined box. */
.vision-theme-scope[data-vision-theme="visionpb"] .mud-paper > .mud-stack .mud-alert-outlined-info {
    background: var(--vpb-accent-soft);
    border: 0;
    border-radius: var(--vpb-radius-card);
    color: var(--color-ink);
}

/* Quick Order, main editor: a cotton card with the lit edge instead of a 2px blue frame. */
.vision-theme-scope[data-vision-theme="visionpb"] .quick-order-primary {
    background: var(--vpb-cotton);
    border: 0;
    border-radius: var(--vpb-radius-card);
    box-shadow: var(--vpb-edge-stock), var(--vpb-cast-stock);
}

/* Quick Order, instruction panel: a recessed well beside the main card. */
.vision-theme-scope[data-vision-theme="visionpb"] .quick-order-secondary {
    background: var(--color-surface-2);
    border: 0;
    border-radius: var(--vpb-radius-card);
    box-shadow: var(--vpb-press-groove);
}

/* Quick Order, account step: a quiet tinted well. The razor sets the blue frame inline, so !important is needed to override it. */
.vision-theme-scope[data-vision-theme="visionpb"] .quick-order-primary > div[style*="border: 2px solid"] {
    background: var(--vpb-accent-soft) !important;
    border: 0 !important;
    border-radius: var(--vpb-radius-card) !important;
}

/* Quick Order: Create is the one filled blue button (the razor asks for Success green). */
.vision-theme-scope[data-vision-theme="visionpb"] .quick-order-primary .mud-button-filled.mud-button-filled-success {
    background-color: var(--color-accent);
    color: var(--vpb-cotton);
}

.vision-theme-scope[data-vision-theme="visionpb"] .quick-order-primary .mud-button-filled.mud-button-filled-success:hover:not(:disabled) {
    background-color: var(--vpb-accent-2);
}

.vision-theme-scope[data-vision-theme="visionpb"] .quick-order-primary .mud-button-filled.mud-button-filled-success:disabled {
    background-color: var(--color-surface-2);
    color: var(--color-ink-2);
}

/* Quick Order, parsed lines and previews: the results list is a cotton sheet with hairline rows. */
.vision-theme-scope[data-vision-theme="visionpb"] .quick-order-secondary .mud-paper {
    background: var(--vpb-cotton);
    box-shadow: var(--vpb-edge-stock);
}

/* Print Documents: each document group is one cotton card; the packing/invoice primary uses the blue instead of the dark board. */
.vision-theme-scope[data-vision-theme="visionpb"] .mud-paper > .mud-container > .mud-button-filled.mud-button-filled-secondary {
    background-color: var(--color-accent);
    color: var(--vpb-cotton);
}

.vision-theme-scope[data-vision-theme="visionpb"] .mud-paper > .mud-container > .mud-button-filled.mud-button-filled-secondary:hover:not(:disabled) {
    background-color: var(--vpb-accent-2);
}

.vision-theme-scope[data-vision-theme="visionpb"] .mud-paper > .mud-container > .mud-button-filled.mud-button-filled-secondary:disabled {
    background-color: var(--color-surface-2);
    color: var(--color-ink-2);
}

/* Order sub-page back link (Ship Items, "Back to Order ..."): accent, tight, no underline until hover. */
.vision-theme-scope[data-vision-theme="visionpb"] .mud-main-content > .mud-link.mud-link-underline-hover:first-child,
.vision-theme-scope[data-vision-theme="visionpb"] .mud-main-content > a.mud-link:first-child {
    color: var(--color-accent);
}

/* Focus stays visible on the pieces this sheet restyles. */
.vision-theme-scope[data-vision-theme="visionpb"] :is(.form-section, .pb-sticky-actions, .quick-order-primary, .quick-order-secondary) :is(button, a, input, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
}

/* Print Documents: the wrapper paper around the document cards is flattened, so cards do not sit inside a card. */
.vision-theme-scope[data-vision-theme="visionpb"] .mud-paper:has(> .mud-grid > .mud-grid-item > .mud-paper > .mud-container > .mud-button-root) {
    background: transparent;
    box-shadow: none;
}
