/* Noble Pixel office PDF tools (PDF to Word, PDF to Excel, page numbers & watermark). Mobile first; theme vars with fallbacks. */
.of-app [hidden] { display: none !important; }
.of-app .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.of-app .btn--lg { min-height: 52px; }
.of-app a { color: var(--blue, #1f7cec); font-weight: 600; }
.of-drop { padding: 34px 18px; }
.of-drop strong { color: var(--blue, #1f7cec); font-size: 1.08rem; }
.of-drop__ic { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 8px; border-radius: 16px; background: #fff; color: #c23a1f; box-shadow: 0 6px 18px -10px rgba(17,28,41,.35); }
.of-note { display: flex; align-items: flex-start; gap: 6px; margin: 18px 0 0; color: var(--muted, #66768a); font-size: .86rem; }
.of-note svg { color: #12a150; flex: 0 0 auto; margin-top: 2px; }
.of-opts { margin-top: 18px; }
.of-actions { margin-top: 20px; }
.of-out:empty { display: none; }
.of-out { margin-top: 18px; }
.of-opt { font-weight: 500; color: var(--muted, #66768a); font-size: .88rem; }
.of-small { font-size: .9rem; color: var(--text, #3d4b5c); margin: 8px 0 0; }
.of-center { text-align: center; }
.of-pad { padding: 30px 16px; text-align: center; }
.of-app .tool-label select, .of-app .tool-label input { margin-top: 6px; font-weight: 500; }
.of-app input[type="number"], .of-pass input { font: inherit; color: var(--ink, #17222f); background: #fff; border: 1.5px solid var(--line, #e2e8f0); border-radius: 12px; padding: 10px 12px; width: 100%; min-height: 46px; box-sizing: border-box; }
.of-app input[type="number"]:focus, .of-pass input:focus { outline: none; border-color: var(--blue, #1f7cec); box-shadow: 0 0 0 4px rgba(31,124,236,.14); }
.of-input { width: 100%; box-sizing: border-box; }
.of-app input[type="radio"], .of-app input[type="checkbox"] { accent-color: var(--blue, #1f7cec); width: 18px; height: 18px; flex: 0 0 auto; }
.of-range { width: 100%; accent-color: var(--blue, #1f7cec); height: 32px; }
.of-color { display: block; width: 100%; height: 46px; padding: 4px; margin-top: 6px; border: 1.5px solid var(--line, #e2e8f0); border-radius: 12px; background: #fff; cursor: pointer; box-sizing: border-box; }
.of-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.of-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.of-check { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 0; font-weight: 600; color: var(--ink, #17222f); cursor: pointer; line-height: 1.4; }
.of-check input { margin-top: 2px; }
.of-check--mt { margin-top: 40px; align-items: center; }

/* chosen file line */
.of-file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface, #f5f8fc); border-radius: 14px; }
.of-file__ic { flex: 0 0 auto; width: 42px; height: 48px; border-radius: 8px; background: #fdeee9; color: #c23a1f; font-weight: 800; font-size: .72rem; display: grid; place-items: center; letter-spacing: .04em; }
.of-file__name { font-weight: 700; word-break: break-word; min-width: 0; }
.of-file__name small { display: block; font-weight: 500; color: var(--muted, #66768a); font-size: .85rem; }

/* password */
.of-pass { margin-top: 14px; padding: 16px; border: 1.5px solid #f3dca2; background: #fffaf0; border-radius: 14px; }
.of-pass__title { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; color: #6e4a00; }
.of-pass__row { display: flex; gap: 10px; margin-top: 12px; }
.of-pass__row input { flex: 1 1 auto; min-width: 0; }
.of-pass .tool-hint.of-bad { color: #b3311a; font-weight: 600; }

/* option cards */
.of-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.of-choice label { position: relative; cursor: pointer; }
.of-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.of-choice span { display: block; height: 100%; padding: 14px; border: 1.5px solid var(--line, #e2e8f0); border-radius: 14px; background: #fff; transition: border-color .15s, background .15s; box-sizing: border-box; }
.of-choice b { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--ink, #17222f); }
.of-choice b em { font-style: normal; font-size: .72rem; font-weight: 700; color: #0c7a3d; background: #e3f7ec; border-radius: 99px; padding: 2px 8px; }
.of-choice small { display: block; color: var(--muted, #66768a); font-size: .84rem; margin-top: 4px; line-height: 1.4; }
.of-choice input:checked + span { border-color: var(--blue, #1f7cec); background: var(--blue-50, #ebf3fe); box-shadow: 0 0 0 3px rgba(31,124,236,.12); }
.of-choice input:focus-visible + span { outline: 2px solid var(--blue, #1f7cec); outline-offset: 2px; }

/* progress */
.of-progress { padding: 18px; background: var(--surface, #f5f8fc); border-radius: 14px; }
.of-progress__top { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text, #3d4b5c); }
.of-progress__top span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.of-progress__bar { height: 10px; margin-top: 12px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.of-progress__bar i { display: block; height: 100%; background: var(--blue, #1f7cec); border-radius: 99px; transition: width .2s; }

/* result */
.of-result { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 20px; border-radius: 18px; background: linear-gradient(135deg, var(--blue-50, #ebf3fe), #f6fbff); border: 1px solid #d7e6fb; }
.of-result__icon { flex: 0 0 auto; width: 56px; height: 64px; border-radius: 10px; background: #fff; color: #c23a1f; font-weight: 800; display: grid; place-items: center; box-shadow: 0 6px 16px -8px rgba(17,28,41,.3); }
.of-result__icon--doc { color: #1f5fbf; }
.of-result__body { flex: 1 1 240px; min-width: 0; }
.of-result__body h3 { margin: 0 0 6px; font-size: 1.15rem; color: var(--ink, #17222f); }
.of-result__meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.of-result__meta .tb { font-size: .85rem; }
.of-result__btns { flex: 1 1 100%; margin-top: 0; }
.of-result .of-small { overflow-wrap: anywhere; }
.of-sum { margin-top: 14px; }
.of-warn { padding: 12px 14px; background: #fff8e6; border: 1px solid #f3dca2; color: #6e4a00; border-radius: 12px; font-size: .92rem; margin: 12px 0 0; line-height: 1.5; }
.of-warn a { color: #8a4b00; text-decoration: underline; }
.of-empty { padding: 20px; border-radius: 16px; background: var(--surface, #f5f8fc); border: 1px dashed #c9d5e3; }
.of-empty h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--ink, #17222f); }
.of-empty p { margin: 6px 0 0; }

/* Word text preview */
.of-details { margin-top: 14px; border: 1px solid var(--line, #e2e8f0); border-radius: 14px; background: #fff; }
.of-details summary { cursor: pointer; padding: 12px 16px; font-weight: 700; color: var(--ink, #17222f); }
.of-textprev { max-height: 340px; overflow: auto; padding: 4px 18px 16px; border-top: 1px solid var(--line, #e2e8f0); font-size: .93rem; line-height: 1.55; overflow-wrap: anywhere; }
.of-textprev h4 { margin: 14px 0 4px; font-size: 1.02rem; color: var(--ink, #17222f); }
.of-textprev p { margin: 8px 0 0; color: var(--text, #3d4b5c); }
.of-textprev .of-li { padding-left: 14px; }
.of-textprev pre { margin: 8px 0 0; padding: 8px 10px; background: var(--surface, #f5f8fc); border-radius: 8px; font-size: .82rem; white-space: pre-wrap; }

/* Excel preview */
.of-pv { padding: 16px; border: 1px solid var(--line, #e2e8f0); border-radius: 16px; background: #fff; }
.of-pv__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.of-pv__top h3 { margin: 0; font-size: 1.08rem; color: var(--ink, #17222f); }
.of-sheets { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; }
.of-sheets .tool-tab { flex: 0 0 auto; padding: 6px 12px; font-size: .86rem; }
.of-tablewrap { max-height: 420px; overflow: auto; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; -webkit-overflow-scrolling: touch; }
.of-table { border-collapse: collapse; font-size: .84rem; min-width: 100%; }
.of-table th, .of-table td { border: 1px solid #e6ebf1; padding: 6px 9px; text-align: left; vertical-align: top; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.of-table thead th { position: sticky; top: 0; z-index: 1; background: #eef2f7; color: var(--muted, #66768a); font-weight: 700; font-size: .76rem; text-align: center; }
.of-table .of-rn { background: #f3f6fa; color: var(--muted, #66768a); font-weight: 600; font-size: .76rem; text-align: center; width: 36px; }
.of-table .of-n { text-align: right; background: #effaf3; color: #0c5e30; font-variant-numeric: tabular-nums; }
.of-table .of-b { font-weight: 700; background: var(--blue-50, #ebf3fe); color: var(--ink, #17222f); }

/* page numbers & watermark */
.of-work { display: grid; gap: 20px; margin-top: 18px; }
.of-set { border: 1px solid var(--line, #e2e8f0); border-radius: 16px; padding: 4px 16px 16px; margin: 0 0 14px; min-width: 0; }
.of-set legend { padding: 0 6px; margin-left: -6px; }
.of-switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.02rem; color: var(--ink, #17222f); cursor: pointer; min-height: 44px; }
.of-switch input { width: 20px; height: 20px; }
.of-set__body > .tool-label:first-child { margin-top: 4px; }
.of-pos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px; border-radius: 12px; background: var(--surface, #f5f8fc); }
.of-pos label, .of-seg label, .of-tab { position: relative; cursor: pointer; }
.of-pos input, .of-seg input, .of-tab input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.of-pos span { display: grid; place-items: center; min-height: 44px; padding: 4px; border: 1.5px solid var(--line, #e2e8f0); border-radius: 10px; background: #fff; font-size: .8rem; font-weight: 600; color: var(--text, #3d4b5c); text-align: center; line-height: 1.2; }
.of-pos label:nth-child(-n+3) { margin-bottom: 26px; }
.of-pos input:checked + span, .of-seg input:checked + span { border-color: var(--blue, #1f7cec); background: var(--blue, #1f7cec); color: #fff; }
.of-pos input:focus-visible + span, .of-seg input:focus-visible + span, .of-tab input:focus-visible + span { outline: 2px solid var(--blue, #1f7cec); outline-offset: 2px; }
.of-seg { display: inline-flex; gap: 6px; }
.of-seg span { display: grid; place-items: center; min-width: 60px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line, #e2e8f0); border-radius: 10px; background: #fff; font-weight: 700; color: var(--text, #3d4b5c); }
.of-tab span { display: inline-block; font-weight: 600; font-size: .94rem; border: 1.5px solid var(--line, #e2e8f0); background: #fff; color: var(--text, #3d4b5c); padding: 8px 16px; border-radius: 999px; }
.of-tab input:checked + span { background: var(--navy, #243547); border-color: var(--navy, #243547); color: #fff; }
.of-file-in { display: block; width: 100%; font: inherit; font-size: .92rem; padding: 10px; border: 1.5px dashed #b9c6d6; border-radius: 12px; background: var(--surface, #f5f8fc); box-sizing: border-box; }
.of-app .tool-error[data-pn-opt-err] { margin-top: 4px; }
.of-prev { order: -1; min-width: 0; }
.of-prev__nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 10px; font-weight: 700; color: var(--ink, #17222f); }
.of-ib { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line, #e2e8f0); background: #fff; color: var(--ink, #17222f); font-size: 1.5rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.of-ib:hover:not(:disabled) { border-color: var(--blue, #1f7cec); color: var(--blue, #1f7cec); }
.of-ib:disabled { opacity: .35; cursor: default; }
.of-stage { display: flex; align-items: center; justify-content: center; min-height: 260px; padding: 12px; border-radius: 16px; background: #e9eef4; }
.of-stage canvas { display: block; max-width: 100%; max-height: 62vh; width: auto; height: auto; background: #fff; box-shadow: 0 10px 28px -14px rgba(17,28,41,.45); }

@media (min-width: 900px) {
	.of-work { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 28px; }
	.of-prev { order: 0; position: sticky; top: 90px; }
	.of-stage { min-height: 420px; }
	.of-stage canvas { max-height: 72vh; }
}
@media (max-width: 640px) {
	.of-choice, .of-grid2 { grid-template-columns: 1fr; }
	.of-check--mt { margin-top: 16px; }
	.of-actions .btn, .of-result__btns .btn { width: 100%; }
	.of-pass__row { flex-direction: column; }
	.of-pass__row .btn { width: 100%; }
	.of-grid3 { gap: 0 8px; }
	.of-grid3 .tool-label { font-size: .86rem; }
	.of-set { padding: 4px 12px 14px; }
	.of-stage { min-height: 200px; padding: 8px; }
	.of-stage canvas { max-height: 56vh; }
}
