/* Field components (fields.js): Combo Box, Clearable Text Field, Date
   Field and the translations globe, drawn as the Apple design system's
   TextField, DateField and ComboBox (FW-UI-182, M05; P38, P46, P63).
   One frame holds the text and its tools - never a field in a field. The
   field's own tool (calendar, arrow, globe) is a 20px slot 2px from the
   end; a second tool (the path) the next slot; the clear × stands 2px
   before the nearest tool, or 4px from the end without one. The text is
   leading. */
.combobox,.clearable{position:relative;display:block;width:100%;min-width:0;margin-top:4px}
.combobox>input,.clearable>input,.clearable>textarea,
.settings-row .combobox>input,.settings-row .clearable>input:not([type=checkbox]),
.settings-form .settings-row .clearable>input:not([type=checkbox]){width:100%;min-width:0;max-width:none;margin:0;padding-right:26px}
/* The Combo Box is the mockup's .cbx-btn: 9 px before its value, its
   focus the accent line in a soft accent ring; on iPhone the mockup's
   pop-up button that opens the system picker (FW-UI-208). */
.combobox>input,.settings-row .combobox>input{padding-left:9px;padding-right:50px;cursor:default}
.combobox>input:focus{cursor:text;box-shadow:0 0 0 3px var(--accent-soft-strong)}
.object-add .combobox{width:auto;min-width:220px;margin:0}
/* The arrow of a Combo Box: the pop-up's chevron in the tool slot. */
.combobox-arrow{position:absolute;top:0;bottom:0;right:2px;width:20px;display:flex;align-items:center;justify-content:center;color:var(--label-2);cursor:default}
.combobox-arrow::before{content:"";width:6px;height:6px;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;transform:translateY(-2px) rotate(45deg)}
/* One clear button in every control (P46): a plain × in a 20px square
   that answers the pointer. */
.combobox>button.field-clear,.clearable>button.field-clear{position:absolute;top:0;bottom:0;right:4px;display:grid;place-items:center;width:20px;min-width:0;height:20px;min-height:0;margin:auto 0;padding:0;border:0;border-radius:4px;background:transparent;box-shadow:none;color:var(--label-2);font:400 15px/1 var(--font-text);cursor:default;transition:background-color .12s,color .12s}
.combobox>button.field-clear:hover,.clearable>button.field-clear:hover{background:color-mix(in srgb,var(--label) 11%,transparent);color:var(--label)}
.combobox>button.field-clear:active,.clearable>button.field-clear:active{background:color-mix(in srgb,var(--label) 20%,transparent);transition:none}
.combobox>button.field-clear svg,.clearable>button.field-clear svg{width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.combobox>button.field-clear[hidden],.clearable>button.field-clear[hidden]{display:none}
.combobox>button.field-clear.text-button{right:24px}
/* The × shows while the field holds a value and the pointer or the focus
   is on it (P38); on a touch screen while it has the focus. */
:is(.combobox,.clearable):not(:hover,:focus-within)>button.field-clear{visibility:hidden}
@media(hover:none){:is(.combobox,.clearable):not(:focus-within)>button.field-clear{visibility:hidden}}
/* A pop-up button (DateField): a short list with its chevrons at the end -
   a same-origin image, as the page's CSP allows (img-src 'self'), never a
   data: URI; asserted here, after the area rules that set a ground. */
select:not([multiple]){padding-right:26px;background-image:url("/assets/popup-chevrons.5b194f67ef16.svg");background-repeat:no-repeat;background-position:right 8px center;background-size:8px 12px;}
/* Date and time fields, and a field with its globe: the tool at the end, × before it. */
.clearable.picker>input,.clearable.picker>textarea,.settings-row .clearable.picker>input,.settings-form .settings-row .clearable.picker>input:not([type=checkbox]){padding-right:50px}
.clearable.picker>button.field-clear.text-button{right:24px}
/* Browsers' own clear of search fields gives way to the component's; a
   search field keeps 28 px for it, as the mockup's .search.has-clear. */
.clearable>input::-webkit-search-cancel-button,input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none;display:none}
.clearable>input[type=search]{padding-right:28px}
/* The list of a Combo Box is a popover (ComboBox): the menu material, the
   choice under the pointer in the accent, the code or path under the name. */
.combobox-list{position:fixed;z-index:1000;margin:0;padding:6px;list-style:none;box-sizing:border-box;top:var(--menu-top,0px);left:var(--menu-left,0px);width:max-content;min-width:var(--menu-min-width,0px);max-width:var(--menu-max-width,calc(100vw - 16px));max-height:var(--menu-max-height,280px);padding-block:min(6px,calc(var(--menu-max-height,280px) / 2));overflow:auto;background:var(--menu);-webkit-backdrop-filter:blur(30px) saturate(1.6);backdrop-filter:blur(30px) saturate(1.6);color:var(--label);border-radius:var(--r-md);box-shadow:var(--popover-shadow);font:var(--type-mac-body)}
.combobox-list[hidden]{display:none}
.combobox-list li{padding:4px 10px;border-radius:5px;cursor:default;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.combobox-list li.active{background:var(--accent);color:var(--on-accent)}
.combobox-list li[aria-selected="true"]{font-weight:600}
.combobox-list li.combobox-empty{color:var(--label-2);cursor:default}
.combobox-list li.combobox-all{margin-bottom:4px;padding-bottom:9px;border-bottom:var(--hairline-w) solid var(--separator);border-radius:0}
.combobox-list .combobox-sub{display:block;overflow:hidden;text-overflow:ellipsis;color:var(--label-2);font:var(--type-mac-caption);font-weight:400}
.combobox-list li.active .combobox-sub{color:inherit;opacity:.82}
/* A choice that may not be taken: muted, with its lock and reason. */
.combobox-list li[data-locked],.combobox-list li:has(>.field-lock){color:var(--label-3)}
.combobox-list li[data-locked].active,.combobox-list li.active:has(>.field-lock){background:var(--fill-2);color:var(--label-3)}
.combobox-list li>.field-lock{width:11px;height:11px;margin-left:5px;vertical-align:-1px;background:none;color:inherit}
.combobox-list li>.field-lock svg{width:11px;height:11px}

/* Localized calendar input: the date, its × and its calendar in one frame (P63). */
.date-entry{position:relative;display:flex;align-items:center;gap:4px;min-width:0}
.date-entry .clearable{flex:1;min-width:0}
.date-entry input:not(.date-native){font-variant-numeric:tabular-nums}
.date-calendar,.field-action{position:absolute;top:0;bottom:0;right:2px;display:grid;place-items:center;width:20px;height:20px;min-width:0;min-height:0;margin:auto 0;padding:0;border:0;border-radius:4px;background:none;box-shadow:none;color:var(--label-2);cursor:default;transition:background-color .12s,color .12s}
.date-calendar:hover,.field-action:hover{background:color-mix(in srgb,var(--label) 11%,transparent)}
.field-action:hover{color:var(--label)}
.date-calendar:active,.field-action:active{background:color-mix(in srgb,var(--label) 20%,transparent);transition:none}
.date-calendar svg,.field-action svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
/* The globe's symbol is 15 px in a field as after a value (the mockup's .globe-btn svg). */
.field-action svg{width:15px;height:15px}
/* The globe of a translatable value read (the mockup's .globe-btn in .tr-v): beside the value, not over a field. */
.tr-v>.field-action{position:relative;top:auto;bottom:auto;right:auto;flex:none;width:22px;height:22px;margin:0 0 0 4px;color:var(--label-2)}
.tr-v>.field-action svg{width:15px;height:15px}
.tr-v>.field-action:hover{background:var(--fill-2);color:var(--label)}
/* Translation is the field's own tool (the globe), × before it. */
.field-with-action{position:relative;display:block;width:100%;min-width:0}
.settings-row .field-with-action{width:min(320px,100%)}
.field-with-action>.clearable{margin:0}
.field-with-action>input,.field-with-action>textarea{padding-right:50px}
.field-with-action:has(textarea) .field-action,.field-with-action:has(textarea) .field-clear{top:2px;bottom:auto;margin:0}
/* A missing translation (P39): an orange dot at the globe's top right, as
   an app icon's badge, ringed by the ground so it stays clear in light and
   dark; the same dot after each language without one. */
.field-action:is([data-globe-open],[data-relationship-translations-open],[data-translation-open],[data-translation-read])[data-missing]::after{content:"";position:absolute;left:auto;top:1px;right:1px;margin:0;width:7px;height:7px;border-radius:50%;background:var(--badge-warn);box-shadow:0 0 0 1.5px var(--control)}
.tr-missing::after{content:"";display:inline-block;width:7px;height:7px;margin-left:6px;border-radius:50%;background:var(--badge-warn);box-shadow:none;vertical-align:middle}
/* The browser opens the calendar where its date input is: it lies over the
   visible field, unseen, so the calendar opens under the field. */
input.date-native{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;margin:0!important;opacity:0;pointer-events:none}
/* Multi Select (FW-UI-058): a multiple link's values as Capsule chips, each
   with its ×, over an «Add…» Combo Box; read only, the chips alone and
   «+N more». */
.multi-select{display:flex;flex-direction:column;align-items:flex-start;gap:6px;width:100%;min-width:0;margin-top:4px}
.multi-select>.combobox{margin-top:0}
.multi-select[data-all-chosen]>.combobox{display:none}
.multi-select-chips{display:flex;flex-wrap:wrap;gap:4px;max-width:100%;margin:0;padding:0;list-style:none}
.multi-select-chips:empty{display:none}
.multi-select-chips>.badge{max-width:100%;min-width:0}
.multi-select-chips>.badge>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.field>.multi-select{grid-column:1/-1}
.multi-select-chips>.badge[hidden]{display:none}
/* A set with its current element (FW-UI-206): a chip is pressed to make it current, the green capsule. */
[data-current-of]:not(:has(>input[data-current-value]:disabled)) .multi-select-chips>.badge{cursor:pointer}
.multi-select-note{margin:4px 0 0}
.multi-select-remove{margin:0 -3px 0 1px;padding:0 3px;border-radius:var(--r-capsule);color:var(--label-2);line-height:1;cursor:default}
.multi-select-remove:hover,.multi-select-remove:focus-visible{background:color-mix(in srgb,var(--label) 11%,transparent);color:var(--label)}
.multi-select-more{cursor:default}
/* A checkbox list with a search (export Fields, Show codes only for;
   R54d538): one entry per line in a hairline box that scrolls at the
   Combo Box list's height, under its search field; the pair takes the
   value cell's width. */
.multi-check{flex:1;width:100%;min-width:0}
.multi-check-list{display:flex;flex-direction:column;align-items:flex-start;gap:2px;max-height:var(--menu-max-height,280px);margin-top:6px;padding:5px 10px;overflow:auto;overscroll-behavior:contain;border:var(--hairline-w) solid var(--control-line);border-radius:var(--r-md);background:var(--control)}
.multi-check-list>.check{margin:0;padding:4px 0}
.multi-check-list>.check>input{flex:none}

/* Field help (Q7 A, P75): the (i) stands right after the label, a 15px
   circled «i» in label-3 that shows while the pointer is over its row (or
   whatever holds it: a heading, a toolbar), while it has the keyboard's
   focus or its card is open, as the mockup's .help - not while the row's
   field is being typed in; always, at 22 px, on a phone or a touch screen
   (the PO 2026-11-18 Rdd8704, Rbe0c69). It opens the help in a popover. */
.field-why{appearance:none;display:inline-grid;place-items:center;flex:none;align-self:center;width:15px;height:15px;min-width:0;min-height:0;margin:0 8px 0 4px;padding:0;border:0;border-radius:50%;background:none;box-shadow:none;color:var(--label-3);cursor:default;transition:opacity .12s,color .12s}
/* The (i) is the accepted mockup's .help: its info icon, 14 px in a 15 px
   box on the Mac, 20 px in a 22 px box on iPhone (PO 2026-11-18: «и
   слишком большой, на макете меньше»). */
.field-why svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.field-why svg path{stroke-width:2}
.field-why:hover,.field-why:has(+:popover-open){color:var(--accent-text);border-color:currentColor}
.field-why:active{opacity:.6}
:not(:hover,label)>.field-why:not(:focus-visible,:has(+:popover-open)),:not(:hover)>label>.field-why:not(:focus-visible,:has(+:popover-open)){opacity:0}
.settings-row>:is(label,.settings-label):has(+.field-why){width:auto;max-width:200px}
.settings-row>.field-why{position:static;top:auto;margin:0 auto 0 -8px}
.value-cells .settings-card>.settings-row>.field-why{margin:0 0 0 4px}
/* The (i) card's title: the field's label, then the help (P75). */
.field-why-card>.why-title{margin:0 0 6px;font:var(--type-mac-emphasis);color:var(--label)}
/* The lock after a value that cannot change (FieldLock, FW-UI-159): the
   mockup's .lockbtn - a 16 px lock in label-3 on a label-2 button 20 px
   wide, 22 px high on iPhone (FW-UI-208); a click opens its card, which
   names only the reason. */
.field-lock{width:20px;height:20px;border-radius:4px;color:var(--label-2);vertical-align:middle}
.field-lock svg{width:16px;height:16px;stroke-width:1.6;color:var(--label-3)}
.field-lock:hover svg{color:var(--label-2)}
.field-lock.field-lock:hover{color:var(--label-2)}
.field-lock+.field-why-card{font-family:var(--font-text)}
/* A control at fault (P31, aria-invalid: a required field left empty, or a
   value found wrong): a thin red line and a pale red ring; the message
   under it names the fields. */
[aria-invalid="true"],.combobox:has(select[aria-invalid="true"]) input{border-color:color-mix(in srgb,var(--red) 70%,transparent)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--red) 25%,transparent)}

/* FW-UI-061: one control edge in settings value columns: every field of a
   group shares one width at the value column's trailing edge (P46); its
   text is leading, and its tools keep their slots. Tables are unaffected. */
.settings-row>div:not([popover]),.settings-row>.settings-value{position:relative}
.settings-row :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),textarea):not(.date-native){padding-right:26px;text-align:left}
.settings-row select:not([multiple],.plain-popup){text-align:left}
.settings-form .settings-row .clearable>input:not([type=checkbox]),
form[data-inline-edit][data-inline-edit] .settings-row:not(.value-cells *)>div :is(input:not([type=checkbox]):not([type=radio]),select:not(.plain-popup),textarea),
form[data-inline-edit][data-inline-edit] .settings-row:not(.value-cells *)>div :is(input:not([type=checkbox]):not([type=radio]),select:not(.plain-popup),textarea):focus{padding-right:26px;text-align:left}
.settings-form .settings-row .clearable.picker>input:not([type=checkbox]),
.settings-row :is(.combobox,.field-with-action,.clearable.picker)>input:not([type=checkbox]):not(.date-native),
form[data-inline-edit][data-inline-edit] .settings-row:not(.value-cells *)>div :is(.combobox,.field-with-action,.clearable.picker)>input:not([type=checkbox]){padding-right:50px}
.settings-row .combobox-arrow,.settings-row .date-calendar,.settings-row .field-action{right:2px}
.settings-row .combobox>button.field-clear.text-button,
.settings-row .clearable.picker>button.field-clear.text-button{right:24px}
.settings-row .clearable:not(.picker)>button.field-clear.text-button{right:4px}
/* A native single select in the value column is the pop-up button. */
.settings-row select{padding-right:26px;text-align-last:left}
.settings-row>div>select:not([multiple]){appearance:none}
/* In place (FW-UI-065), a field's tools show while it is edited; at rest
   its text, and a text value beside it, keep the pencil slot. */
form[data-inline-edit] .settings-row:not(.value-cells *):not(:focus-within)>div :is(.field-clear,.combobox-arrow,.date-calendar,.field-action:not(:where([data-globe-open]))){visibility:hidden}
/* A field shown in place at rest has no frame, so its pop-up shows no
   chevrons and no shadow until the row is hovered or edited; a value cell
   keeps its chevrons. */
form[data-inline-edit] .settings-row:not(.value-cells *):not(:hover):not(:focus-within)>div select{background-image:none}
form[data-inline-edit] .settings-row:not(.value-cells *)>div select:not(:focus),.value-cells .settings-card>.settings-row>div select:not(:focus){box-shadow:none}
/* A value cell keeps its tool column until M08 and M14 replace it; the
   tools in it are still the 20px squares of every field (P46). */
.value-cells .settings-card>.settings-row>div:not([popover]) :is(.date-calendar,.combobox-arrow,button.field-clear.text-button){height:20px}
/* Localized dates copy settings-date; its 180px cap must not shorten an
   input inside a full-width action wrapper. */
.settings-row .clearable>input.settings-date{max-width:none!important}
/* iPhone (700 px and less): the clear button and the tools keep their
   20px slots in the 34px field. */
@media(max-width:700px){
 /* Under 700 px the label and its (i) take their own line, the control
    the next one at the row's width (P46), above the shell's phone rule. */
 .settings-row.settings-row>:is(label,.settings-label):has(+.field-why){flex:0 1 auto;max-width:calc(100% - 28px)}
 .settings-row.settings-row:has(>div :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea))>div{flex:1 1 100%}
}
@media(max-width:700px){
 .field-why{opacity:1!important;width:22px;height:22px}
 .field-why svg{width:20px;height:20px}
 .field-lock{height:22px}
 .combobox>input,.settings-row .combobox>input{padding-left:10px}
 .combobox.combobox>input:is(:focus,:focus-visible){border-color:var(--control-line);box-shadow:none;outline:3px solid var(--focus);outline-offset:1px}
}
@media(hover:none){.field-why{opacity:1!important;width:22px;height:22px}.field-why svg{width:20px;height:20px}}
