/* Keep the existing close controls reachable while a dialog scrolls. */
.so-control-identification{display:flex;gap:8px;align-items:center;flex:0 1 auto;min-width:0}
.so-control-identification-block{width:145px;max-width:100%;min-width:0;padding:5px 10px;border:1px solid #dee4ea;border-radius:7px;background:#e8f1f5;line-height:1.5}
.so-control-identification-block:nth-child(2){background:#f0eff7}
.so-control-identification-block>span{display:block;font-size:11px;color:#607282;margin-bottom:1px}
.so-control-identification-block>strong{display:block;font-size:15px;font-weight:600;color:#243247;overflow-wrap:anywhere}
.so-control-test-label{font-size:11px;color:#607282}
html #so-form>.detail-head.has-control-identification>#so-title{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:1050px){html #so-form>.detail-head.has-control-identification{flex-wrap:wrap}}
html[data-layout="mobile"] #so-form>.detail-head>.so-control-identification{grid-column:1/3;grid-row:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
html[data-layout="mobile"] .so-control-identification-block{width:auto}
html[data-layout="mobile"] .so-control-test-label{grid-column:1/-1}
@media screen {
  html dialog[open] :is(.detail-head,.dialog-head) {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #fff;
    isolation: isolate;
    padding-block: 12px;
    align-items: flex-start;
    flex-wrap: nowrap;
    box-shadow: 0 5px 7px -7px #18233b70;
  }
  html dialog[open] :is(.detail-head,.dialog-head) > :is(h1,h2,h3) {
    min-width: 0;
    flex: 1 1 auto;
    overflow-wrap: anywhere;
  }
  html dialog[open] :is(.detail-head,.dialog-head) > :last-child {
    flex-shrink: 0;
    margin-left: auto;
  }
  html dialog[open] :is(.product-header-actions,.sale-title-actions,.so-header-actions) {
    justify-content: flex-end;
  }
  html[data-layout="mobile"] dialog[open] :is(.detail-head,.dialog-head) > :is(.product-header-actions,.sale-title-actions,.so-title-actions,.so-header-actions) {
    flex-shrink: 1;
    min-width: 0;
    max-width: 70%;
  }
  html[data-layout="mobile"] #so-form > .detail-head {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr)) auto;
    gap: 8px;
  }
  html[data-layout="mobile"] #so-title {
    grid-column: 1 / 3;
    grid-row: 1;
    margin: 0;
  }
  html[data-layout="mobile"] #so-form > .detail-head > .so-title-actions {
    display: contents;
  }
  html[data-layout="mobile"] #so-close {
    grid-column: 3;
    grid-row: 1;
    margin: 0;
  }
  html[data-layout="mobile"] .so-title-actions > button:not(#so-close) {
    margin: 0;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
  }
  html[data-layout="mobile"] #so-share-open { grid-column: 1 / 3; }
  html[data-layout="mobile"] #so-print-open { grid-column: 3; }
  html[data-layout="mobile"] .so-title-actions > button:not(#so-close):not(#so-share-open):not(#so-print-open) { grid-column: 1 / -1; }
}
@media print {
  dialog :is(.detail-head,.dialog-head) {
    position: static !important;
    box-shadow: none !important;
  }
}

@media screen {
 html #so-multi-test-dialog #so-multi-test-form > .detail-head {display:flex;flex-wrap:wrap;gap:8px;align-items:center}
 html #so-multi-test-dialog #so-multi-test-form > .detail-head > .multi-window-actions {order:-1;flex:0 0 100%;width:100%;max-width:none;display:flex;justify-content:flex-end;align-items:center;gap:8px;margin:0}
 html #so-multi-test-dialog #so-multi-test-form > .detail-head > h2 {flex:1 1 240px;margin:0}
 html #so-multi-test-dialog .multi-window-actions > button {flex:0 0 auto;margin:0}
}

@media screen {
 html #so-dialog #so-form > .detail-head {display:flex;flex-wrap:wrap;align-items:center;gap:8px}
 html #so-dialog #so-form > .detail-head > .so-window-actions {order:-1;display:flex;flex:0 0 100%;width:100%;max-width:none;justify-content:flex-end;align-items:center;gap:8px;margin:0}
 html #so-dialog #so-form > .detail-head > .so-title-actions {display:flex;flex-wrap:wrap;flex:0 1 auto;max-width:100%;gap:8px;margin-left:auto}
 html #so-dialog #so-form > .detail-head > h2 {flex:1 1 200px;margin:0}
 html #so-dialog .so-window-actions > button {flex:0 0 auto;grid-column:auto;grid-row:auto;margin:0}
}

@media screen {
 html #order-dialog .dialog-head > .sale-title-actions:has(#purchase-print-open:not([hidden])) {display:grid;grid-template-columns:repeat(4,max-content);gap:8px;align-items:center;justify-content:end;max-width:100%}
 html #order-dialog .sale-title-actions:has(#purchase-print-open:not([hidden])) > #purchase-consult-material {grid-column:1/-1;grid-row:2;justify-self:end;width:auto;max-width:none;white-space:nowrap;margin:0}
}

@media screen and (max-width:600px){
 html #order-dialog .dialog-head:has(#purchase-print-open:not([hidden])){flex-wrap:wrap}
 html #order-dialog .dialog-head > .sale-title-actions:has(#purchase-print-open:not([hidden])){flex:1 1 100%;grid-template-columns:minmax(0,1fr) repeat(3,auto);width:100%;min-width:0}
}

#entry-dialog .entry-window-actions{display:flex;align-items:center;gap:8px;margin-left:auto;flex-shrink:0}
#entry-dialog .entry-window-actions>button{margin:0;flex:none}
