/* Shared controls and portalled menus, including dynamically created forms. */
.pos-select { display: block; position: relative; width: 100%; min-width: 0; margin-top: 6px; }
fieldset:has(.pos-select) { min-inline-size: 0; }
.pos-select[hidden], .pos-select-popup[hidden] { display: none !important; }
select.pos-native-select { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; margin: 0 !important; padding: 0 !important; opacity: 0 !important; pointer-events: none; }
.pos-select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-width: 0; min-height: 44px; margin: 0; border: 1px solid #789c8d; border-radius: 10px; padding: 11px; background: #fcfffd; color: var(--ink, #153a2d); font: inherit; font-weight: 400; text-align: left; cursor: pointer; box-shadow: none; }
.pos-select-trigger:hover:not(:disabled) { background: #f1f8f4; border-color: var(--green, #176b50); }
.pos-select-trigger:focus-visible { outline: 2px solid var(--green, #176b50); outline-offset: 2px; }
.pos-select-value { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-select-arrow { flex: 0 0 auto; font-size: 17px; line-height: 1; color: #4b6d5e; transition: transform .12s; }
.pos-select.is-open .pos-select-arrow { transform: rotate(180deg); }
.pos-select-trigger:disabled { cursor: not-allowed; opacity: .55; background: #eef3ef; }
.pos-select-popup { position: fixed; z-index: 1000; display: flex; flex-direction: column; gap: 6px; box-sizing: border-box; max-width: calc(100vw - 24px); padding: 7px; border: 1px solid #9ab5a7; border-radius: 13px; background: #fcfffd; color: var(--ink, #153a2d); font-size: 13px; box-shadow: 0 10px 34px #173c2c29; overflow: hidden; }
.pos-select-popup .pos-select-search { flex: 0 0 auto; width: 100%; box-sizing: border-box; min-height: 40px; margin: 0 0 2px; border: 1px solid #b2c6bb; border-radius: 8px; padding: 9px; font: inherit; background: #fff; }
.pos-select-search[hidden], .pos-select-hint[hidden], .pos-select-empty[hidden] { display: none !important; }
.pos-select-options { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.pos-select-option { display: flex; align-items: flex-start; gap: 8px; min-height: 38px; box-sizing: border-box; border-radius: 7px; padding: 10px 8px; line-height: 1.45; cursor: pointer; }
.pos-select-option-text { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.pos-select-marker { flex: 0 0 16px; width: 16px; color: var(--green, #176b50); font-weight: 700; }
.pos-select-value.has-status { display: flex; align-items: center; gap: 10px; flex: 1; }
.pos-select-value-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-select-option.has-status { display: grid; grid-template-columns: auto minmax(0, 1fr) 16px; align-items: start; gap: 10px; }
.pos-select-option.has-status .pos-select-marker { text-align: right; }
.pos-select-status { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; padding: 2px 7px; border: 1px solid #b9c6c0; border-radius: 6px; background: #f0f4f1; color: #466255; font-size: 12px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.pos-select-status-icon { width: 12px; text-align: center; font-weight: 700; }
.pos-select-status[data-state="failed"] { background: #fff0ed; border-color: #e8b2a7; color: #9c3329; }
.pos-select-status[data-state="queued"], .pos-select-status[data-state="processing"] { background: #eef4ff; border-color: #b2c8e9; color: #315b8b; }
.pos-select-status[data-state="pending"], .pos-select-status[data-state="deferred"] { background: #fff6e6; border-color: #dec596; color: #77551c; }
.pos-select-status[data-state="completed"] { background: #e8f4ed; border-color: #a7c8b6; color: #246648; }
.pos-select-option[aria-selected="true"] { background: #e5f3eb; }
.pos-select-option.is-active { background: #d8ebdf; outline: 1px solid #8fb49e; outline-offset: -1px; }
.pos-select-option[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.pos-select-popup .pos-select-hint, .pos-select-popup .pos-select-empty { flex: 0 0 auto; margin: 0; padding: 5px 8px; color: #61796c; line-height: 1.5; font-size: 12px; }
.section-title > .pos-select { width: auto; min-width: 130px; }
@media (prefers-reduced-motion: reduce) { .pos-select-arrow { transition: none; } }
