/* MD_FILE_VERSION: 1.0.006 | CHANGED: 2026-10-22 12-53-24*/
/* Copyright (c) 2026, The Scripps Research Institute */
.md-video-demos-modal{
  position:fixed; inset:0; z-index:150; display:flex; align-items:center; justify-content:center;
  padding:18px; box-sizing:border-box; background:rgba(15,23,42,.42);
}
.md-video-demos-modal[hidden], .md-video-demos-modal [hidden]{display:none !important;}
.md-video-demos-card{
  --md-vd-thumbnail-width:204px;
  position:relative; display:flex; flex-direction:column; box-sizing:border-box;
  width:min(1020px,calc(100vw - 36px)); height:min(1090px,calc(100vh - 36px));
  min-width:min(660px,calc(100vw - 36px)); min-height:min(540px,calc(100vh - 36px));
  background:var(--panel); color:var(--fg); border:1px solid var(--line-dark); border-radius:14px;
  box-shadow:0 24px 60px rgba(15,23,42,.24); overflow:hidden; font:inherit;
}
.md-vd-header{display:flex; align-items:center; gap:12px; padding:12px 14px; border-bottom:1px solid var(--line-dark); background:var(--thead); flex:none;}
.md-vd-header h3{margin:0; font-size:18px; font-weight:700; white-space:nowrap;}
.md-vd-search{flex:1 1 auto; min-width:100px; width:100%; box-sizing:border-box; height:32px; padding:0 10px; border:1px solid var(--line-dark); border-radius:8px; background:var(--control-bg); color:var(--fg); font:inherit; font-size:13px;}
.md-video-demos-modal button:not(.md-vd-thumbnail):not(.md-vd-resize){min-height:30px; padding:5px 10px; border-radius:8px; font-size:13px; cursor:pointer;}
.md-video-demos-modal button:disabled{cursor:default; opacity:.55;}
.md-video-demos-modal :focus-visible{outline:2px solid var(--accent); outline-offset:2px;}
.md-vd-toolbar{display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:8px 14px 0; flex:none;}
.md-vd-manager-status{font-size:12px; margin-left:auto;}
.md-vd-notice{display:flex; align-items:center; gap:8px; flex:none;}
.md-vd-load-retry{margin-right:14px; flex:none;}
.md-vd-message{flex:1 1 auto; min-width:0; padding:0 14px; font-size:12px; line-height:1.4; overflow-wrap:anywhere;}
.md-vd-message:not(:empty){padding-top:6px; padding-bottom:6px;}
.md-vd-error{color:#b91c1c;}
:root[data-theme="dark"] .md-vd-error{color:#fca5a5;}
/* Intrinsic row minimums include wrapped player controls; only constrained windows need body scrolling. */
.md-vd-body{display:grid; grid-template-rows:minmax(min-content,1.15fr) minmax(180px,1fr); gap:12px; padding:12px 14px 24px; flex:1 1 auto; min-height:0; overflow:auto;}
.md-vd-top{min-width:0; min-height:0;}
.md-vd-media{display:flex; flex-direction:column; height:100%; min-height:0;}
.md-vd-player-recovery{display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding-top:8px; flex:none; font-size:12px;}
.md-vd-player-message{flex:1 1 200px; overflow-wrap:anywhere;}
.md-vd-external{color:var(--accent); white-space:nowrap; font-size:12px;}
.md-vd-stage{flex:1 1 auto; min-height:200px; display:flex; align-items:center; justify-content:center; background:#000; border:1px solid var(--line-dark); border-radius:8px; overflow:hidden;}
.md-vd-placeholder{padding:20px; text-align:center; color:#cbd5e1; font-size:13px;}
/* YouTube preserves video proportions inside the full-size frame and owns its native controls. */
.md-vd-player-host{position:relative; width:100%; height:100%; min-width:0; min-height:0; background:#000;}
.md-vd-player-host iframe{display:block; border:0; width:100%; height:100%; min-height:200px;}
.md-vd-library{display:flex; flex-direction:column; min-height:0; min-width:0; border:1px solid var(--line-dark); border-radius:8px; overflow:hidden;}
.md-vd-list{overflow:auto; min-height:0; flex:1 1 auto; scrollbar-gutter:stable; overscroll-behavior:contain;}
.md-vd-table{width:100%; table-layout:fixed; border-collapse:separate; border-spacing:0; border:0; border-radius:0; font:inherit; font-size:13px;}
.md-vd-thumbnail-col{width:calc(var(--md-vd-thumbnail-width) + 16px);}
.md-vd-table td{padding:8px; vertical-align:middle; border-right:0; border-bottom:1px solid var(--line-dark); background:var(--row); overflow-wrap:anywhere;}
.md-vd-table tr:nth-child(odd) td{background:var(--row-alt);}
.md-vd-table td+td{border-left:1px solid var(--line-dark);}
.md-vd-table tr:last-child td{border-bottom:0;}
.md-vd-table tr.md-vd-selected td:first-child{box-shadow:inset 3px 0 0 var(--accent);}
.md-vd-thumbnail{position:relative; display:block; width:var(--md-vd-thumbnail-width); max-width:100%; aspect-ratio:16 / 9; margin:0 auto; padding:0; overflow:hidden; border:1px solid var(--line-dark); border-radius:7px; background:var(--control-bg); color:var(--fg); cursor:pointer;}
.md-vd-thumbnail img{width:100%; height:100%; display:block; object-fit:cover;}
.md-vd-play-symbol{position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); padding:5px 10px; border-radius:7px; color:white; background:rgba(15,23,42,.7); font-size:18px; pointer-events:none;}
.md-vd-hit-count{font-size:12px; margin-top:6px; text-align:center;}
.md-vd-row-actions{display:flex; justify-content:center; flex-wrap:wrap; gap:5px; margin-top:10px;}
.md-vd-caption{position:relative; height:calc(var(--md-vd-thumbnail-width) * .5625); overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45; scrollbar-gutter:stable; padding:0 5px 0 0; overscroll-behavior:contain;}
mark.md-vd-hit{background:rgba(255,208,0,.25); color:inherit; border-radius:4px; padding:0;}
.md-vd-empty{padding:24px 12px; color:var(--muted); text-align:center; font-size:13px;}
.md-vd-sr-only{position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0;}
.md-vd-resize{position:absolute; right:0; bottom:0; width:24px; height:24px; padding:0; background:transparent; border:0; cursor:nwse-resize; touch-action:none; z-index:7;}
.md-vd-resize::after{content:""; position:absolute; right:0; bottom:0; width:17px; height:17px; border-right:4px solid var(--line-dark); border-bottom:4px solid var(--line-dark); border-bottom-right-radius:12px; box-sizing:border-box;}
.md-vd-resize-shield{position:absolute; inset:0; z-index:6; cursor:nwse-resize;}
.md-vd-resizing,.md-vd-resizing *{user-select:none !important; cursor:nwse-resize !important;}
.md-vd-editor{display:flex; flex-direction:column; height:100%; gap:6px; overflow:auto; padding:0 2px; box-sizing:border-box;}
.md-vd-editor h4{margin:0; font-size:14px;}
.md-vd-field{display:flex; gap:8px; align-items:center; font-size:13px; min-height:30px; flex:none;}
.md-vd-field>span{width:95px; flex:none;}
.md-vd-field input,.md-vd-field textarea{width:100%; min-width:0; box-sizing:border-box; border:1px solid var(--line-dark); border-radius:7px; background:var(--control-bg); color:var(--fg); font:inherit; padding:6px 8px;}
.md-vd-field:has(textarea){flex:1 1 auto; align-items:stretch; min-height:80px;}
.md-vd-field textarea{min-height:80px; resize:none;}
.md-vd-editor-actions{display:flex; justify-content:flex-end; gap:8px; flex:none;}
.md-vd-confirm{position:absolute; inset:0; z-index:10; display:flex; align-items:center; justify-content:center; padding:20px; background:rgba(15,23,42,.42); border-radius:14px;}
.md-vd-confirm-card{width:min(480px,100%); padding:18px; border:1px solid var(--line-dark); border-radius:12px; box-sizing:border-box; background:var(--panel); color:var(--fg); box-shadow:0 20px 40px rgba(15,23,42,.25);}
.md-vd-confirm-card p{margin:0 0 16px; line-height:1.5;}
.md-vd-confirm-actions{display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px;}
@media(max-width:720px){
  .md-vd-header{gap:8px; flex-wrap:wrap;}
  .md-vd-header h3{font-size:16px;}
  .md-vd-search{order:3; flex-basis:100%;}
  .md-vd-header>button{margin-left:auto;}
  .md-video-demos-card{--md-vd-thumbnail-width:124px;}
}
@media(max-height:600px){.md-vd-manager-status{flex-basis:100%;}}
@media(prefers-reduced-motion:reduce){.md-video-demos-modal *{scroll-behavior:auto !important;}}
