.document-popout[hidden]{display:none}
.document-popout{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:18px}
.document-popout-backdrop{position:absolute;inset:0;background:rgba(2,20,17,.82);backdrop-filter:blur(7px)}
.document-popout-dialog{position:relative;display:flex;flex-direction:column;width:min(1080px,calc(100vw - 36px));height:min(88vh,860px);overflow:hidden;border:1px solid rgba(225,182,78,.48);border-radius:14px;background:#fffdf8;box-shadow:0 30px 90px rgba(0,0,0,.42)}
.document-popout-header{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:66px;padding:13px 16px 13px 21px;border-bottom:1px solid #d8d0bd;background:linear-gradient(90deg,#061f1d,#0d493f);color:#fff}
.document-popout-heading{min-width:0}
.document-popout-kicker{display:block;margin-bottom:2px;color:#edcf80;font:800 .65rem "Roboto",sans-serif;letter-spacing:.12em;text-transform:uppercase}
.document-popout-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:800 clamp(.9rem,2vw,1.08rem) "Poppins",sans-serif}
.document-popout-close{display:grid;flex:0 0 38px;place-items:center;width:38px;height:38px;padding:0;border:1px solid rgba(255,255,255,.42);border-radius:50%;background:rgba(255,255,255,.08);color:#fff;font:500 1.65rem/1 "Roboto",sans-serif;cursor:pointer}
.document-popout-close:hover,.document-popout-close:focus-visible{border-color:#edcf80;background:#edcf80;color:#082f2b;outline:0}
.document-popout-content{display:grid;flex:1;min-height:0;place-items:center;background:#e9e5dc}
.document-popout-content iframe{display:block;width:100%;height:100%;border:0;background:#fff}
.document-popout-empty{max-width:520px;padding:36px 24px;text-align:center;color:#17372f}
.document-popout-empty-icon{display:grid;place-items:center;width:64px;height:64px;margin:0 auto 17px;border-radius:50%;background:#0f5a49;color:#edcf80;font:800 1.7rem "Poppins",sans-serif}
.document-popout-empty strong{display:block;margin-bottom:7px;font:800 1.15rem "Poppins",sans-serif}
.document-popout-empty p{margin:0;color:#637970;font-size:.87rem}
.document-popout-footer{display:flex;align-items:center;justify-content:flex-start;gap:10px;min-height:55px;padding:10px 18px;border-top:1px solid #d8d0bd;background:#fffdf8}
.document-popout-copy{display:inline-flex;align-items:center;gap:8px;padding:8px 11px;border:1px solid #cfc5ae;border-radius:7px;background:#fffdf8;color:#0f5a49;font:800 .76rem "Roboto",sans-serif;cursor:pointer}
.document-popout-copy:hover,.document-popout-copy:focus-visible{border-color:#0f5a49;background:#f2ead9;outline:0}
.document-popout-open{display:inline-flex;align-items:center;gap:8px;padding:8px 11px;border:1px solid #0f5a49;border-radius:7px;background:#0f5a49;color:#fffdf8;text-decoration:none;font:800 .76rem "Roboto",sans-serif}
.document-popout-open[hidden]{display:none}
.document-popout-open:hover,.document-popout-open:focus-visible{background:#0a4639;outline:0;text-decoration:none}
.document-popout-open[aria-disabled="true"]{opacity:.46;cursor:not-allowed;pointer-events:none;text-decoration:none}
body.document-popout-is-open{overflow:hidden}
.document-size{white-space:nowrap;color:#637970;font-weight:700}
.classification-page #panel-matriks th:nth-child(3),.classification-page #panel-matriks td:nth-child(3){width:140px;padding-right:18px;text-align:right}
.classification-page #panel-matriks th:nth-child(4),.classification-page #panel-matriks td:nth-child(4){width:120px;padding-left:18px;text-align:left}
html.dark-mode .document-popout-dialog{border-color:#8b713c;background:#071f1d}
html.dark-mode .document-popout-content{background:#102f2a}
html.dark-mode .document-popout-empty{color:#f5f1e7}
html.dark-mode .document-popout-empty p{color:#b6c8c1}
html.dark-mode .document-popout-footer{border-color:#46665d;background:#071f1d}
html.dark-mode .document-popout-copy{border-color:#46665d;background:#102f2a;color:#edcf80}
html.dark-mode .document-popout-copy:hover,html.dark-mode .document-popout-copy:focus-visible{border-color:#edcf80;background:#173c35}
html.dark-mode .document-popout-open{color:#edcf80}
html.dark-mode .document-size{color:#b6c8c1}
@media(max-width:700px){.document-popout{padding:8px}.document-popout-dialog{width:calc(100vw - 16px);height:calc(100dvh - 16px);border-radius:10px}.document-popout-header{min-height:60px;padding:10px 11px 10px 15px}.document-popout-footer{min-height:50px;padding:8px 14px}.document-popout-copy{padding:8px 9px}.document-popout-empty{padding:28px 18px}.document-popout-empty-icon{width:56px;height:56px}.classification-page #panel-matriks td:nth-child(3),.classification-page #panel-matriks td:nth-child(4){width:auto;padding:10px 12px;text-align:left}}
@media(prefers-reduced-motion:reduce){.document-popout-backdrop{backdrop-filter:none}}
.document-popout-content.is-pdfjs{display:block;overflow:auto;place-items:initial;overscroll-behavior:contain;background:#737373;scrollbar-gutter:stable}
.document-pdfjs-viewer{display:flex;flex-direction:column;align-items:center;gap:18px;width:100%;min-height:100%;padding:18px;box-sizing:border-box}
.document-pdfjs-page{display:flex;flex-direction:column;align-items:center;max-width:100%;margin:0}
.document-pdfjs-page-label{align-self:flex-start;margin:0 0 7px;padding:4px 8px;border-radius:999px;background:#17372f;color:#fff;font:700 .7rem "Roboto",sans-serif}
.document-pdfjs-page canvas{display:block;max-width:100%;height:auto!important;background:#fff;box-shadow:0 8px 24px rgba(0,0,0,.28)}
.document-pdfjs-status{display:grid;place-items:center;align-content:center;min-height:100%;padding:34px;text-align:center;color:#17372f}
.document-pdfjs-status strong{display:block;margin-bottom:7px;font:800 1.05rem "Poppins",sans-serif}
.document-pdfjs-status p{max-width:520px;margin:0;color:#637970;font-size:.86rem}
.document-pdfjs-status.is-loading::before{content:"";width:34px;height:34px;margin-bottom:15px;border:4px solid rgba(15,90,73,.18);border-top-color:#0f5a49;border-radius:50%;animation:document-pdfjs-spin .8s linear infinite}
.document-pdfjs-status.is-error::before{content:"!";display:grid;place-items:center;width:42px;height:42px;margin-bottom:14px;border-radius:50%;background:#8d2f27;color:#fff;font:800 1.2rem "Poppins",sans-serif}
html.dark-mode .document-popout-content.is-pdfjs{background:#102f2a}
html.dark-mode .document-pdfjs-page-label{background:#edcf80;color:#082f2b}
html.dark-mode .document-pdfjs-status{color:#f5f1e7}
html.dark-mode .document-pdfjs-status p{color:#b6c8c1}
html.dark-mode .document-pdfjs-status.is-loading::before{border-color:rgba(237,207,128,.2);border-top-color:#edcf80}
@keyframes document-pdfjs-spin{to{transform:rotate(360deg)}}
@media(max-width:700px){.document-pdfjs-viewer{gap:12px;padding:10px}.document-pdfjs-page-label{font-size:.64rem}.document-pdfjs-status{padding:24px 18px}}
@media(prefers-reduced-motion:reduce){.document-pdfjs-status.is-loading::before{animation-duration:1.6s}}
/* Penampil PDF.js lintas browser tanpa ketergantungan Adobe extension. */

/* Read-only Word and Excel previews rendered in the existing document pop-out. */
.document-popout-content.is-office{display:block;overflow:auto;place-items:initial;overscroll-behavior:contain;scrollbar-gutter:stable;background:#d9d7d0}
.document-popout-content.is-office.is-spreadsheet{overflow:hidden}
.document-office-word{box-sizing:border-box;width:min(820px,calc(100% - 36px));min-height:calc(100% - 36px);margin:18px auto;padding:54px 62px;background:#fff;color:#1d2825;box-shadow:0 8px 28px rgba(0,0,0,.2);font:400 .95rem/1.65 "Roboto",sans-serif;user-select:text}
.document-office-word h1,.document-office-word h2,.document-office-word h3,.document-office-word h4{margin:1.25em 0 .55em;color:#0d493f;font-family:"Poppins",sans-serif;line-height:1.28}
.document-office-word p{margin:.75em 0}.document-office-word img{max-width:100%;height:auto}.document-office-word table{width:100%;border-collapse:collapse;margin:1.1em 0}.document-office-word th,.document-office-word td{padding:8px 10px;border:1px solid #bfc8c3;vertical-align:top}.document-office-word a{color:#0f5a49}.document-office-word ul,.document-office-word ol{padding-left:1.5em}
.document-office-spreadsheet{display:flex;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;background:#f6f7f5;color:#17372f}
.document-sheet-tabs{position:sticky;top:0;z-index:2;display:flex;gap:6px;overflow-x:auto;padding:9px 12px;border-bottom:1px solid #c9d0cc;background:#eef1ef;scrollbar-width:thin}
.document-sheet-tab{flex:0 0 auto;padding:7px 12px;border:1px solid #aebbb5;border-radius:6px;background:#fff;color:#17372f;font:700 .76rem "Roboto",sans-serif;cursor:pointer}
.document-sheet-tab:hover,.document-sheet-tab:focus-visible{border-color:#0f5a49;outline:0}.document-sheet-tab.is-active{border-color:#0f5a49;background:#0f5a49;color:#fff}
.document-sheet-viewport{flex:1;min-width:0;min-height:0;overflow:scroll;padding:14px;overscroll-behavior:contain;scrollbar-gutter:stable;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y}.document-sheet-viewport table{border-collapse:collapse;min-width:max-content;background:#fff;box-shadow:0 4px 18px rgba(0,0,0,.1)}.document-sheet-viewport th,.document-sheet-viewport td{min-width:84px;max-width:360px;padding:7px 9px;border:1px solid #cbd2ce;overflow-wrap:anywhere;white-space:pre-wrap;vertical-align:top;font:400 .8rem/1.4 "Roboto",sans-serif}.document-sheet-viewport th{position:sticky;top:0;background:#e5eee9;color:#0d493f;font-weight:800}
.document-popout-content.is-office .document-pdfjs-status{min-height:100%}
html.dark-mode .document-popout-content.is-office{background:#102f2a}html.dark-mode .document-office-spreadsheet{background:#173c35}html.dark-mode .document-sheet-tabs{border-color:#46665d;background:#102f2a}html.dark-mode .document-sheet-tab{border-color:#46665d;background:#173c35;color:#f5f1e7}html.dark-mode .document-sheet-tab.is-active{border-color:#edcf80;background:#edcf80;color:#082f2b}
@media(max-width:700px){.document-office-word{width:calc(100% - 16px);min-height:calc(100% - 16px);margin:8px auto;padding:28px 22px;font-size:.88rem}.document-sheet-tabs{padding:7px 8px}.document-sheet-viewport{padding:8px}.document-sheet-viewport th,.document-sheet-viewport td{min-width:72px;padding:6px 7px;font-size:.74rem}}

/* Inline previews for Profil, Layanan, and Barang/Jasa document pages. */
.profile-editor-content .wp-block-file.has-inline-preview{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:0;padding:0;overflow:hidden}
.profile-editor-content .wp-block-file.has-inline-preview .wp-block-file__button{align-self:flex-end;margin:12px 14px 14px}
.document-inline-preview{box-sizing:border-box;width:100%;height:clamp(420px,70vh,720px);min-height:420px;overflow:auto;border-bottom:1px solid #c9d0cc;border-radius:6px 6px 0 0;background:#e9e5dc;overscroll-behavior:contain;scrollbar-gutter:stable}
.document-inline-preview.is-spreadsheet{overflow:hidden}
.document-inline-preview .document-pdfjs-viewer{min-height:100%}
.document-inline-preview .document-office-word{min-height:calc(100% - 28px);margin:14px auto}
.document-inline-image{display:block;max-width:100%;max-height:100%;width:auto;height:auto;margin:auto;object-fit:contain}
.document-inline-frame{display:block;width:100%;height:100%;border:0;background:#fff}
html.dark-mode .document-inline-preview{border-color:#46665d;background:#102f2a}
@media(max-width:700px){.document-inline-preview{height:clamp(340px,62dvh,620px);min-height:340px}.profile-editor-content .wp-block-file.has-inline-preview .wp-block-file__button{align-self:stretch;margin:10px 10px 12px;text-align:center}.document-inline-preview .document-office-word{min-height:calc(100% - 16px);margin:8px auto}}


/* Keep inline document previews inside a page-by-page scrolling window. */
.profile-editor-content .wp-block-file.has-inline-preview > .document-inline-preview.document-popout-content {
  height: clamp(420px, 70vh, 720px) !important;
  min-height: 0 !important;
  max-height: 720px !important;
  flex: 0 0 clamp(420px, 70vh, 720px);
  overflow-y: auto !important;
  overflow-x: auto;
  overscroll-behavior: contain;
}

@media (max-width: 700px) {
  .profile-editor-content .wp-block-file.has-inline-preview > .document-inline-preview.document-popout-content {
    height: clamp(340px, 62dvh, 620px) !important;
    min-height: 0 !important;
    max-height: 620px !important;
    flex-basis: clamp(340px, 62dvh, 620px);
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }
}
