/* Shared screen layout. Controls retain their names, values and native semantics. */
@media screen {
  .mf-theme-technical .mf-form-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .mf-theme-technical .mf-form-columns-wide {grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) !important;}
  .mf-theme-technical .mf-form-columns > * {min-width: 0;}
  @media (max-width: 760px) {
    .mf-theme-technical .mf-form-columns {grid-template-columns: minmax(0, 1fr) !important;}
  }
  .mf-theme-technical .mf-content [data-mf-aligned-label] {
    box-sizing: border-box;
    min-block-size: var(--mf-label-block-size);
  }

  /* Native OS popups can exceed the viewport at Windows display scaling.
     Progressive enhancement: unsupported browsers keep their native select. */
  @supports (appearance: base-select) {
    .mf-theme-technical .mf-content select[data-mf-select-anchor],
    .mf-theme-technical .mf-content select[data-mf-select-anchor]::picker(select) {
      appearance: base-select;
    }
    .mf-theme-technical .mf-content select[data-mf-select-anchor] {
      anchor-name: var(--mf-select-anchor);
      height: auto;
      white-space: normal;
      overflow-wrap: anywhere;
      text-align: start;
      gap: 8px;
      background-image: none;
    }
    .mf-theme-technical .mf-content select[data-mf-select-anchor]::picker-icon {
      flex: 0 0 auto;
      margin-inline-start: auto;
    }
    .mf-theme-technical .mf-content select[data-mf-select-anchor]::picker(select) {
      box-sizing: border-box;
      position-anchor: var(--mf-select-anchor);
      position-area: none;
      top: anchor(bottom);
      bottom: auto;
      position-try-fallbacks: flip-block;
      --mf-picker-size: min(max(anchor-size(width), 16rem), 42rem, calc(100vw - 24px));
      inline-size: var(--mf-picker-size);
      min-inline-size: 0;
      max-inline-size: min(42rem, calc(100vw - 24px));
      inset-inline-start: clamp(12px, anchor(left), calc(100vw - var(--mf-picker-size) - 12px));
      inset-inline-end: auto;
      max-block-size: min(24rem, 60vh);
      margin-block: 4px;
      overflow: auto;
      padding: 4px;
      border: 1px solid #b5c3cf;
      border-radius: 4px;
      background: #fff;
      color: #243447;
      box-shadow: 0 4px 14px #24344726;
      font: inherit;
      text-align: start;
    }
    .mf-theme-technical .mf-content select[data-mf-select-anchor] option {
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: normal;
      text-indent: 0;
      min-inline-size: 0;
      padding: 8px 10px;
      gap: 8px;
      color: #243447;
      background: #fff;
      font: inherit;
    }
    .mf-theme-technical .mf-content select[data-mf-select-anchor] option:is(:hover,:focus-visible,:checked) {
      color: #243447;
      background: #eaf0f5;
    }
    .mf-theme-technical .mf-content select[data-mf-select-anchor] option:disabled {color: #687582;}
    .mf-theme-technical .mf-content select[data-mf-select-anchor] option::checkmark {flex: 0 0 auto;}
    @media (forced-colors: active) {
      .mf-theme-technical .mf-content select[data-mf-select-anchor] option:is(:hover,:focus-visible,:checked) {
        color: HighlightText;
        background: Highlight;
      }
    }
  }
}
