/* Full-screen assignment editor — shop desktop only. Factory / phone (<761px) unchanged.
   assignment-click-fix-20261112-1: header is a direct child of the dialog; plain-section entry;
   fallback when showModal is unavailable keeps the dialog above the z-index:50 order card. */

.ab-fs-dialog {
  width: min(1680px, calc(100vw - 24px));
  height: calc(100dvh - 24px);
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  border: 1px solid #c9dbd3;
  border-radius: 16px;
  background: #f4f7f6;
  color: #173e37;
  box-shadow: 0 18px 48px #0a251f33;
  overflow: hidden;
}
.ab-fs-dialog[open] {
  display: flex;
  flex-direction: column;
}
.ab-fs-dialog.ab-fs-fallback[open] {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  outline: 100vmax solid #0a251fbb;
}
.ab-fs-dialog::backdrop {
  background: #0a251fbb;
  backdrop-filter: blur(3px);
}
.ab-fs-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
}
.ab-fs-dialog > .ab-fs-head,
.ab-fs-head {
  flex: 0 0 auto;
  position: static;
  z-index: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin: 0;
  background: #fff;
  border-bottom: 1px solid #dce8e2;
}
.ab-fs-heading {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
}
.ab-fs-heading [data-sd-navigation-title] {
  font-weight: 800;
  font-size: 18px;
  color: #1c3b34;
}
.ab-fs-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: #5b736a;
}
.ab-fs-dialog button.ow-back,
.ab-fs-dialog button.sd-workspace-close {
  flex: 0 0 auto;
  order: 0;
  margin-inline-start: 0;
  margin-inline-end: 0;
  min-height: 44px;
  min-width: 108px;
  border: 2px solid #1c3b34;
  border-radius: 10px;
  background: #fffdf8;
  color: #1c3b34;
  font-weight: 800;
  cursor: pointer;
}
.ab-fs-dialog button.ow-back:hover,
.ab-fs-dialog button.sd-workspace-close:hover {
  filter: brightness(0.97);
}
.ab-fs-dialog button.ow-back:focus-visible,
.ab-fs-dialog button.sd-workspace-close:focus-visible {
  outline: 3px solid #18879c;
  outline-offset: 2px;
}
.ab-fs-host {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.ab-fs-dialog .ab-editor,
.ab-fs-dialog .ab-fs-editor {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: none;
}
.ab-fs-dialog .ab-editor-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 14px 20px 8px;
}
.ab-fs-dialog .ab-editor h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.ab-fs-dialog .ab-help {
  margin: 0 0 10px;
}
.ab-fs-dialog .ab-line {
  margin: 8px 0;
  padding: 12px 14px;
}
.ab-fs-dialog .ab-line.ab-fs-focus {
  outline: 2px solid #1a7a58;
  outline-offset: 1px;
}
.ab-fs-dialog .ab-savebar,
.ab-fs-dialog .ab-fs-savebar {
  flex: 0 0 auto;
  position: static;
  bottom: auto;
  z-index: 2;
  margin: 0;
  border-radius: 0;
  border-width: 1px 0 0;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 18px #172b2a14;
}
.ab-fs-dialog .ab-save-actions button.primary,
.ab-fs-dialog [data-ab-save] {
  min-width: 200px;
  min-height: 48px;
  font-weight: 800;
  font-size: 16px;
  background: #176448;
  color: #fff;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
.ab-fs-dialog [data-ab-save]:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Compact entry on the one-screen order card (replaces the squeezed 420px strip). */
@media (min-width: 761px) {
  .ab-fs-entry {
    flex: 0 0 auto;
    margin-top: auto;
    max-height: none;
    overflow: visible;
    position: relative;
    z-index: 1;
  }
  .ab-fs-entry-title {
    margin: 0;
    padding: 6px 8px;
    border-radius: 6px;
    background: #e8eee6;
    color: #1c3b34;
    font-size: 14px;
    font-weight: 750;
  }
  .ab-fs-launch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 8px 4px 4px;
  }
  .ab-fs-launch p {
    margin: 0;
    flex: 1 1 220px;
    font-size: 13px;
    color: #45665b;
  }
  .ab-fs-launch .primary {
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    min-height: 42px;
    padding: 8px 16px;
    border: 0;
    border-radius: 10px;
    background: #176448;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
  }
}

/* Leftover iCount notes / product cards: stop RTL-start clip in the side column.
   Do not change overview overflow (v613 one-screen + v616 clip rules stay intact). */
@media (min-width: 761px) {
  .ow-side {
    min-width: 0;
    max-width: 100%;
  }
  .ow-side .ow-pending {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    overflow: auto;
    box-sizing: border-box;
    padding-inline-start: 12px;
    overflow-wrap: anywhere;
  }
  .ow-side .ow-pending li,
  .ow-side .ow-pending li strong,
  .ow-side .ow-pending p,
  .ow-side .ow-pending small {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .ow-side .wizard-line {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .ow-side .wizard-line > .actions {
    width: 100%;
    margin-top: 8px;
  }
}

@media (max-width: 760px) {
  .ab-fs-dialog,
  .ab-fs-entry .ab-fs-launch {
    /* Phone / factory keep the in-card editor; dialog still usable if opened. */
  }
  .ab-fs-dialog {
    width: calc(100vw - 12px);
    height: calc(100dvh - 12px);
    border-radius: 12px;
  }
}

/* Accordion: keep the scroller stable and never allow sideways scroll on shop desktops. */
.ab-fs-dialog .ab-editor-scroll{overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
.ab-fs-dialog .ab-acc-editor,.ab-fs-dialog .ab-line,.ab-fs-dialog .ab-row-head{max-width:100%}
.ab-fs-dialog .ab-panel{height:var(--ab-panel-h,600px)}
@media(max-width:760px){
  .ab-fs-dialog .ab-panel{height:auto;max-height:none;overflow:visible}
  .ab-fs-dialog .ab-search-results{min-height:200px;max-height:50vh}
}
@media(max-height:700px){
  .ab-fs-dialog .ab-editor h3,.ab-fs-dialog .ab-acc-editor .ab-help,.ab-fs-dialog .ab-cols{display:none}
  .ab-fs-dialog .ab-panel{height:auto;max-height:none;overflow:visible}
  .ab-fs-dialog .ab-search-results{min-height:160px;max-height:min(260px,38vh)}
  .ab-fs-dialog .ab-savebar{padding:8px 12px}
  .ab-fs-dialog .ab-savebar small{display:none}
}

/* assignment-row-blank-20261130-1: same empty-results collapse in the fullscreen dialog
   (this file also pins .ab-panel to 600px and would otherwise win). */
.ab-fs-dialog .ab-panel:not(:has(.ab-search-results:not(:empty))){height:auto;overflow:visible}
.ab-fs-dialog .ab-panel:has(.ab-search-results:not(:empty)){overflow:auto}
