/* Field, filter and grid upgrade styles. Prefix: .fx- */

/* ---------- cell states ---------- */
.chk.fx-null { border-style: dashed; opacity: .55; }
.fx-blanktext { color: var(--ink-3); font-style: italic; }
.g-cell.r > .fx-blanktext { text-align: right; }
.fx-bad { text-decoration: underline wavy var(--bad); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.g-cell.fx-miss { background-image: linear-gradient(90deg, var(--warn) 0 3px, transparent 3px); }
.g-cell.fx-miss.cur { background-image: none; }
.lnk.fx-golink { cursor: pointer; }
.lnk.fx-golink:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- −/+ stepper ---------- */
.fx-step { display: inline-flex; align-items: center; gap: 4px; width: 100%; justify-content: flex-end; min-width: 0; }
.fx-step-b { flex: none; width: 24px; height: 24px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink-2); font: 500 15px/1 var(--f-ui); }
.fx-step-b:hover { border-color: var(--ink-3); color: var(--ink); background: var(--surface-2); }
.fx-step-b:active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.fx-step-b[disabled] { opacity: .35; cursor: default; pointer-events: none; }
.fx-step-n { flex: 1; text-align: center; min-width: 2ch; }
.g-cell.fx-stepcell { padding: 0 6px; }
.fx-step-big { justify-content: flex-start; width: auto; gap: 6px; }
.fx-step-big .fx-step-b { width: 36px; height: 36px; border-radius: 8px; font-size: 18px; }
.fx-step-in { width: 88px; height: 36px; text-align: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); outline: 0; padding: 0 6px; }
.fx-step-in:focus { border-color: transparent; background: var(--field-focus); box-shadow: none; }
.fx-step-big .inp.fx-step-in { width: 88px; flex: none; }
.li .tr .fx-step { width: auto; }
@media (pointer: coarse) {
  .fx-step-b { width: 36px; height: 36px; border-radius: 8px; font-size: 18px; }
  .g-cell.fx-stepcell { padding: 0 2px; }
}

/* ---------- show the whole value ---------- */
.fx-exp { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink-2); z-index: 4; }
.fx-exp:hover { color: var(--accent); border-color: var(--accent-line); }
.pop.fx-full { display: grid; gap: 10px; }
.fx-full-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-3); }
.fx-full-v { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 50vh; overflow: auto; line-height: 1.5; }
.fx-full-rich .pills { flex-wrap: wrap; overflow: visible; }

/* ---------- phone: open-record control is always there ---------- */
@media (hover: none), (pointer: coarse) {
  .g-num .x.fx-open { display: grid; width: 36px; height: 100%; min-height: 30px; place-items: center; margin: 0 -6px 0 auto; border-radius: 0; }
  .g-num .n { display: none; }
}

/* ---------- menus, messages ---------- */
.fx-menu-note { padding: 6px 9px 8px; font-size: 12.5px; color: var(--ink-2); max-width: 280px; line-height: 1.4; }
.fx-msg { font-size: 12px; color: var(--warn); }
.fx-msg.bad { color: var(--bad); }
.fx-req { color: var(--warn); margin-left: 2px; }
.inp.fx-warn { border-color: var(--warn); }
.fx-unset { font-size: 12px; }
.fx-note { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-2); }

/* ---------- field editor ---------- */
.inp.fx-desc { margin-top: 6px; height: 32px; font-size: 12.5px; color: var(--ink-2); }
.fx-rules { display: grid; gap: 8px; }
.fx-rules:empty { display: none; }
.fx-rule { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; font-size: 13px; }
.fx-rule > span { flex: 1; min-width: 0; }
.fx-rule input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.inp.fx-small { width: 150px; flex: none; height: 32px; }
.fx-bad-t { color: var(--bad); }
.fx-lost { margin: 2px 0; padding: 0 0 0 16px; display: grid; gap: 2px; max-height: 180px; overflow: auto; }
.fx-lost li { overflow-wrap: anywhere; }

/* ---------- filters ---------- */
.fx-pair { display: flex; align-items: center; gap: 6px; flex: 1.6 1 0; min-width: 150px; }
.fx-pair .dim { font-size: 12px; }
.fx-pair .inp { min-width: 0; }
.inp.fx-pickbtn { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.inp.fx-pickbtn:hover { border-color: var(--ink-3); }
.fx-picksearch { width: 100%; margin-bottom: 6px; }
.fx-picklist { display: grid; gap: 2px; max-height: 300px; overflow: auto; }
.fx-pickname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-resetrow { margin-top: 6px; }

/* ---------- search suggestions ---------- */
.pop.fx-sugpop { padding: 4px 6px 6px; }
.fx-sug .fx-sug-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-sug .k { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* phone: popovers become bottom sheets; a fixed desktop width must not push them off screen */
@media (max-width: 760px) { .pop.sheet { width: auto !important; } }
