@charset "utf-8";

.mw-fac {
    --fac-navy: var(--point-color, #021e62);
    --fac-blue: var(--point-color2, #1d48b2);
    color: #172337;
    letter-spacing: -0.025em;
    word-break: keep-all;
    overflow-wrap: break-word;
}
.mw-fac *, .mw-fac *::before, .mw-fac *::after { box-sizing: border-box; }
.mw-fac .innerwrap { }
.mw-fac h2, .mw-fac h3, .mw-fac p { margin: 0; }
.mw-fac a { text-decoration: none; }
.mw-fac a:focus-visible { outline: 3px solid var(--fac-blue); outline-offset: 4px; }

.mw-fac-intro { padding: 12px 0 0; margin-bottom: 48px; text-align: center; }
.mw-fac-eyebrow { color: var(--fac-blue); font-size: 12px; font-weight: 700; line-height: 1.6; letter-spacing: 0.14em; }
.mw-fac-intro h2 { margin: 18px 0 22px; font-size: clamp(30px, 3vw, 40px); font-weight: 700; line-height: 1.5; letter-spacing: -0.04em; }
.mw-fac-intro h2 strong { color: var(--fac-navy); font-weight: 800; }
.mw-fac-desc { color: #64748b; font-size: 16px; line-height: 1.85; }

.mw-fac-document { overflow: hidden; border: 1px solid #dce3ed; border-top: 3px solid var(--fac-navy); border-radius: 8px; background: #fff; box-shadow: 0 12px 40px #2037540a; }
.mw-fac-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 28px; border-bottom: 1px solid #e1e7ee; }
.mw-fac-file { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mw-fac-file-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 48px; height: 54px; border-radius: 5px; color: var(--fac-navy); background: #eff3fa; font-size: 29px; }
.mw-fac-file-info { min-width: 0; }
.mw-fac-file h3 { color: #172337; font-size: 20px; font-weight: 700; line-height: 1.5; }
.mw-fac-file p { margin-top: 4px; color: #64748b; font-size: 13px; line-height: 1.7; }
.mw-fac-format { display: inline-block; margin-left: 7px; padding: 1px 5px; border: 1px solid #dce3eb; border-radius: 2px; color: #52617a; font-size: 10px; font-weight: 700; line-height: 1.5; letter-spacing: 0.04em; vertical-align: 1px; }
.mw-fac-actions { display: flex; flex-shrink: 0; gap: 10px; }
.mw-fac-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 11px 16px; border: 1px solid transparent; border-radius: 3px; font-size: 13px; font-weight: 600; line-height: 1.5; transition: background-color 0.2s, border-color 0.2s; }
.mw-fac-button i { font-size: 18px; }
.mw-fac-button--outline { color: var(--fac-navy); border-color: #d2dbe7; background: #fff; }
.mw-fac-button--outline:hover { background: #f0f3f9; border-color: var(--fac-navy); }
.mw-fac-button--primary { color: #fff; background: var(--fac-navy); border-color: var(--fac-navy); }
.mw-fac-button--primary:hover { color: #fff; background: var(--fac-blue); border-color: var(--fac-blue); }

.mw-fac-viewer { position: relative; background: #edf0f4; }
.mw-fac-pan-area { height: 820px; height: clamp(620px, 82vh, 920px); overflow: auto; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-x pan-y pinch-zoom; scrollbar-color: #a8b3c3 #edf0f4; }
.mw-fac-pan-area:focus-visible { outline: 3px solid #8caeec; outline-offset: -3px; }
.mw-fac-pan-area.is-dragging { cursor: grabbing; }
.mw-fac-canvas-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 28px; width: max-content; min-width: 100%; min-height: 100%; padding: 32px 40px 104px; }
.mw-fac-pdf-page { position: relative; flex-shrink: 0; overflow: hidden; background: #fff; box-shadow: 0 3px 16px #26385218; }
.mw-fac-pdf-page::before { content: "문서를 불러오는 중입니다."; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #8390a3; font-size: 12px; white-space: nowrap; }
.mw-fac-pdf-page.is-rendered::before { display: none; }
.mw-fac-pdf-page canvas { position: relative; display: block; width: 100%; height: 100%; max-width: none; }
.mw-fac-reader-status { margin: auto !important; color: #64748b; font-size: 14px; }

/* 문서 영역 하단에 고정해 스크롤과 확대 중에도 바로 조작합니다. */
.mw-fac-reader-tools { position: absolute; z-index: 3; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; width: max-content; max-width: calc(100% - 24px); padding: 7px 12px; border: 1px solid #ffffff20; border-radius: 50px; color: #fff; background: #1c2939f2; box-shadow: 0 4px 18px #0b172c26; backdrop-filter: blur(10px); }
.mw-fac-reader-group { display: flex; align-items: center; gap: 3px; }
.mw-fac-reader-tools button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: transparent; font: inherit; font-size: 19px; cursor: pointer; }
.mw-fac-reader-tools button:hover:not(:disabled) { background: #ffffff1f; }
.mw-fac-reader-tools button:focus-visible, .mw-fac-page-count input:focus-visible { outline: 2px solid #bdd6ff; outline-offset: 1px; }
.mw-fac-reader-tools button:disabled { opacity: 0.3; cursor: default; }
.mw-fac-page-count { display: flex; align-items: center; gap: 7px; margin: 0; padding: 0; color: #fff; font-size: 13px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.mw-fac-page-count input { width: 32px; height: 30px; padding: 0; border: 1px solid #ffffff26; border-radius: 4px; color: #fff; background: #ffffff0c; font: inherit; line-height: 1.5; text-align: center; appearance: textfield; -moz-appearance: textfield; }
.mw-fac-page-count input::-webkit-inner-spin-button, .mw-fac-page-count input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.mw-fac-page-slash { color: #9eacbd; }
.mw-fac-page-count [data-pdf-total] { min-width: 12px; }
.mw-fac-zoom { min-width: 48px; color: #fff; font-size: 12px; line-height: 1.5; text-align: center; font-variant-numeric: tabular-nums; }
.mw-fac-tool-divider { flex-shrink: 0; width: 1px; height: 20px; margin: 0 10px; background: #ffffff29; }
.mw-fac-reader-tools .mw-fac-fit { font-size: 20px; }
.mw-fac .mw-fac-reader-error { position: absolute; z-index: 4; top: 20px; left: 20px; right: 20px; padding: 16px 20px; border: 1px solid #d5dfed; border-radius: 4px; color: #243b5a; background: #fff; box-shadow: 0 3px 12px #20375412; font-size: 14px; }
.mw-fac-viewer iframe { display: block; width: 100%; height: 860px; border: 0; }
.mw-fac-help { display: flex; align-items: flex-start; gap: 9px; padding: 17px 28px; border-top: 1px solid #e1e7ee; color: #738095; background: #fff; font-size: 12px; line-height: 1.8; }
.mw-fac-help > i { flex-shrink: 0; margin-top: 2px; color: #7688a2; font-size: 18px; }
.mw-fac-help a { color: var(--fac-navy); text-decoration: underline; text-underline-offset: 3px; }
.mw-fac-help-break { display: none; }

@media (max-width: 900px) {
    .mw-fac-toolbar { gap: 18px; padding: 22px; }
    .mw-fac-actions { gap: 8px; }
    .mw-fac-button { padding: 11px 13px; }
    .mw-fac-canvas-stage { padding: 26px 26px 98px; gap: 24px; }
    .mw-fac-help { padding: 16px 22px; }
    .mw-fac-help-break { display: block; }
}
@media (max-width: 640px) {
    .mw-fac-intro { padding-top: 0; margin-bottom: 30px; }
    .mw-fac-eyebrow { font-size: 10px; letter-spacing: 0.1em; }
    .mw-fac-intro h2 { margin: 14px 0 17px; font-size: 28px; line-height: 1.5; }
    .mw-fac-desc { font-size: 14px; }
    .mw-fac-document { border-radius: 6px; }
    .mw-fac-toolbar { flex-direction: column; align-items: stretch; gap: 18px; padding: 20px 18px; }
    .mw-fac-file { gap: 12px; }
    .mw-fac-file-icon { flex-basis: 42px; height: 48px; font-size: 27px; }
    .mw-fac-file h3 { font-size: 18px; }
    .mw-fac-file p { font-size: 12px; }
    .mw-fac-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mw-fac-button { padding: 11px 6px; font-size: 12px; gap: 6px; }
    .mw-fac-pan-area { height: 580px; height: clamp(440px, 72vh, 660px); }
    .mw-fac-canvas-stage { padding: 18px 16px 86px; gap: 18px; }
    .mw-fac-reader-tools { bottom: 15px; padding: 6px 8px; max-width: calc(100% - 16px); }
    .mw-fac-reader-tools button { width: 32px; height: 36px; font-size: 18px; }
    .mw-fac-reader-group { gap: 2px; }
    .mw-fac-page-count { gap: 5px; font-size: 12px; }
    .mw-fac-page-count input { width: 27px; height: 28px; }
    .mw-fac-zoom { min-width: 40px; font-size: 11px; }
    .mw-fac-tool-divider { margin: 0 6px; height: 17px; }
    .mw-fac-reader-tools .mw-fac-fit { font-size: 18px; }
    .mw-fac-help { padding: 14px 16px; font-size: 11px; }
    .mw-fac-help > i { font-size: 16px; }
    .mw-fac-viewer iframe { height: 600px; }
}
@media (max-width: 380px) {
    .mw-fac-intro h2 { font-size: 25px; }
    .mw-fac-reader-tools { padding: 6px; gap: 0; }
    .mw-fac-reader-tools button { width: 28px; height: 34px; }
    .mw-fac-page-count { gap: 4px; font-size: 11px; }
    .mw-fac-page-count input { width: 24px; }
    .mw-fac-page-count [data-pdf-total] { min-width: 8px; }
    .mw-fac-zoom { min-width: 36px; }
    .mw-fac-tool-divider { margin: 0 4px; }
}
@media (prefers-reduced-motion: reduce) { .mw-fac-button { transition: none; } }
