/* Modais de consulta seguem a identidade dos editores de cadastro. */
.consultation-dialog {
  width:min(var(--dialog-width,980px),calc(100vw - 32px)); max-width:none;
  max-height:calc(100dvh - 32px); padding:0; overflow:hidden;
  border:1px solid #d6e3f6; border-radius:12px;
  color:var(--text); background:var(--surface); box-shadow:0 20px 65px #0004;
}
.consultation-dialog[open] { display:flex; flex-direction:column; }
.consultation-dialog::backdrop { background:rgb(18 37 67 / 62%); backdrop-filter:blur(4px); }
.consultation-dialog .editor-header {
  position:relative; isolation:isolate; flex:none; min-height:72px; padding:10px 18px;
  border-bottom:0; background:linear-gradient(110deg,#0c2343,#122e55); color:#fff;
}
.dialog-data-header > h3 { flex:1; min-width:0; overflow-wrap:anywhere; }
.dialog-data-header > :is(button,form) { flex:none; }
.dialog-data-header > .dialog-header-data {
  flex:none; width:210px; height:3px; opacity:.65; pointer-events:none; user-select:none;
  background:linear-gradient(90deg,#39a9e6,#4acbd3 50%,#a8d136);
  mask-image:repeating-linear-gradient(90deg,#000 0 3px,transparent 3px 14px);
}
.consultation-dialog .editor-header h3 { min-width:0; font-size:18px; font-weight:700; line-height:1.3; overflow-wrap:anywhere; }
.consultation-dialog .editor-header form { margin:0; flex:none; }
.consultation-dialog .editor-header .button {
  width:32px; height:32px; min-height:32px; padding:0; font-size:20px;
  background:transparent; border:1px solid #ffffff30; color:#fff; border-radius:7px;
}
.consultation-dialog .editor-header .button:hover { background:#ffffff14; }
.consultation-dialog .editor-content { display:flex; flex-direction:column; min-height:0; padding:16px 18px; overflow:hidden; font-size:13px; line-height:1.5; }
.consultation-dialog .editor-section { display:flex; flex-direction:column; min-height:0; padding:8px 12px; border:1px solid #dbe7f8; border-radius:8px; }
.consultation-dialog .editor-section-heading { flex:none; gap:8px; margin-bottom:8px; }
.consultation-dialog .editor-section-heading>div { min-width:0; overflow-wrap:anywhere; }
.consultation-dialog .editor-section-heading h4 { font-size:14px; line-height:16px; }
.consultation-dialog .editor-section-heading p { margin:0; font-size:12px; line-height:14px; }
.consultation-dialog .section-icon svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.consultation-dialog .table-scroll,.consultation-grid-scroll { min-height:0; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; border:1px solid var(--line); border-radius:6px; }
.consultation-dialog .layouts-table,.consultation-grid { table-layout:fixed; min-width:0; font-size:13px; }
.consultation-dialog .layouts-table th,.consultation-dialog .layouts-table td,.consultation-grid th,.consultation-grid td { height:36px; padding:5px var(--grid-cell-inline-padding,10px); overflow-wrap:anywhere; }
.consultation-dialog .layouts-table th,.consultation-grid th { position:sticky; top:0; z-index:1; height:34px; font-size:12px; background:#f3faff; }
.consultation-dialog .layouts-table tbody tr:nth-child(even),.consultation-grid tbody tr:nth-child(even) { background:#fff; }
.consultation-dialog .layouts-table tbody tr:hover,.consultation-grid tbody tr:hover { background:#f7fafc; }
.consultation-dialog .layout-grid-sort { display:inline-flex; align-items:center; max-width:100%; padding:0; border:0; background:transparent; color:inherit; font:inherit; font-weight:700; cursor:pointer; white-space:normal; overflow-wrap:anywhere; text-align:left; }
.consultation-dialog .layouts-table th:last-child,.consultation-dialog .layouts-table td:last-child { text-align:center; }
.consultation-dialog .layouts-table .button { min-width:0; min-height:32px; max-width:100%; padding:5px 10px; font-size:12px; white-space:normal; }
.consultation-dialog .artifact-hash { font-family:monospace; font-size:12px; }
:is(.consultation-dialog,#conversions-page) .grid-icon-action { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border:0; border-radius:5px; background:transparent; color:#496788; text-decoration:none; vertical-align:middle; }
:is(.consultation-dialog,#conversions-page) .grid-icon-action:hover:not(:disabled) { background:#eaf2ff; color:var(--blue); }
:is(.consultation-dialog,#conversions-page) .grid-icon-action .action-icon { width:18px; height:18px; }
.consultation-dialog .feedback-footer { flex:none; }
.consultation-dialog :is(.button,.grid-icon-action,.layout-grid-sort,.table-scroll):focus-visible { outline:2px solid var(--cyan); outline-offset:-2px; }
.consultation-dialog .artifact-number-column { width:100px; }
.layout-history-dialog { --dialog-width:700px; }
#map-artifacts .artifact-id-column { width:28%; }
#map-artifacts .artifact-id-content { display:flex; align-items:center; gap:4px; }
#map-artifacts .artifact-id-content code { min-width:0; overflow-wrap:anywhere; font-size:12px; user-select:all; }
#map-artifacts .artifact-id-content .grid-icon-action { flex:none; }
@media(max-height:800px) { .consultation-dialog .editor-header { min-height:56px; padding:8px 18px; } }
@media(max-width:700px) {
  .dialog-data-header { gap:8px; }
  .dialog-data-header > .dialog-header-data {
    width:56px; height:2px;
    mask-image:repeating-linear-gradient(90deg,#000 0 2px,transparent 2px 10px);
  }
}
@media(max-width:360px) {
  .dialog-data-header > .dialog-header-data {
    width:40px;
    mask-image:repeating-linear-gradient(90deg,#000 0 2px,transparent 2px 8px);
  }
}
@media(max-width:600px) {
  .consultation-dialog { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); }
  .consultation-dialog .editor-header { padding:8px 12px; }
  .consultation-dialog .editor-content { padding:12px 10px; }
  .consultation-dialog .editor-section { padding:8px 10px; }
  .consultation-dialog .layouts-table th,.consultation-dialog .layouts-table td { padding:5px; font-size:12px; }
  .consultation-dialog .layouts-table .button { padding:5px; }
  .consultation-dialog .artifact-hash,.consultation-dialog td:first-child,.consultation-dialog td:nth-child(2) { font-size:11px; }
  #map-artifacts .artifact-id-content { flex-wrap:wrap; }
  #map-artifacts .artifact-id-content code { font-size:11px; }
}
