/* 첨부 미리 보기 (view.php): PDF.js 뷰어 위의 띠 + 변환 중 화면 */
:root { --imv-h: 48px; --imv-navy: #1b4596; }
html, body { height: 100%; }
body { margin: 0; }
.imv-bar {
  position: fixed; inset: 0 0 auto; height: var(--imv-h); z-index: 100000; box-sizing: border-box;
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: var(--imv-navy); color: #fff;
  font: 14px/1.4 "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", -apple-system, system-ui, sans-serif;
}
.imv-bar a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; flex: none; border-radius: 6px; }
.imv-bar a:hover { background: rgb(255 255 255 / .12); }
.imv-bar a:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.imv-bar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.imv-back { padding: 6px 8px 6px 4px; }
.imv-dl { padding: 6px 10px; border: 1px solid rgb(255 255 255 / .45); font-size: 13px; }
.imv-dl svg { width: 17px; height: 17px; }
.imv-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.imv-kind { flex: none; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgb(255 255 255 / .16); }
.imv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
html[data-embed] { --imv-h: 0px; }
#outerContainer { position: absolute; inset: var(--imv-h) 0 0; width: auto; height: auto; }

.imv-wait { position: fixed; inset: var(--imv-h) 0 0; z-index: 99999; display: grid; place-items: center; padding: 24px; background: #f4f5f7; }
.imv-wait[hidden] { display: none; }
.imv-wait-box { max-width: 420px; text-align: center; color: #333; font: 15px/1.6 "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", -apple-system, system-ui, sans-serif; }
.imv-wait-t { display: block; font-size: 16.5px; color: #111; margin-top: 16px; word-break: keep-all; white-space: pre-line; }
.imv-wait-d { margin: 6px 0 0; color: #666; font-size: 14px; word-break: keep-all; }
.imv-wait-dl { display: inline-block; margin-top: 18px; padding: 9px 18px; border-radius: 8px; background: var(--imv-navy); color: #fff; text-decoration: none; font-weight: 500; }
.imv-wait-dl[hidden] { display: none; }
.imv-spin { display: inline-block; width: 34px; height: 34px; border-radius: 50%; border: 3px solid #d5dae3; border-top-color: var(--imv-navy); animation: imv-spin .9s linear infinite; }
.imv-spin[hidden] { display: none; }
.imv-wait.err .imv-wait-t { color: #b42318; }
@keyframes imv-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .imv-spin { animation-duration: 3s; } }

@media (max-width: 600px) {
  :root { --imv-h: 46px; }
  .imv-bar { gap: 6px; padding: 0 8px; }
  .imv-back span { display: none; }
  .imv-kind { display: none; }
  .imv-name { font-size: 13.5px; }
  .imv-dl { padding: 6px 8px; }
  .imv-dl span { display: none; }
  .imv-dl::after { content: "원본"; font-size: 12.5px; }
}

/* 글 안(embed): 문서 크기에 꼭 맞춘 틀 · 여백 없이 한 장씩 · 화살표와 장 번호는 문서 위에 겹쳐 보인다 */
html[data-embed] { --toolbar-height: 0px; --body-bg-color: rgb(10 12 16); }
html[data-embed] body { background: rgb(10 12 16); overflow: hidden; }
html[data-embed] #toolbarContainer, html[data-embed] #viewsManager, html[data-embed] #sidebarContainer { display: none; }
html[data-embed] #outerContainer { inset: 0; }
html[data-embed] #mainContainer { min-width: 0; }
html[data-embed] #viewerContainer { inset: 0; overflow: hidden; scrollbar-width: none; touch-action: pan-y pinch-zoom; }  /* 옆으로 밀기는 넘기기 몫 */
html[data-embed] #viewerContainer.is-zoomed { overflow: auto; }
html[data-embed] .pdfViewer { --page-margin: 0 auto; --page-border: 0; }
html[data-embed] .pdfViewer .page { margin: 0 auto; border: 0; box-shadow: none; }
.imv-nav { position: fixed; top: 50%; z-index: 10; width: 40px; height: 40px; margin-top: -20px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: rgb(0 0 0 / .42); color: #fff; cursor: pointer; transition: background .15s, opacity .2s;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.imv-nav[hidden] { display: none; }
.imv-nav:hover, .imv-nav:focus-visible { background: rgb(0 0 0 / .65); outline: none; }
.imv-nav:focus-visible { box-shadow: 0 0 0 2px #fff; }
.imv-nav:disabled { opacity: 0; pointer-events: none; }
.imv-nav::before { content: ""; width: 10px; height: 10px; border: solid currentColor; border-width: 0 0 2.5px 2.5px; }
.imv-prev { left: 10px; } .imv-prev::before { transform: translateX(2px) rotate(45deg); }
.imv-next { right: 10px; } .imv-next::before { transform: translateX(-2px) rotate(-135deg); }
.imv-count { position: fixed; left: 50%; bottom: 10px; z-index: 10; transform: translateX(-50%); padding: 4px 11px; border-radius: 999px;
  background: rgb(0 0 0 / .55); color: #fff; font: 12.5px/1.3 "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", -apple-system, system-ui, sans-serif;
  font-variant-numeric: tabular-nums; pointer-events: none; transition: opacity .2s; }
.imv-count[hidden] { display: none; }
/* 3초 동안 아무 동작이 없으면 숨김 (pdfview.js) — 숨은 동안 누르면 먼저 다시 보이기만 한다 */
.imv-nav, .imv-count { transition: background .15s, opacity .35s; }
html.imv-idle .imv-nav, html.imv-idle .imv-count { opacity: 0; pointer-events: none; }
html[data-embed] .imv-wait { background: rgb(10 12 16); }
html[data-embed] .imv-wait-box { color: rgb(255 255 255 / .85); }
html[data-embed] .imv-wait-t { color: #fff; }
html[data-embed] .imv-wait-d { color: rgb(255 255 255 / .6); }
html[data-embed] .imv-spin { border-color: rgb(255 255 255 / .2); border-top-color: #fff; }
html[data-embed] .imv-wait.err .imv-wait-t { color: #ff8a80; }
@media (max-width: 600px) {
  .imv-nav { width: 34px; height: 34px; margin-top: -17px; }
  .imv-prev { left: 6px; } .imv-next { right: 6px; }
  .imv-count { bottom: 6px; font-size: 11.5px; padding: 3px 9px; }
}

/* 파워포인트 발표자 노트 (pdfview.js) — 크게 보기: 뷰어 아래 칸, 머리를 누르면 접고 편다 */
:root { --imv-notes: 0px; }
html.imv-has-notes { --imv-notes: min(30vh, 240px); }
html.imv-has-notes.imv-notes-closed { --imv-notes: 38px; }
html.imv-has-notes:not([data-embed]) #outerContainer { bottom: var(--imv-notes); }
.imv-notes { position: fixed; inset: auto 0 0; height: var(--imv-notes); z-index: 99998; box-sizing: border-box; display: flex; flex-direction: column;
  background: #fff; border-top: 1px solid #d5dae3; box-shadow: 0 -4px 14px rgb(0 0 0 / .06);
  font: 14.5px/1.7 "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", -apple-system, system-ui, sans-serif; color: #222; }
.imv-notes[hidden] { display: none; }
.imv-notes-h { flex: none; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 0; border-bottom: 1px solid #eceef2; background: #f6f7f9;
  font: inherit; font-size: 13px; color: #555; cursor: pointer; text-align: left; }
.imv-notes-h b { color: var(--imv-navy); font-weight: 700; }
.imv-notes-h span { font-variant-numeric: tabular-nums; color: #888; }
.imv-notes-h i { margin-left: auto; width: 8px; height: 8px; border: solid #777; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
html.imv-notes-closed .imv-notes-h i { transform: translateY(2px) rotate(-135deg); }
.imv-notes-h:hover { background: #eef1f6; }
.imv-notes-h:focus-visible { outline: 2px solid var(--imv-navy); outline-offset: -2px; }
.imv-notes-b { flex: 1; min-height: 0; overflow: auto; padding: 10px 16px 14px; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.imv-notes-b.is-empty { color: #999; }
html.imv-notes-closed .imv-notes-b { display: none; }
@media (max-width: 600px) { html.imv-has-notes { --imv-notes: 32vh; } .imv-notes { font-size: 14px; } .imv-notes-b { padding: 8px 12px 12px; } }
