/* A fixed command area and one scrolling diagnostic body. */
.energisa-step-dialog.diagnostic-layout {
 display:flex!important; flex-direction:column!important; overflow:hidden!important; padding:0!important;
}
.diag-fixed-top { flex:0 0 auto; min-width:0; background:#f4f7fa; }
.diag-fixed-top > header {
 display:flex; align-items:center; justify-content:space-between; gap:12px;
 padding:9px 18px; min-height:60px; background:#0095b5; color:white;
}
.diag-fixed-top > header > button { color:white; border-color:#bce9f3; background:transparent; }
.diag-fixed-top .diag-brand img { width:112px; height:34px; }
.diag-fixed-top .diag-brand h2 { font-size:19px; color:white; }
.diag-fixed-top .diag-brand p { font-size:10px; margin:2px 0 0; }
.diag-fixed-top .diagnostic-mode-tabs button { min-height:38px; padding:8px 14px; }
.diag-command-band {
 display:flex; flex-wrap:wrap; align-items:flex-start; gap:6px 14px; padding:8px 14px;
 border-bottom:1px solid #d9e3eb; background:white;
}
.diag-command-band .energisa-step-controls {
 flex:0 1 auto; margin:0; padding:0; border:0; box-shadow:none; gap:6px; min-width:0;
}
.diag-command-band .energisa-step-controls > button { min-height:36px; padding:7px 10px; font-size:12px; }
.diag-command-band .diag-context { flex:1 1 360px; min-width:0; padding:0; }
.diag-command-band .diag-context-line { gap:4px 10px; }
.diag-command-band .diag-context-line p { font-size:11px; }
.diag-command-band .diag-context > p { font-size:11px; margin:3px 0; }
.diag-command-band .diag-session-badge { font-size:10px; padding:3px 7px; }
.diag-command-band:has(> .energisa-step-controls[hidden]):has(> .diag-context[hidden]) { display:none; }
.diag-scroll-content {
 flex:1 1 auto; min-height:0; width:100%; overflow-y:auto!important; overflow-x:hidden;
 overscroll-behavior:contain; -webkit-overflow-scrolling:touch; padding-top:10px;
}
.diag-scroll-content > * { flex-shrink:0; }
.diagnostic-layout .diag-scroll-content .diag-steps-card > ol { max-height:none!important; overflow:visible!important; }
.diagnostic-layout .diag-scroll-content .diag-steps-card > ol > li { padding:8px 0; }
.diagnostic-layout .diag-scroll-content .diag-layout-grid { align-items:start; }
.diagnostic-layout.remote-window .energisa-step-preview {
 position:fixed!important; inset:0!important; width:100vw!important; height:100dvh!important;
 max-width:none!important; max-height:none!important; min-height:0!important; margin:0!important;
 border:0!important; border-radius:0!important; padding:8px!important;
 display:flex!important; flex-direction:column!important; overflow:hidden!important;
 background:#f5f8fb; z-index:5;
}
.diagnostic-layout.remote-window .diagnostic-preview-tools {
 flex:0 0 auto; min-height:40px; gap:6px; padding:4px; background:white;
}
.diagnostic-layout.remote-window .energisa-remote-toolbar {
 flex:0 0 auto; margin:0; padding:6px 4px; gap:6px; background:white;
}
.diagnostic-layout.remote-window .energisa-remote-toolbar input { min-height:38px; font-size:16px; }
.diagnostic-layout.remote-window .energisa-step-preview > p {
 flex:0 0 auto; margin:4px; font-size:11px;
}
.diagnostic-layout.remote-window .energisa-step-preview-frame {
 flex:1 1 auto!important; min-height:0!important; min-width:0!important;
 max-height:none!important; width:100%!important; margin:4px 0 0!important; overflow:auto!important;
 display:flex; align-items:center; justify-content:center; background:#e9eff4;
}
.diagnostic-layout.remote-window .energisa-step-preview-frame > img {
 flex:0 0 auto; display:block; width:auto!important; height:auto!important;
 max-width:100%!important; max-height:100%!important; margin:0!important; object-fit:contain;
}
.diagnostic-layout.remote-window .energisa-step-preview-frame.expanded { display:block; }
.diagnostic-layout.remote-window .energisa-step-preview-frame.expanded > img {
 width:150%!important; max-width:none!important; max-height:none!important; height:auto!important;
}
.diagnostic-layout.remote-window .diag-preview-placeholder { display:none!important; }
.diagnostic-layout.remote-window .robot-view-empty:not([hidden]) {
 position:absolute; left:10%; right:10%; top:48%; text-align:center; color:#54718a; pointer-events:none;
}
.robot-view-empty[hidden], .robot-view-back[hidden] { display:none!important; }
@media(max-width:750px) {
 .diag-fixed-top > header { min-height:54px; padding:8px 10px; gap:7px; }
 .diag-fixed-top .diag-brand { gap:8px; }
 .diag-fixed-top .diag-brand img { width:72px; height:28px; }
 .diag-fixed-top .diag-brand h2 { font-size:15px; }
 .diag-fixed-top .diagnostic-mode-tabs button { min-height:36px; font-size:11px; }
 .diag-command-band { padding:7px 10px; gap:6px; }
 .diag-command-band .energisa-step-controls {
  display:flex; flex-wrap:wrap; flex:1 0 100%; gap:5px;
 }
 .diag-command-band .energisa-step-controls > button {
  flex:1 1 42%; min-height:40px; font-size:11px; padding:6px;
 }
 .diag-command-band .diag-more { flex:1 0 100%; }
 .diag-command-band .diag-more > summary { min-height:30px; padding:6px 9px; }
 .diag-command-band .diag-context { flex:1 0 100%; }
 .diag-command-band .diag-context-line p { font-size:10px; }
 .diagnostic-layout.remote-window .diagnostic-preview-tools button { min-height:36px; font-size:11px; padding:6px; }
 .diagnostic-layout.remote-window .energisa-remote-toolbar span { flex:1 0 100%; font-size:10px; }
 .diagnostic-layout.remote-window .energisa-remote-keys { gap:3px; }
}

.diagnostic-layout.remote-window .diagnostic-preview-tools button[aria-expanded=true] { display:none!important; }
