/* =========================================================================
   "Edit default card" drawer of the record page's association cards. Rules copied from the
   28 Oct design: assets/css/record-layout-editor.css (lines 21-29, 38-46, 94-95, 96-97, 101-102, 123, 128, 140-148, 152-158, 163-168, 177-206, 211-212, 262-265, 353, 356-376),
   and its popover box from data-tools.css:123 (.dt-pop as .le-pop).
   ========================================================================= */
.le-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 18px; font: inherit; font-size: 14.5px; font-weight: 600; line-height: 1; white-space: nowrap; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s; }
.le-btn:hover { background: var(--surface-hover); }
.le-btn:focus-visible, .le-ibtn:focus-visible, .le-linkbtn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.le-btn[disabled] { opacity: .5; cursor: not-allowed; }
.le-btn--primary { color: #fff; background: var(--brand); border-color: var(--brand); }
.le-btn--primary:hover { background: var(--brand-hover, #1d47c2); border-color: var(--brand-hover, #1d47c2); }
.le-btn--sm { height: 34px; padding: 0 14px; font-size: 13.5px; }
.le-btn--block { width: 100%; margin: 6px 0 12px; }
.le-btn svg { width: 16px; height: 16px; flex: none; }
.le-ibtn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; padding: 0; font: inherit; font-size: 14px; color: var(--text-muted); background: none; border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; }
.le-ibtn:hover { color: var(--text); background: var(--surface-hover); }
.le-ibtn[disabled] { opacity: .35; cursor: not-allowed; background: none; }
.le-ibtn svg { width: 17px; height: 17px; }
.le-ibtn--sm { width: 28px; height: 28px; }
.le-ibtn--sm svg { width: 14px; height: 14px; }
.le-ibtn--bar { color: #fff; }
.le-ibtn--bar:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.le-ibtn--box { width: 42px; height: 42px; border-color: var(--border-strong); }
.le-prow.is-drag { opacity: .45; }
.le-prow.is-over { box-shadow: 0 -3px 0 var(--brand); }
.le-grip { flex: none; display: inline-flex; color: var(--text); }
.le-grip svg { width: 14px; height: 20px; fill: currentColor; }
.le-info { display: inline-flex; color: var(--text-muted); vertical-align: middle; }
.le-info svg { width: 14px; height: 14px; }
.le-empty { position: relative; margin: 0; padding: 22px 14px; font-size: 13.5px; color: var(--text-muted); text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.le-muted { margin: 0 0 14px; font-size: 13.5px; color: var(--text-muted); }
.le-field { display: block; margin: 0 0 12px; }
.le-field > span, .le-field > label > span { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.le-input { width: 100%; height: 42px; padding: 0 12px; font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.le-input:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
.le-input--sm { height: 34px; font-size: 13.5px; }
.le-row { display: flex; gap: 10px; align-items: center; }
.le-check { display: flex; align-items: center; gap: 8px; padding: 7px 8px; font-size: 14px; border-radius: 6px; cursor: pointer; }
.le-check:hover { background: var(--surface-hover); }
.le-check input { accent-color: var(--brand); width: 16px; height: 16px; }
.le-dov { position: fixed; inset: 0; z-index: 1300; display: flex; justify-content: flex-end; background: rgba(16, 24, 40, .25); animation: le-fade .15s ease-out; }
.le-drawer { display: flex; flex-direction: column; width: 480px; max-width: 100%; height: 100%; background: var(--surface); box-shadow: -12px 0 32px rgba(16, 24, 40, .18); animation: le-in .2s ease-out; }
.le-drawer--edit { width: min(800px, 100%); }
@keyframes le-fade { from { opacity: 0; } }
@keyframes le-in { from { transform: translateX(40px); opacity: .4; } }
.le-dhead { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 18px 24px 18px 40px; border-bottom: 1px solid var(--border); }
.le-dhead h2 { margin: 0; font-size: 21px; }
.le-dbody { flex: 1; overflow-y: auto; padding: 20px 24px; }
.le-dfoot { flex: none; display: flex; gap: 8px; padding: 20px 40px; border-top: 1px solid var(--border); }
.le-search { position: relative; display: block; margin-bottom: 12px; }
.le-search input { width: 100%; height: 42px; padding: 0 38px 0 12px; font: inherit; font-size: 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.le-search input:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.le-search svg { position: absolute; right: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.le-edit { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.le-edit__form { overflow-y: auto; padding: 20px 20px 24px 22px; border-right: 1px solid var(--border); }
.le-edit__prev { display: flex; flex-direction: column; gap: 12px; min-height: 0; padding: 24px 20px; background: var(--surface-2, #f5f8fa); }
.le-edit__pcard { flex: 1; min-height: 0; overflow-y: auto; }
.le-cap { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.le-erow { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.le-linkbtn { padding: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--brand); background: none; border: 0; cursor: pointer; }
.le-linkbtn:hover { text-decoration: underline; }
.le-viewspop { padding: 8px 10px; font-size: 13px; }
.le-viewspop p { margin: 0 0 6px; color: var(--text-muted); }
.le-viewspop ul { margin: 0; padding-left: 18px; }
.le-iname { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 0 0 4px; font-size: 13px; color: var(--text-muted); }
.le-iname [data-iname] { color: var(--text); }
.le-esec { padding: 18px 0 4px; margin-top: 14px; border-top: 1px solid var(--border); }
.le-esec h3 { margin: 0 0 6px; font-size: 16px; }
.le-esec p { margin: 0 0 8px; font-size: 14px; color: var(--text); }
.le-esec__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.le-props { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.le-prow { display: flex; align-items: center; gap: 6px; cursor: grab; }
.le-prow select { flex: 1; min-width: 0; }
.le-ppop .le-search { margin: 4px 4px 8px; }
.le-ppop__list { max-height: 300px; overflow-y: auto; }
.le-pgroup > span { display: block; padding: 8px 8px 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); }
.le-pcard { padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.le-pcard header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.le-pcard header strong { font-size: 15px; }
.le-fakebtn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; font-size: 12px; font-weight: 600; border: 1px solid var(--border-strong); border-radius: 6px; }
.le-plist { margin: 0; display: grid; gap: 12px; }
.le-plist dt { font-size: 12.5px; color: var(--text-muted); }
.le-plist dd { margin: 2px 0 0; font-size: 14px; }
.le-mright { margin-left: auto; display: inline-flex; }
.le-mright svg { width: 14px; height: 14px; }
.le-txtbtn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 4px; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--text); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.le-txtbtn:hover { background: var(--surface-hover); }
.le-txtbtn svg { width: 10px; height: 10px; }
.le-txtbtn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.le-btn--danger { color: #fff; background: #d92d20; border-color: #d92d20; }
.le-orow { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; font-size: 13.5px; }
.le-txtsel { padding: 4px 6px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.le-txtsel[disabled] { color: var(--text-muted); cursor: default; }
.le-fsrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; font-size: 14.5px; font-weight: 600; }
.le-fsrow--line { border-top: 1px solid var(--border); }
.le-fsrow .le-txtbtn svg { width: 15px; height: 15px; }
.le-fnote { margin: -6px 0 6px; font-size: 13px; color: var(--text-muted); }
.le-qchips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin: -6px 0 8px; }
.le-qchip { padding: 3px 8px; font-size: 13px; font-weight: 600; background: var(--surface-3, #eef2f6); border: 1px solid var(--border-strong); border-radius: 4px; }
.le-sortctl { display: inline-flex; align-items: center; gap: 6px; }
.le-sortctl .le-ibtn[aria-pressed="true"] { color: var(--text); background: var(--surface-3, #eef2f6); border-color: var(--text); }
.le-pcard--assoc .le-pacard { padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.le-pacard p { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 12.5px; }
.le-pacard b { font-weight: 600; }
.le-pav { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; font-size: 9px; font-weight: 700; background: var(--surface-3, #eef2f6); border-radius: 50%; }
.le-pprim { padding: 1px 6px; font-size: 11px; font-weight: 600; color: #00704a; background: #e5f8f0; border: 1px solid #8fd6b5; border-radius: 4px; }
.le-pline { color: var(--text-muted); }
.le-plbl, .le-pall { font-size: 12px; font-weight: 700; color: var(--brand); }
.le-pall { margin: 0; }
.le-fakeadd { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; }
.le-fakeadd svg { width: 11px; height: 11px; }

/* the design's DT.pop box (data-tools.css:123), anchored inside the drawer */
.le-pop { position: absolute; z-index: 5; min-width: 200px; max-width: calc(100vw - 16px); max-height: min(420px, calc(100vh - 24px)); overflow-y: auto; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 12px 32px rgba(16, 24, 40, .16); }
.le-anchor { position: relative; }
.le-menu { display: grid; }
.le-menu button { padding: 8px 10px; font: inherit; font-size: 14px; text-align: left; color: var(--text); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.le-menu button:hover, .le-menu button:focus-visible { background: var(--surface-hover); outline: 0; }
.le-menu .le-danger { color: #d92d20; }
.le-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the internal-name modal (design DT.modal) */
.le-mov { position: fixed; inset: 0; z-index: 1400; display: flex; align-items: center; justify-content: center; background: rgba(16, 24, 40, .35); }
.le-modal { width: min(440px, calc(100vw - 32px)); padding: 22px 24px; background: var(--surface); border-radius: var(--radius-sm); box-shadow: 0 20px 48px rgba(16, 24, 40, .24); }
.le-modal h3 { margin: 0 0 14px; font-size: 18px; }
.le-modal__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
@media (max-width: 860px) {
  .le-edit { grid-template-columns: 1fr; overflow-y: auto; }
  .le-edit__form { overflow: visible; border-right: 0; }
  .le-dhead { padding: 14px 16px; }
  .le-dfoot { padding: 14px 16px; }
}
