/* Cross-page UI corrections that intentionally load after all feature styles. */

/* Discovery: the port chooser must be a fully opaque popover in both themes. */
.discovery-scan-actions{isolation:isolate}
.discovery-settings{position:relative}
.discovery-settings fieldset{
  top:calc(100% + 9px);
  z-index:80;
  background:var(--surface-solid);
  opacity:1;
  backdrop-filter:none;
  box-shadow:0 20px 55px rgb(0 0 0 / 52%);
}
:root[data-theme-mode=light] .discovery-settings fieldset{box-shadow:0 20px 55px color-mix(in srgb,var(--text-primary) 22%,transparent)}

/* Long secondary panes stay below the sticky application header. */
.connectivity-main{min-width:0}
.connectivity-inspector,.tp-detail,.automation-person-panel,.automation-quick,.automation-steps{
  top:var(--shell-sticky-top,88px);
  max-height:var(--shell-sticky-max-height,calc(100vh - 104px));
}
.automation-person-panel,.automation-quick,.automation-steps{overflow:auto}

/* Form help belongs to its control without colliding with the next action. */
.catalog-connectivity-setting{gap:10px;padding-top:2px}
.catalog-connectivity-setting .field-hint{margin:0 0 0 26px}
.modal-body>.form-grid+.form-note{margin-top:18px}
.modal-body>.form-note+.form-grid{margin-top:18px}
.danger-zone{column-gap:16px;row-gap:10px}

@media(max-width:1250px){
  .tp-detail{max-height:none;overflow:visible}
}
@media(max-width:1100px){
  .automation-person-panel,.automation-quick,.automation-steps{max-height:none;overflow:visible}
}
@container(max-width:680px){
  .connectivity-inspector{max-height:none;overflow:visible}
}
@media(max-width:560px){
  .catalog-connectivity-setting .field-hint{margin-left:0}
}
.ssh-trust-card{display:grid;grid-template-columns:minmax(110px,.55fr) minmax(0,1fr);gap:12px 18px;margin-top:18px;padding:18px;border:1px solid var(--line);border-radius:14px;background:var(--surface-solid)}
.ssh-trust-card>span{color:var(--muted)}
.ssh-trust-card code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere}
.ssh-fingerprint{font-size:13px;line-height:1.55}
.ssh-trust-warning{margin-bottom:18px;padding:16px;border:1px solid color-mix(in srgb,var(--red) 52%,var(--line));border-radius:14px;background:color-mix(in srgb,var(--red) 12%,var(--surface-solid));color:var(--text)}
.ssh-trust-warning strong{color:var(--red)}
.ssh-trust-warning p{margin:8px 0 0;line-height:1.55}
@media(max-width:620px){.ssh-trust-card{grid-template-columns:1fr;gap:6px}.ssh-trust-card>strong{margin-bottom:8px}}
