/* ETDF v15.11.80: accessible gallery viewer. Scoped to this dialog only. */
.etdf-mg-modal { --mg-white: #f7f9ff; --mg-muted: #aebcda; --mg-border: rgba(180,201,245,.16); direction:rtl; padding:clamp(12px,2.5vw,28px); }
.etdf-mg-modal .etdf-mg-backdrop { background:rgba(3,10,26,.88); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); }
.etdf-mg-modal .etdf-mg-dialog { box-sizing:border-box; width:min(1060px,100%); max-width:1060px; max-height:calc(100dvh - 28px); min-height:0; padding:clamp(12px,1.7vw,20px); border:1px solid rgba(172,199,249,.17); border-radius:26px; background:linear-gradient(155deg,#182744 0%,#0f1c35 62%,#0c162a 100%); box-shadow:0 38px 120px rgba(0,0,0,.55), inset 0 1px rgba(255,255,255,.07); overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#41567e transparent; color:var(--mg-white); }
/* This is not the site's navigation header. Explicit styling also resists theme-wide 'header' rules. */
.etdf-mg-modal .etdf-mg-modal-head { all:revert; box-sizing:border-box; flex:0 0 auto; position:relative!important; top:auto!important; z-index:1!important; display:flex; align-items:center; justify-content:space-between; gap:16px; direction:rtl; margin:0 0 14px; padding:4px 6px 13px; min-height:80px; border:0!important; border-bottom:1px solid var(--mg-border)!important; border-radius:0; background:transparent!important; box-shadow:none!important; backdrop-filter:none!important; -webkit-backdrop-filter:none!important; font-family:inherit; color:var(--mg-white); }
.etdf-mg-modal .etdf-mg-heading { min-width:0; flex:1 1 auto; text-align:right; }
.etdf-mg-modal .etdf-mg-heading-meta { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom:7px; min-height:24px; color:var(--mg-muted); font-size:12px; font-weight:650; }
.etdf-mg-modal .etdf-mg-heading-label { display:inline-flex; gap:7px; align-items:center; color:#b6e5f0; font-weight:750; }
.etdf-mg-modal .etdf-mg-heading-label svg { width:18px; height:18px; flex:none; }
.etdf-mg-modal .etdf-mg-heading-divider { display:block; width:4px; height:4px; border-radius:50%; background:#5e7296; }
.etdf-mg-modal .etdf-mg-heading-meta time:empty, .etdf-mg-modal .etdf-mg-heading-meta time:empty + .etdf-mg-heading-divider { display:none; }
.etdf-mg-modal .etdf-mg-modal-head h3 { margin:0; padding:0; max-width:100%; color:#fff!important; font-size:clamp(16px,1.7vw,21px); line-height:1.65; font-weight:850; letter-spacing:-.2px; text-wrap:pretty; overflow-wrap:anywhere; text-align:right; }
.etdf-mg-modal .etdf-mg-close { appearance:none; position:static; width:auto; height:44px; min-width:99px; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; gap:9px; padding:0 14px; border:1px solid rgba(199,212,241,.27); border-radius:12px; background:rgba(255,255,255,.075); color:#f8faff; font-family:inherit; font-size:13px; font-weight:750; line-height:1; transition:background .18s ease,border-color .18s ease,transform .18s ease; cursor:pointer; }
.etdf-mg-modal .etdf-mg-close svg { width:19px; height:19px; }
.etdf-mg-modal .etdf-mg-close:hover { background:rgba(255,255,255,.15); border-color:rgba(255,255,255,.5); transform:translateY(-1px); }
.etdf-mg-modal .etdf-mg-close:focus-visible, .etdf-mg-modal .etdf-mg-arrow:focus-visible, .etdf-mg-modal .etdf-mg-thumbs button:focus-visible { outline:3px solid #6dd8ee; outline-offset:3px; }
.etdf-mg-modal .etdf-mg-stage { flex:0 1 auto; width:100%; height:min(59dvh,590px); min-height:175px; max-height:590px; border:1px solid rgba(187,204,244,.13); border-radius:18px; overflow:hidden; background:radial-gradient(ellipse at 50% 40%,#1b2d4c 0%,#0b1325 78%); box-shadow:inset 0 0 70px rgba(0,0,0,.22); }
.etdf-mg-modal .etdf-mg-stage-media { display:flex; width:100%; height:100%; align-items:center; justify-content:center; overflow:hidden; }
.etdf-mg-modal .etdf-mg-stage-media img, .etdf-mg-modal .etdf-mg-stage-media video { display:block; max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain; }
.etdf-mg-modal .etdf-mg-stage-media [hidden] { display:none!important; }
.etdf-mg-modal .etdf-mg-arrow { display:grid; place-items:center; width:46px; height:46px; padding:0; border:1px solid rgba(255,255,255,.3); border-radius:14px; background:rgba(13,27,50,.78); color:#fff; box-shadow:0 7px 22px rgba(0,0,0,.3); backdrop-filter:blur(6px); cursor:pointer; transition:background .2s ease,transform .2s ease,opacity .2s ease; }
.etdf-mg-modal .etdf-mg-arrow svg { width:22px; height:22px; }
.etdf-mg-modal .etdf-mg-arrow:hover { background:#334c80; transform:translateY(-50%) scale(1.04); }
.etdf-mg-modal .etdf-mg-arrow:disabled { display:none; }
.etdf-mg-modal .etdf-mg-arrow.prev { right:14px; }
.etdf-mg-modal .etdf-mg-arrow.next { left:14px; }
.etdf-mg-modal .etdf-mg-modal-caption { display:flex; align-items:center; justify-content:space-between; gap:15px; flex:0 0 auto; direction:rtl; padding:13px 5px 11px; color:var(--mg-white); }
.etdf-mg-modal .etdf-mg-current-info { min-width:0; text-align:right; }
.etdf-mg-modal .etdf-mg-current-info strong { display:block; color:#eef3ff; font-size:14px; font-weight:800; overflow-wrap:anywhere; }
.etdf-mg-modal .etdf-mg-current-info small { display:block; color:#acbedc; font-size:12px; margin-top:3px; }
.etdf-mg-modal .etdf-mg-current-info small:empty { display:none; }
.etdf-mg-modal .etdf-mg-position { display:inline-flex; justify-content:center; align-items:center; flex:none; border:1px solid rgba(208,224,255,.13); border-radius:50px; background:rgba(223,231,255,.08); color:#dbe5fc; padding:6px 13px; white-space:nowrap; font-size:12px; font-variant-numeric:tabular-nums; }
.etdf-mg-modal .etdf-mg-thumbs { display:flex; flex:0 0 auto; align-items:center; gap:9px; overflow-x:auto; min-height:79px; padding:8px 2px 6px; border-top:1px solid var(--mg-border); scrollbar-width:thin; scrollbar-color:#5a7096 transparent; }
.etdf-mg-modal .etdf-mg-thumbs button { box-sizing:border-box; width:88px; height:57px; flex:0 0 88px; padding:0; border:2px solid transparent; border-radius:10px; background:#203454; opacity:.58; overflow:hidden; cursor:pointer; transition:opacity .18s ease,border-color .18s ease,transform .18s ease; }
.etdf-mg-modal .etdf-mg-thumbs button:hover { opacity:.9; }
.etdf-mg-modal .etdf-mg-thumbs button.is-active { opacity:1; border-color:#83deed; box-shadow:0 0 0 1px rgba(131,222,237,.2); }
.etdf-mg-modal .etdf-mg-thumbs img { width:100%; height:100%; object-fit:cover; }
.etdf-mg-modal .etdf-mg-sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
@media(max-width:650px) {
 .etdf-mg-modal { padding:9px; }
 .etdf-mg-modal .etdf-mg-dialog { width:100%; max-height:calc(100dvh - 18px); padding:10px; border-radius:20px; }
 .etdf-mg-modal .etdf-mg-modal-head { gap:8px; min-height:70px; margin-bottom:10px; padding:3px 3px 10px; align-items:center; }
 .etdf-mg-modal .etdf-mg-heading-meta { margin-bottom:5px; font-size:10.5px; gap:7px; }
 .etdf-mg-modal .etdf-mg-heading-label svg { width:15px; height:15px; }
 .etdf-mg-modal .etdf-mg-modal-head h3 { font-size:15px; line-height:1.55; }
 .etdf-mg-modal .etdf-mg-close { width:41px; min-width:41px; height:41px; padding:0; border-radius:12px; }
 .etdf-mg-modal .etdf-mg-close span { display:none; }
 .etdf-mg-modal .etdf-mg-stage { height:clamp(225px,76vw,340px); min-height:0; border-radius:14px; }
 .etdf-mg-modal .etdf-mg-arrow { width:37px; height:42px; border-radius:11px; }
 .etdf-mg-modal .etdf-mg-arrow.prev { right:6px; } .etdf-mg-modal .etdf-mg-arrow.next { left:6px; }
 .etdf-mg-modal .etdf-mg-modal-caption { padding:11px 3px 9px; }
 .etdf-mg-modal .etdf-mg-current-info strong { font-size:12px; line-height:1.7; }
 .etdf-mg-modal .etdf-mg-thumbs { min-height:69px; gap:7px; padding:7px 0 5px; }
 .etdf-mg-modal .etdf-mg-thumbs button { width:73px; height:49px; flex-basis:73px; }
}
@media(max-height:600px) and (min-width:651px) {
 .etdf-mg-modal .etdf-mg-dialog { padding:10px 14px; }
 .etdf-mg-modal .etdf-mg-modal-head { min-height:57px; margin-bottom:8px; padding-bottom:7px; }
 .etdf-mg-modal .etdf-mg-stage { height:49dvh; min-height:130px; }
 .etdf-mg-modal .etdf-mg-thumbs { min-height:63px; }
}
@media(prefers-reduced-motion:reduce){.etdf-mg-modal .etdf-mg-close,.etdf-mg-modal .etdf-mg-arrow,.etdf-mg-modal .etdf-mg-thumbs button{transition:none}}
