/* License: MIT (see ../license.txt); alternatively GPL v3.0. (c) 2026 ISSP Software und Service GmbH */
/* Overlay dialogs: non-modal-API overlays so embedded editors (portals) stay usable above them. */
:root{--overlay-line:var(--line);--overlay-ink:var(--ink)}
.header-actions{display:flex;align-items:center;gap:8px}
.code-button{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border-radius:9px;color:var(--blue)}
.code-button:hover{border-color:var(--blue)}
.nav-about{display:flex!important;align-items:center;justify-content:space-between;margin-top:14px!important;border-top:1px solid #ffffff1a;border-radius:0 0 9px 9px!important;padding-top:14px!important}
.nav-about small{background:#213a5b;color:#9fb6d6;border-radius:999px;padding:2px 8px;font-size:11px;font-variant-numeric:tabular-nums}
.overlay-backdrop{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:20px;background:#0a1626a6;animation:overlay-fade .14s ease-out}
.overlay-panel{display:flex;flex-direction:column;max-height:100%;max-width:100%;background:var(--overlay-bg);color:var(--overlay-ink);border-radius:16px;box-shadow:0 20px 70px #0006;overflow:hidden;animation:overlay-rise .16s ease-out}
.overlay-sm{width:420px}.overlay-md{width:760px;height:min(620px,100%)}.overlay-lg{width:1100px;height:min(780px,100%)}.overlay-xl{width:min(1400px,95vw);height:min(92vh,100%)}
.overlay-auto{height:auto!important}
.overlay-head{display:flex;align-items:center;gap:14px;padding:13px 18px;border-bottom:1px solid var(--overlay-line)}
.overlay-title{flex:0 1 auto;margin:0;font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.overlay-head-extra{flex:1;display:flex;align-items:center;gap:8px;min-width:0;font-size:12px;color:var(--muted)}
.overlay-head-extra select{border:1px solid var(--overlay-line);border-radius:8px;padding:7px 9px;background:var(--overlay-bg);color:var(--overlay-ink);font:13px inherit;max-width:340px}
.overlay-close{border:0;background:none;color:inherit;font-size:25px;line-height:1;cursor:pointer;padding:0 4px}
.overlay-body{flex:1;min-height:0;overflow:auto;padding:18px}
.overlay-body.flush{padding:0;display:flex;flex-direction:column}
.overlay-foot{display:flex;justify-content:flex-end;gap:9px;padding:12px 18px;border-top:1px solid var(--overlay-line)}
.overlay-foot:empty{display:none}
.overlay-tabs{display:flex;flex-direction:column;height:100%;min-height:0}
.overlay-tablist{display:flex;gap:2px;border-bottom:1px solid var(--overlay-line);margin-bottom:12px;overflow-x:auto;flex:none}
.overlay-tab{border:0;border-bottom:2px solid transparent;background:none;color:var(--muted);padding:9px 14px;font:600 13px inherit;cursor:pointer;white-space:nowrap}
.overlay-tab:hover{color:var(--overlay-ink)}
.overlay-tab[aria-selected=true]{color:var(--blue);border-bottom-color:var(--blue)}
.overlay-tabpanel{flex:1;min-height:0;overflow:auto}
.overlay-tabpanel[hidden]{display:none}
.code-wrap{position:relative;height:100%}
.code-wrap .code{margin:0;min-height:100%;overflow:auto;white-space:pre;tab-size:2}
.code-copy{position:absolute;right:10px;top:10px;background:#ffffff1f;color:#e8eef8;border:1px solid #ffffff33;border-radius:7px;padding:5px 10px;font:12px inherit;cursor:pointer}
.code-copy:hover{background:#ffffff3a}
.code-context{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px}
.code-context span{background:var(--soft);border:1px solid var(--overlay-line);border-radius:999px;padding:3px 10px;font-size:12px;color:var(--muted)}
.code-context b{color:var(--overlay-ink);font-weight:600}
.overlay-doc-host{flex:1;min-height:0;position:relative;background:#313946;overflow:auto;text-align:center}
.overlay-doc-host embed,.overlay-doc-host iframe{display:block;width:100%;height:100%;border:0}
.overlay-doc-host canvas{display:block;margin:16px auto;box-shadow:0 5px 25px #0006;max-width:calc(100% - 32px);height:auto}
.word-wrap{display:flex;flex-direction:column;height:100%;min-height:0;text-align:left;background:#fff;color:#182338}
.word-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 12px;background:#f5f7fb;border-bottom:1px solid #e4e9f0;font-size:12px;color:#6a768a;flex:none}
.word-host{flex:1;min-height:0;overflow:auto}
#pdfHost .word-wrap{height:560px}
.word-message{padding:24px;color:#8c99ae}
.about-layout{display:grid;grid-template-columns:200px minmax(0,1fr);gap:24px;align-items:start}
.about-stage{perspective:700px;width:200px;height:200px}
.about-animal{width:200px;height:200px;object-fit:contain;background:#f8fafc;border-radius:20px;padding:16px;transition:transform .45s ease,opacity .45s ease;transform:rotateY(0)}
.about-animal.flip{transform:rotateY(90deg);opacity:.15}
.about-version{display:inline-block;margin:4px 0 10px;padding:3px 11px;border-radius:999px;background:var(--soft);border:1px solid var(--overlay-line);font-size:13px;font-variant-numeric:tabular-nums}
.about-license-list{max-height:250px;overflow:auto;border:1px solid var(--overlay-line);border-radius:8px}
.about-license-row{display:grid;grid-template-columns:minmax(160px,1fr) 130px;gap:12px;padding:8px 11px;border-bottom:1px solid var(--overlay-line);font-size:12px}
.about-license-row:last-child{border-bottom:0}
.about-foot{display:flex;align-items:center;justify-content:space-between;margin-top:16px}
.about-foot a{color:var(--blue)}
@keyframes overlay-fade{from{opacity:0}to{opacity:1}}
@keyframes overlay-rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.about-animal{transition:none}.overlay-backdrop,.overlay-panel{animation:none}}
@media(max-width:800px){.overlay-backdrop{padding:0}.overlay-panel{width:100%!important;height:100%!important;border-radius:0}.about-layout{grid-template-columns:1fr}.about-stage{margin:auto}.overlay-head-extra{display:none}}
/* Pictures and non-previewable files shown inside an overlay document host */
.ov-image{max-width:100%;max-height:100%;object-fit:contain;margin:auto;display:block;padding:16px}
.ov-other{padding:40px;color:#fff;text-align:center}
.ov-other a{color:#9ec1ff}
/* the Word editor in the document viewer fills the viewer instead of a fixed 560px */
#pdfHost:has(.word-wrap){display:flex}
#pdfHost .word-wrap{height:auto;flex:1;min-width:0;min-height:560px}

/* About dialog: modules from the BOM */
.about-main{min-width:0}.about-versions{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 10px}.about-versions .about-version{margin:0}
.about-bom h4{margin:14px 0 6px;font-size:13px}.about-count{margin-left:6px;padding:1px 8px;border-radius:999px;background:var(--soft);font-size:11px;font-weight:600;color:var(--muted,#6a768a)}
.about-license-row small{display:block;color:var(--muted,#6a768a);font-size:11px;margin-top:1px}.about-license-row span{min-width:0;overflow-wrap:anywhere}
.about-ver{color:var(--muted,#6a768a);font-size:11px}.about-flag{margin-left:6px;padding:0 6px;border-radius:999px;background:#fff3d6;color:#7a4b00;font-size:10px;font-style:normal;font-weight:700}
.about-bomlink{margin:10px 0 0;font-size:12px}.about-foot{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin-top:14px}.about-foot .tool{margin-left:auto}
.about-license-list{max-height:220px}
@media (max-width:700px){.about-layout{grid-template-columns:1fr}.about-stage{margin:0 auto}}
