/* Storage optical material, adapted to the existing Orders workspace and controls. */
html:root.orders-crystal[data-orders-theme] {
  --glass-blur:18px;
  --orders-glass-tint:.52;
  --orders-glass-tint-rgb:245,248,251;
  --orders-glass-panel:linear-gradient(145deg,rgba(255,255,255,.58),rgba(239,245,250,.52) 55%,rgba(216,228,239,.44));
  --orders-glass-overlay:linear-gradient(145deg,rgba(255,255,255,.76),rgba(237,244,250,.72));
  --orders-glass-control:linear-gradient(145deg,rgba(255,255,255,.25),rgba(239,246,252,.08));
  --orders-glass-inset:linear-gradient(145deg,rgba(249,252,255,.32),rgba(220,230,239,.10));
  --orders-glass-edge:inset 1px 1px 1px rgba(255,255,255,.48),inset -1px -1px 1px rgba(94,117,137,.045),0 8px 23px rgba(26,44,62,.09);
  --orders-glass-contact:inset 1px 1px 1px rgba(255,255,255,.14),0 2px 6px rgba(38,54,72,.065);
  --orders-glass-divider:rgba(40,57,76,.12);
  --orders-glass-hover:rgba(255,255,255,.46);
  --orders-glass-selected:rgba(238,244,249,.64);
  --orders-glass-solid:#edf1f6;
  --orders-glass-focus:#285dd3;
  --orders-glass-action:linear-gradient(135deg,#326ee8,#2152c9);
  --orders-glass-action-hover:linear-gradient(135deg,#3474f0,#245bd7);
  --orders-glass-action-edge:inset 0 1px 0 rgba(184,212,255,.17),0 5px 18px rgba(14,55,137,.15);
  --orders-scene-wash:rgba(240,246,251,.24);
  --orders-scene-rgb:244,248,252;
  --orders-scene-left:.68;
  --orders-scene-bottom:.46;
  --orders-scene-top:.12;
  --orders-glass-text:#172230;
  --orders-glass-muted:#455565;
  --ink:var(--orders-glass-text);
  --navy:var(--ink);
  --text:var(--ink);
  --text-primary:var(--ink);
  --muted:var(--orders-glass-muted);
  --text-muted:var(--muted);
  --placeholder:#506071;
  --background:#edf1f6;
  --elevated-bg:rgba(243,248,252,.82);
  --line:var(--orders-glass-divider);
  --soft-bg:rgba(247,251,255,.12);
  --hover-bg:var(--orders-glass-hover);
  --orders-focus:var(--orders-glass-focus);
  --orders-primary-fill:var(--orders-glass-action);
  --orders-primary-hover:var(--orders-glass-action-hover);
  --orders-primary-active:linear-gradient(135deg,#2b62d6,#204cb6);
  --orders-primary-ink:#fff;
  --orders-primary-shadow:var(--orders-glass-action-edge);
  --card-surface:var(--orders-glass-panel);
  --card-edge:var(--orders-glass-edge);
  --orders-control-fill:var(--orders-glass-control);
  --orders-control-shadow:var(--orders-glass-contact);
  --orders-control-hover:var(--orders-glass-hover);
  --orders-control-selected:var(--orders-glass-selected);
  --orders-control-selected-shadow:var(--orders-glass-contact);
}

html:root.orders-crystal[data-orders-theme="dark"] {
  --orders-glass-tint:.26;
  --orders-glass-tint-rgb:22,22,24;
  --orders-glass-panel:linear-gradient(145deg,rgba(62,54,50,.62),rgba(22,22,24,.68) 55%,rgba(16,21,25,.64));
  --orders-glass-overlay:linear-gradient(145deg,rgba(53,49,47,.78),rgba(17,23,30,.84));
  --orders-glass-control:linear-gradient(145deg,rgba(207,211,217,.065),rgba(13,20,28,.14));
  --orders-glass-inset:linear-gradient(145deg,rgba(235,239,245,.085),rgba(235,239,245,.035));
  --orders-glass-edge:inset 1px 1px 1px rgba(255,245,232,.18),inset -1px -1px 1px rgba(222,230,239,.045),0 8px 23px rgba(0,0,0,.18);
  --orders-glass-contact:inset 1px 1px 1px rgba(251,238,226,.10),0 2px 6px rgba(0,0,0,.07);
  --orders-glass-divider:rgba(218,211,203,.12);
  --orders-glass-hover:rgba(235,239,245,.14);
  --orders-glass-selected:rgba(235,239,245,.18);
  --orders-glass-solid:#1e252d;
  --orders-glass-focus:#94b8ff;
  --orders-scene-wash:rgba(6,14,25,.28);
  --orders-scene-rgb:4,11,23;
  --orders-scene-left:.28;
  --orders-scene-bottom:.61;
  --orders-scene-top:.08;
  --orders-glass-text:#fff;
  --orders-glass-muted:#c8ced5;
  --placeholder:#b9c1ca;
  --background:#11161c;
  --elevated-bg:rgba(24,28,33,.82);
  --soft-bg:rgba(235,239,245,.045);
}

/* The scene shader reads the same gradient values as the visible backdrop. */
html:root.orders-crystal[data-orders-theme] :is(#orders-scene-photo,.orders-scene-shade) {
  inset:12px;
  width:calc(100% - 24px);
  height:calc(100dvh - 24px);
}
html:root.orders-crystal[data-orders-theme] #orders-scene-photo {object-position:center right}
html:root.orders-crystal[data-orders-theme] .orders-scene-shade {
  background:linear-gradient(0deg,rgba(var(--orders-scene-rgb),var(--orders-scene-bottom)),rgba(var(--orders-scene-rgb),var(--orders-scene-top)) 65%),
    linear-gradient(90deg,rgba(var(--orders-scene-rgb),var(--orders-scene-left)),transparent 70%),var(--orders-scene-wash);
}

@media screen {
  html:root.orders-crystal[data-orders-theme] body :is(.app-header,.order-mobile-nav) {
    --orders-glass-tint:.50;
  }
  html:root.orders-crystal[data-orders-theme="dark"] body :is(.app-header,.order-mobile-nav) {
    --orders-glass-tint:.18;
  }
  html:root.orders-crystal[data-orders-theme] body :is(
    .app-header,.sidebar,.panel,.stat-card,.order-table,.list-panel,.client-grid,.order-mobile-nav,.order-settings-nav,
    .order-list-pane,.flow-list-empty,.empty-panel,.login-panel,.auth-card,.ux-product-card,.team-card,
    .transaction-card,.promotion-card,.integration-card,.task-card,.purchase-card
  ) {
    background:var(--orders-glass-panel)!important;
    border-color:transparent!important;
    box-shadow:var(--orders-glass-edge)!important;
    -webkit-backdrop-filter:blur(var(--glass-blur)) saturate(1.12);
    backdrop-filter:blur(var(--glass-blur)) saturate(1.12);
  }

  html:root.orders-crystal[data-orders-theme] body :is(
    .dialog,.orders-dialog,.toast,.sp-panel,.profile-menu,.select-menu,.ux-product-menu,
    .sabsus-suite-menu,.sabsus-currency-dialog,:where(#sabsus-workspace-window),[role="dialog"][open]
  ) {
    color:var(--ink)!important;
    background:var(--orders-glass-overlay)!important;
    border-color:transparent!important;
    box-shadow:var(--orders-glass-edge)!important;
    -webkit-backdrop-filter:blur(var(--glass-blur)) saturate(1.12)!important;
    backdrop-filter:blur(var(--glass-blur)) saturate(1.12)!important;
  }
  html:root.orders-crystal[data-orders-theme] body :is(.dialog-scrim,.modal-overlay,.modal-backdrop) {
    background:rgba(4,10,18,.36)!important;
    -webkit-backdrop-filter:blur(3px)!important;
    backdrop-filter:blur(3px)!important;
  }
  html:root.orders-crystal[data-orders-theme="light"] body :is(.dialog-scrim,.modal-overlay,.modal-backdrop) {
    background:rgba(25,42,61,.20)!important;
  }

  /* Quiet material for sections and form groups inside an already frosted surface. */
  html:root.orders-crystal[data-orders-theme] body :is(.dialog,#page-content) :is(
    .ux-product-section,.product-extra-section,.product-required-recipe,.product-primary-categories,
    .product-extra-switch,.product-set-draft,.product-photo-card,.product-photo-frame,.product-photo-upload,
    .ux-photo-cover,.ux-translations,.product-art-large,.document-summary,.detail-summary,
    .settings-row,.settings-card,.setting-group,.hardware-card,.integration-section,.team-row
  ) {
    color:var(--ink)!important;
    background:var(--orders-glass-inset)!important;
    border-color:transparent!important;
    box-shadow:var(--orders-glass-contact)!important;
  }
  html:root.orders-crystal[data-orders-theme] body :is(.dialog,.orders-dialog,.sabsus-currency-dialog) :is(
    .ux-product-editor>.modal-footer,.dialog-header,.dialog-footer,.modal-footer
  ) {
    background:var(--orders-glass-inset)!important;
    border-color:var(--orders-glass-divider)!important;
    -webkit-backdrop-filter:blur(16px) saturate(1.12);
    backdrop-filter:blur(16px) saturate(1.12);
  }
  html:root.orders-crystal[data-orders-theme] body :is(
    .ux-product-tabs,.tabs,.segmented,.list-tabs,.view-toggle,.stock-page-toolbar .filter-controls,
    .ux-product-more>summary,.ux-product-editor .ux-translation-toggle
  ) {
    background:var(--orders-glass-control)!important;
    border-color:transparent!important;
    box-shadow:var(--orders-glass-contact)!important;
    color:var(--ink)!important;
  }
  html:root.orders-crystal[data-orders-theme] body :is(.ux-product-tabs,.tabs,.segmented,.list-tabs,.view-toggle) >
  :is(button,a):not(.primary) {
    background:transparent!important;
    border-color:transparent!important;
    box-shadow:none!important;
    color:var(--muted)!important;
  }
  html:root.orders-crystal[data-orders-theme] body :is(.ux-product-tabs,.tabs,.segmented,.list-tabs,.view-toggle) >
  :is(button,a):not(.primary):is(.active,.is-active,[aria-selected="true"],[aria-pressed="true"],[aria-current="page"]) {
    background:var(--orders-glass-selected)!important;
    box-shadow:var(--orders-glass-contact)!important;
    color:var(--ink)!important;
  }
  html:root.orders-crystal[data-orders-theme] body :is(.sidebar,.order-mobile-nav) .nav-item {
    border-color:transparent!important;
  }
  html:root.orders-crystal[data-orders-theme] body .sidebar .nav-item.active {
    background:rgba(50,110,232,.20)!important;
    color:var(--ink)!important;
    box-shadow:inset 3px 0 0 #568cff!important;
  }

  html:root.orders-crystal[data-orders-theme] body :is(
    .button,.btn,.icon-btn,.select-trigger,.setting-trigger,.field-shell,.search-shell,.search-field,
    .quantity-stepper,.number-stepper,.filter-trigger,.ux-translation-row>input,.ux-translation-row>textarea,
    input:not([type="checkbox"],[type="radio"],[type="range"],[type="color"],[type="file"],[type="hidden"]),select,textarea
  ):not(.primary,.danger,.danger-button,.button-danger,.link-btn,.ux-product-save) {
    background:var(--orders-glass-control)!important;
    border-color:transparent!important;
    box-shadow:var(--orders-glass-contact)!important;
    color:var(--ink)!important;
  }
  html:root.orders-crystal[data-orders-theme] body :is(.field-shell,.search-shell,.search-field) :is(
    input:not([type="checkbox"],[type="radio"],[type="range"],[type="color"],[type="file"]),textarea,select
  ) {
    background:transparent!important;
    box-shadow:none!important;
  }
  html:root.orders-crystal[data-orders-theme] body :is(input,textarea)::placeholder {
    color:var(--placeholder)!important;
    opacity:1;
  }
  html:root.orders-crystal[data-orders-theme] body :is(.ux-product-editor,label) :is(.field-label,.ux-translations-caption) {
    color:var(--muted)!important;
  }
  html:root.orders-crystal[data-orders-theme] body :is(.button,.btn,.icon-btn,.select-trigger,.setting-trigger):not(.primary,.danger,.ux-product-save):hover:not(:disabled) {
    background:var(--orders-glass-hover)!important;
  }
  html:root.orders-crystal[data-orders-theme] body :is(button.primary,a.primary,.button.primary,.btn.primary,.primary-btn,.ux-product-save) {
    background:var(--orders-primary-current,var(--orders-glass-action))!important;
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    border-color:transparent!important;
    box-shadow:var(--orders-glass-action-edge)!important;
  }
  html:root.orders-crystal[data-orders-theme] body :is(button.primary,a.primary,.button.primary,.btn.primary,.primary-btn,.ux-product-save):hover:not(:disabled,[aria-disabled="true"]) {
    background:var(--orders-glass-action-hover)!important;
  }
  html:root.orders-crystal[data-orders-theme] body :is(button.primary,a.primary,.button.primary,.btn.primary,.primary-btn,.ux-product-save):active:not(:disabled,[aria-disabled="true"]) {
    background:var(--orders-primary-active)!important;
  }
  html:root.orders-crystal[data-orders-theme] body :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible {
    outline:2px solid var(--orders-glass-focus);
    outline-offset:3px;
  }
  html:root.orders-crystal[data-orders-theme] body :is(.select-menu,.profile-menu,.ux-product-menu,.sabsus-suite-menu) button:not(.primary,.danger) {
    color:var(--ink)!important;
    background:transparent!important;
    box-shadow:none!important;
    border-color:transparent!important;
  }
  html:root.orders-crystal[data-orders-theme] body :is(.select-menu,.profile-menu,.ux-product-menu,.sabsus-suite-menu)
  :is(button,a):not(.primary,.danger):is(:hover,[aria-selected="true"],[aria-current="page"]) {
    background:var(--orders-glass-selected)!important;
  }
  html:root.orders-crystal[data-orders-theme] body .ux-product-menu [data-act="catalog-product-delete"] {
    color:var(--danger)!important;
  }
}

/* Panes paint underneath HTML, only on positioned surfaces selected by the renderer. */
html:root.orders-crystal.orders-optical-glass:not(.glass-off,.orders-static-glass,.orders-css-scene)[data-orders-theme]
body .glass-painted[data-orders-optical] {
  background:transparent!important;
  box-shadow:var(--orders-glass-edge)!important;
  border-color:transparent!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}

/* Storage's fallback perimeter glint on the shell while optical sampling is unavailable. */
@property --orders-glass-angle {syntax:"<angle>";inherits:false;initial-value:0deg}
@keyframes orders-storage-perimeter {to {--orders-glass-angle:360deg}}
html:root.orders-crystal.orders-optical-glass:not(.glass-off,.motion-off) body
:is(.app-header,.sidebar,.dialog,.select-menu,.profile-menu,.login-panel):not(.glass-painted,.orders-optical-loading)::after {
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  padding:1px;
  z-index:2;
  pointer-events:none;
  background:conic-gradient(from var(--orders-glass-angle),transparent 0deg 304deg,rgba(235,244,255,.035) 317deg,rgba(242,248,255,.58) 332deg,rgba(235,244,255,.035) 342deg,transparent 351deg);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask-composite:exclude;
  animation:orders-storage-perimeter 21.739s linear infinite;
}

@media(max-width:760px) {
  html:root.orders-crystal[data-orders-theme] :is(#orders-scene-photo,.orders-scene-shade) {
    inset:0;
    width:100%;
    height:100dvh;
    border-radius:0;
  }
  html:root.orders-crystal[data-orders-theme] #orders-scene-photo {object-position:72% center}
  html:root.orders-crystal[data-orders-theme] .orders-scene-shade {
    background:linear-gradient(0deg,rgba(var(--orders-scene-rgb),var(--orders-scene-bottom)),rgba(var(--orders-scene-rgb),var(--orders-scene-top)) 80%),var(--orders-scene-wash);
  }
  html:root.orders-crystal[data-orders-theme] body .ux-product-tabs {
    display:flex;
    flex-wrap:wrap;
    padding-inline-end:47px;
    overflow:visible;
  }
  html:root.orders-crystal[data-orders-theme] body .ux-product-tabs > button {
    flex:1 1 29%;
    min-width:0;
    min-height:44px;
    padding:5px 6px!important;
    white-space:normal;
    line-height:1.15;
  }
  html:root.orders-crystal[data-orders-theme] body .ux-product-editor .ux-product-price-grid {
    min-width:0;
  }
  html:root.orders-crystal[data-orders-theme] body :is(.orders-theme-toggle,.dialog-close,.order-mobile-nav>button,.order-mobile-nav>a) {
    min-height:44px;
  }
}

@media(prefers-reduced-motion:reduce) {
  html.orders-crystal body :is(.app-header,.sidebar,.dialog,.select-menu,.profile-menu,.login-panel)::after {animation:none!important}
}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more) {
  html:root.orders-crystal[data-orders-theme] {
    --glass-blur:0px;
    --orders-glass-panel:var(--orders-glass-solid);
    --orders-glass-overlay:var(--orders-glass-solid);
  }
  html.orders-crystal body :is(.sg-pane,#orders-scene-photo,.orders-scene-shade) {display:none!important}
  html.orders-crystal body :is(.app-header,.sidebar,.dialog,.select-menu,.profile-menu,.login-panel)::after {animation:none!important}
}
@media(forced-colors:active) {
  html:root.orders-crystal[data-orders-theme] {
    --orders-glass-panel:Canvas;
    --orders-glass-overlay:Canvas;
    --orders-glass-inset:Canvas;
    --orders-glass-control:Canvas;
    --orders-glass-focus:Highlight;
    --orders-glass-edge:none;
    --orders-glass-contact:none;
    --orders-glass-text:CanvasText;
    --orders-glass-muted:CanvasText;
  }
  html:root.orders-crystal[data-orders-theme] body :is(button.primary,a.primary,.button.primary,.btn.primary,.primary-btn,.ux-product-save) {
    background:Highlight!important;
    color:HighlightText!important;
    -webkit-text-fill-color:HighlightText!important;
  }
  html.orders-crystal body :is(.app-header,.sidebar,.dialog,.select-menu,.profile-menu,.login-panel)::after {display:none!important}
}
