/* FORM_CONTROLS.md — one geometry owner, usable under style-src/img-src 'self'.
 * No image/data URL, inline styles, popup replacement or authored-content selector. */
.morrow-dropdown {
 --morrow-dropdown-arrow-size:16px;
 --morrow-dropdown-inset:12px;
 --morrow-dropdown-gap:8px;
 --morrow-dropdown-native-border-reserve:2px;
 --morrow-dropdown-label-reserve:calc(var(--morrow-dropdown-arrow-size) + var(--morrow-dropdown-inset) + var(--morrow-dropdown-gap) + var(--morrow-dropdown-native-border-reserve));
 --morrow-dropdown-control-end-padding:0px;
 --morrow-dropdown-min-inline-size:calc(var(--morrow-dropdown-label-reserve) + var(--morrow-dropdown-inset) + 2ch + 2px);
 box-sizing:border-box;min-inline-size:0;max-inline-size:100%;
}
.morrow-dropdown[data-dropdown-density="compact"] {
 --morrow-dropdown-arrow-size:12px;--morrow-dropdown-inset:10px;--morrow-dropdown-gap:6px;
}
.morrow-dropdown:not(.morrow-native-select) {
 display:flex;align-items:center;gap:0;
 padding-inline-end:var(--morrow-dropdown-control-end-padding);text-align:start;
}
.morrow-dropdown-label {
 flex:1 1 auto;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start;
}
.morrow-dropdown-arrow {
 display:grid;place-items:center;flex:0 0 var(--morrow-dropdown-arrow-size);
 inline-size:var(--morrow-dropdown-arrow-size);block-size:var(--morrow-dropdown-arrow-size);
 min-inline-size:var(--morrow-dropdown-arrow-size);pointer-events:none;font-style:normal;
 /* The slot owns its safety spacing. A legacy parent's extra gap/padding
  * may add space but cannot shrink the canonical label gap or border inset. */
 margin-inline-start:var(--morrow-dropdown-gap);margin-inline-end:var(--morrow-dropdown-inset);
}
.morrow-dropdown-arrow::before {
 content:"";box-sizing:border-box;inline-size:50%;block-size:50%;
 /* The down glyph itself is nondirectional; only its placement is logical. */
 border-right:2px solid currentColor;border-bottom:2px solid currentColor;
 transform:translateY(-15%) rotate(45deg);
}
/* Both items occupy the native field's same grid cell. Its padding reserves
 * the label/arrow gap; the decoration never captures the field's pointer input.
 * Two pixels reserve the strongest existing field border, not a focus outline. */
.morrow-native-select {
 --morrow-dropdown-control-end-padding:var(--morrow-dropdown-label-reserve);
 display:inline-grid;grid-template-columns:minmax(0,1fr);align-items:center;align-self:stretch;
 /* Field owners may supply a semantic foreground; disabled/forced colours win. */
 vertical-align:middle;min-inline-size:var(--morrow-dropdown-min-inline-size);color:var(--morrow-native-field-color,inherit);
}
.morrow-native-select > .morrow-native-select-control {
 /* A definite-size field does not stretch: stretch then falls back to start.
  * Centre it in the SAME track as the arrow, including multi-line tall rows.
  * Header100% fill and all owned heights/minima stay independently owned. */
 grid-area:1/1;box-sizing:border-box;inline-size:100%;max-inline-size:100%;align-self:center;
 min-inline-size:var(--morrow-dropdown-min-inline-size);
 appearance:none;-webkit-appearance:none;padding-inline-end:var(--morrow-dropdown-control-end-padding);
 overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
/* Zero-specificity preferred size, NOT a global minimum: existing physical or
 * logical field minima still clamp it, and explicit compact heights can be
 * smaller. A32px minimum would incorrectly clamp even a31px owned height.
 * This sheet precedes owner styles. Its first layer stays below the later
 * compatibility layer and every unlayered owner. Header fill is header-owned. */
@layer morrow-dropdown-fallback {
 :where(.morrow-native-select > .morrow-native-select-control) {
  block-size:32px;
 }
}
.morrow-native-select > .morrow-dropdown-arrow {
 grid-area:1/1;justify-self:end;margin-inline-start:0;
 margin-inline-end:calc(var(--morrow-dropdown-inset) + var(--morrow-dropdown-native-border-reserve));
}
.morrow-native-select:has(>select:disabled) {color:var(--morrow-overlay-disabled-text,GrayText);}
@media (forced-colors:active) {
 .morrow-dropdown-arrow {forced-color-adjust:none;color:ButtonText;}
 .morrow-dropdown:disabled > .morrow-dropdown-arrow,
 .morrow-native-select:has(>select:disabled) > .morrow-dropdown-arrow {color:GrayText;}
}
