/* TEST 15.05 / REV142 FIX27 — shared mobile field geometry.
   Canonical Fascicolo/Pratica detail grids are intentionally excluded here:
   they own their READ/EDIT geometry in mobile.css to prevent post-cascade overrides. */
@media (max-width:720px) {
  :root { --stgpt-edit-field-height:var(--stgpt-detail-control-h); --stgpt-edit-field-font:var(--stgpt-detail-value-font); --stgpt-edit-action-size:var(--stgpt-detail-control-h); }
  /* Main application forms, quick creators and anagrafica edit form. */
  :is(.stgpt-creator-modal,#stgptQuickCreatorBackdrop)
    .field :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([data-afield="cf"]):not([data-afield="birthDate"]):not([id="qcCf"]):not([id="qcLegalCf"]):not(.unified-date-text),select,.readonly-value) {
    box-sizing:border-box; min-width:0; height:var(--stgpt-edit-field-height)!important;
    min-height:var(--stgpt-edit-field-height)!important; font-size:var(--stgpt-edit-field-font)!important;
  }
  :is(.stgpt-creator-modal,#stgptQuickCreatorBackdrop)
    .field textarea { font-size:var(--stgpt-edit-field-font)!important; }
  /* Standalone action alongside a field: same height and width as the field height. */
  :is(.stgpt-creator-modal,#stgptQuickCreatorBackdrop)
    .field .inline-field-action { position:relative; min-width:0; width:100%; }
  :is(.stgpt-creator-modal,#stgptQuickCreatorBackdrop)
    .field .inline-field-action:has(>button.normalize) > input { width:100%; padding-right:46px!important; }
  :is(.stgpt-creator-modal,#stgptQuickCreatorBackdrop)
    .field .inline-field-action > button.normalize {
    position:absolute!important; right:3px!important; top:3px!important;
    width:36px!important; min-width:36px!important; height:36px!important; min-height:36px!important;
    margin:0!important; display:flex!important; align-items:center; justify-content:center;
    z-index:1; box-sizing:border-box;
  }
  /* Other adjacent icon buttons (not header, footer or pill actions). */
  :is(.stgpt-creator-modal,#stgptQuickCreatorBackdrop)
    .field .inline-field-action > button:not(.normalize):not(.cf-magic) {
    box-sizing:border-box; height:var(--stgpt-edit-action-size)!important;
    min-height:var(--stgpt-edit-action-size)!important;
  }
  /* All editable field focus states preserve the neutral fill and border. */
  :is(.stgpt-creator-modal,#stgptQuickCreatorBackdrop)
    .field :is(input,select,textarea):focus:not([data-pro142-text]) { background-color:#f7fafb!important; border-color:#dce3e5!important; box-shadow:none!important; outline:none!important; }
  :is(.stgpt-creator-modal,#stgptQuickCreatorBackdrop)
    .field .inline-field-action:focus-within { box-shadow:none!important; outline:none!important; }
}
