/* DANAOS (21 Oct 2026): Organizational Structure popup viewer (inc/danaos-org-chart-modal.php) */
.docm{position:fixed;inset:0;margin:auto;width:min(1240px,calc(100vw - 32px));height:min(880px,calc(100dvh - 32px));max-width:none;max-height:none;padding:0;border:0;border-radius:22px;background:#f4f6fa;color:#0f1e3d;box-shadow:0 30px 80px rgba(8,20,48,.45);overflow:hidden;font-family:inherit}
.docm[open]{display:flex;flex-direction:column;animation:docmIn .28s cubic-bezier(.2,.8,.2,1)}
.docm::backdrop{background:rgba(9,18,40,.62);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);animation:docmFade .28s ease}
@keyframes docmIn{from{opacity:0;transform:translateY(14px) scale(.985)}to{opacity:1;transform:none}}
@keyframes docmFade{from{opacity:0}to{opacity:1}}
.docm-head{display:flex;align-items:center;gap:16px;padding:16px 18px 16px 24px;background:linear-gradient(90deg,#2f4f8f 0%,#1d3466 100%);color:#fff;flex:0 0 auto}
.docm-ic{flex:0 0 40px;height:40px;border-radius:12px;background:rgba(255,255,255,.12);display:grid;place-items:center}
.docm-ic svg{width:22px;height:22px;stroke:#ffd23f;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.docm-tt{min-width:0;flex:1 1 auto}
.docm-tt h2{margin:0;font-size:18px;line-height:1.25;font-weight:700;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.docm-tt p{margin:2px 0 0;font-size:13px;line-height:1.3;color:rgba(255,255,255,.72);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.docm-tools{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.docm-b{appearance:none;border:0;cursor:pointer;height:38px;min-width:38px;padding:0 10px;border-radius:10px;background:rgba(255,255,255,.1);color:#fff;display:inline-flex;align-items:center;justify-content:center;gap:6px;font:600 13px/1 inherit;text-decoration:none;transition:background .15s}
.docm-b:hover,.docm-b:focus-visible{background:rgba(255,255,255,.22);color:#fff;outline:none}
.docm-b svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.docm-b.docm-dl{background:#ffd23f;color:#13254d}
.docm-b.docm-dl:hover,.docm-b.docm-dl:focus-visible{background:#ffe27a;color:#13254d}
.docm-zv{min-width:52px;text-align:center;font:600 13px/1 inherit;color:rgba(255,255,255,.85)}
.docm-sep{width:1px;height:24px;background:rgba(255,255,255,.2);margin:0 4px}
.docm-x{background:rgba(255,255,255,.14)}
.docm-body{position:relative;flex:1 1 auto;overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;background:#e9edf4;background-image:radial-gradient(#d3dae6 1px,transparent 1px);background-size:18px 18px}
.docm-pages{display:flex;flex-direction:column;align-items:center;gap:18px;padding:24px;min-width:min-content}
.docm-pages canvas{display:block;background:#fff;border-radius:6px;box-shadow:0 6px 24px rgba(15,30,61,.16)}
.docm-pages iframe{width:100%;height:100%;border:0;border-radius:6px;background:#fff;min-height:70vh}
.docm-load{position:absolute;inset:0;display:grid;place-items:center;color:#2f4f8f;font:600 14px/1.4 inherit}
.docm-load i{display:block;width:38px;height:38px;margin:0 auto 10px;border-radius:50%;border:3px solid #c9d3e6;border-top-color:#2f4f8f;animation:docmSpin .8s linear infinite}
@keyframes docmSpin{to{transform:rotate(360deg)}}
.docm-foot{flex:0 0 auto;padding:10px 24px;font-size:12px;color:#5b6b89;background:#fff;border-top:1px solid #e1e6ef;display:flex;justify-content:space-between;gap:12px}
.docm-foot span:last-child{white-space:nowrap}
html.docm-lock,html.docm-lock body{overflow:hidden}
/* trigger: whole blurred card clickable */
.du-image-with-button-wrapper.docm-trigger{cursor:pointer}
.du-image-with-button-wrapper.docm-trigger img{transition:transform .5s ease,filter .5s ease}
.du-image-with-button-wrapper.docm-trigger:hover img{transform:scale(1.015);filter:saturate(1.1)}
/* RTL */
.docm[dir=rtl] .docm-head{padding:16px 24px 16px 18px;background:linear-gradient(270deg,#2f4f8f 0%,#1d3466 100%)}
/* tablet */
@media (max-width:900px){.docm-zv,.docm-sep,.docm-b .docm-lbl{display:none}.docm-tt p{display:none}}
/* phone: full screen sheet */
@media (max-width:640px){
.docm{width:100vw;height:100dvh;border-radius:0}
.docm-head{flex-wrap:wrap;padding:12px 12px 10px 16px;gap:10px}
.docm[dir=rtl] .docm-head{padding:12px 16px 10px 12px}
.docm-ic{display:none}
.docm-tt{flex:1 1 calc(100% - 52px);order:1}
.docm-tt h2{font-size:16px;white-space:normal}
.docm-x{order:2}
.docm-tools{order:3;flex:1 1 100%;justify-content:space-between}
.docm-pages{padding:12px;gap:12px}
.docm-foot{display:none}
}
@media (prefers-reduced-motion:reduce){.docm[open],.docm::backdrop,.du-image-with-button-wrapper.docm-trigger img{animation:none;transition:none}}
