.ccpdf {
--ccpdf-primary: #5e17eb;
--ccpdf-primary-d: #4a0fc0;
--ccpdf-text: #1f2330;
--ccpdf-muted: #6b7080;
--ccpdf-line: #e3e5ec;
--ccpdf-bg: color-mix(in srgb, var(--ccpdf-primary) 5%, #fafafa);
--ccpdf-danger: #d93025;
--ccpdf-radius: 14px;
color: var(--ccpdf-text);
font-size: 15px;
line-height: 1.5;
max-width: 1100px;
margin: 0 auto 2em;
box-sizing: border-box;
}
.ccpdf *, .ccpdf *::before, .ccpdf *::after { box-sizing: border-box; }
.ccpdf [hidden] { display: none !important; }
.ccpdf-loading { padding: 2em; text-align: center; color: var(--ccpdf-muted); }
.ccpdf-ic { display: inline-flex; width: 1.15em; height: 1.15em; flex: none; }
.ccpdf-ic svg { width: 100%; height: 100%; } .ccpdf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.ccpdf-card {
display: flex; flex-direction: column; gap: 6px;
padding: 20px; border: 1px solid var(--ccpdf-line); border-radius: var(--ccpdf-radius);
background: #fff; color: var(--ccpdf-text) !important; text-decoration: none !important;
transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.ccpdf-card:hover, .ccpdf-card:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(30, 20, 70, .1); border-color: var(--ccpdf-tool); outline: none; }
.ccpdf-card strong { font-size: 17px; }
.ccpdf-card > span:last-child { color: var(--ccpdf-muted); font-size: 14px; }
.ccpdf-card-ic, .ccpdf-head-ic {
display: inline-flex; align-items: center; justify-content: center;
width: 48px; height: 48px; border-radius: 12px; margin-bottom: 6px;
background: color-mix(in srgb, var(--ccpdf-tool) 14%, #fff); color: var(--ccpdf-tool);
}
.ccpdf-card-ic .ccpdf-ic, .ccpdf-head-ic .ccpdf-ic { width: 26px; height: 26px; } .ccpdf-tool { background: #fff; border: 1px solid var(--ccpdf-line); border-radius: var(--ccpdf-radius); padding: 24px; }
.ccpdf-back {
display: inline-flex; align-items: center; gap: 4px; margin: 0 0 12px; padding: 4px 8px 4px 2px;
background: none; border: 0; color: var(--ccpdf-muted); cursor: pointer; font: inherit; font-size: 14px; border-radius: 6px;
}
.ccpdf-back:hover { color: var(--ccpdf-primary); background: var(--ccpdf-bg); }
.ccpdf-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.ccpdf-head-ic { margin: 0; }
.ccpdf .ccpdf-title { margin: 0; font-size: 24px; line-height: 1.25; color: var(--ccpdf-text); }
.ccpdf .ccpdf-desc { margin: 2px 0 0; color: var(--ccpdf-muted); }
.ccpdf-drop {
position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
min-height: 200px; padding: 28px; text-align: center; cursor: pointer;
border: 2px dashed color-mix(in srgb, var(--ccpdf-primary) 40%, #fff); border-radius: var(--ccpdf-radius);
background: var(--ccpdf-bg); transition: background .15s, border-color .15s, min-height .2s;
}
.ccpdf-drop:hover, .ccpdf-drop.is-over, .ccpdf-drop:focus-within { border-color: var(--ccpdf-primary); background: color-mix(in srgb, var(--ccpdf-primary) 8%, #fff); }
.ccpdf-drop > .ccpdf-ic { width: 40px; height: 40px; color: var(--ccpdf-primary); }
.ccpdf-drop strong {
display: inline-block; padding: 10px 26px; border-radius: 10px; color: #fff; background: var(--ccpdf-primary); font-size: 16px;
}
.ccpdf-drop > span:not(.ccpdf-ic) { color: var(--ccpdf-muted); font-size: 13px; }
.ccpdf-drop.is-compact { min-height: 0; padding: 14px; flex-direction: row; flex-wrap: wrap; }
.ccpdf-drop.is-compact > .ccpdf-ic { width: 24px; height: 24px; }
.ccpdf-drop.is-compact strong { padding: 6px 16px; font-size: 14px; }
.ccpdf-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.ccpdf-fileinfo { margin: 12px 0 0; padding: 10px 14px; background: var(--ccpdf-bg); border-radius: 10px; word-break: break-all; }
.ccpdf-fileinfo small, .ccpdf-item small, .ccpdf-file-out small { color: var(--ccpdf-muted); }
.ccpdf-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ccpdf-item {
display: flex; align-items: center; gap: 12px; padding: 10px 12px;
border: 1px solid var(--ccpdf-line); border-radius: 10px; background: #fff; cursor: grab;
}
.ccpdf-item.is-drag { opacity: .45; }
.ccpdf-item-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--ccpdf-bg); font-size: 13px; font-weight: 600; }
.ccpdf-item-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ccpdf-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; font-weight: 500; }
.ccpdf-item-thumb { flex: none; width: 44px; height: 44px; border-radius: 6px; overflow: hidden; background: var(--ccpdf-bg); display: inline-flex; align-items: center; justify-content: center; }
.ccpdf-item-thumb img { max-width: 100%; max-height: 100%; }
.ccpdf-item-tools { flex: none; display: flex; gap: 2px; }
.ccpdf-ibtn {
display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
border: 0; border-radius: 8px; background: transparent; color: var(--ccpdf-muted); cursor: pointer;
}
.ccpdf-ibtn:hover:not(:disabled) { background: var(--ccpdf-bg); color: var(--ccpdf-primary); }
.ccpdf-ibtn.is-danger:hover:not(:disabled) { color: var(--ccpdf-danger); }
.ccpdf-ibtn:disabled { opacity: .4; cursor: default; }
.ccpdf-hint { margin: 10px 0 0; color: var(--ccpdf-muted); font-size: 13px; }
.ccpdf-opts { margin-top: 18px; padding: 18px; border: 1px solid var(--ccpdf-line); border-radius: 12px; display: flex; flex-direction: column; gap: 14px; }
.ccpdf-grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.ccpdf-opts > .ccpdf-grid3 { padding: 0; border: 0; margin: 0; }
.ccpdf-field { display: flex; flex-direction: column; gap: 6px; margin: 0; font-weight: normal; }
.ccpdf-label { font-weight: 600; font-size: 14px; }
.ccpdf-field small { color: var(--ccpdf-muted); font-size: 12.5px; }
.ccpdf input[type=text], .ccpdf input[type=number], .ccpdf select {
width: 100%; min-height: 40px; margin: 0; padding: 8px 10px; font: inherit; color: var(--ccpdf-text);
border: 1px solid #cfd2dc; border-radius: 8px; background: #fff; box-shadow: none;
}
.ccpdf input[type=text]:focus, .ccpdf input[type=number]:focus, .ccpdf select:focus { border-color: var(--ccpdf-primary); outline: 2px solid color-mix(in srgb, var(--ccpdf-primary) 25%, transparent); outline-offset: 0; }
.ccpdf input:disabled, .ccpdf select:disabled { background: #f1f2f5; color: #9a9eab; }
.ccpdf input[type=color] { width: 56px; height: 40px; padding: 2px; border: 1px solid #cfd2dc; border-radius: 8px; background: #fff; cursor: pointer; }
.ccpdf input[type=range] { flex: 1; accent-color: var(--ccpdf-primary); }
.ccpdf-inline { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.ccpdf-inline output { min-width: 3em; font-variant-numeric: tabular-nums; }
.ccpdf-radios { display: flex; flex-wrap: wrap; gap: 8px; }
.ccpdf-radio { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--ccpdf-line); border-radius: 8px; cursor: pointer; margin: 0; font-weight: normal; }
.ccpdf-radio:has(input:checked) { border-color: var(--ccpdf-primary); background: color-mix(in srgb, var(--ccpdf-primary) 7%, #fff); }
.ccpdf-radio input { margin: 0; accent-color: var(--ccpdf-primary); }
.ccpdf-scope { display: flex; flex-direction: column; gap: 8px; }
.ccpdf-scope .ccpdf-range { max-width: 360px; }
.ccpdf-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ccpdf-actions-main { margin-top: 20px; justify-content: center; }
.ccpdf .ccpdf-btn {
display: inline-flex; align-items: center; justify-content: center; gap: 8px;
min-height: 46px; padding: 10px 28px; border: 0; border-radius: 10px;
background: var(--ccpdf-primary); color: #fff !important; font: inherit; font-weight: 600; font-size: 16px;
cursor: pointer; text-decoration: none !important; transition: background .15s, transform .1s; line-height: 1.2;
}
.ccpdf .ccpdf-btn:hover:not(:disabled) { background: var(--ccpdf-primary-d); }
.ccpdf .ccpdf-btn:active:not(:disabled) { transform: scale(.98); }
.ccpdf .ccpdf-btn:disabled { background: color-mix(in srgb, var(--ccpdf-primary) 30%, #d4d4d8); cursor: not-allowed; }
.ccpdf .ccpdf-btn-ghost { background: #fff; color: var(--ccpdf-text) !important; border: 1px solid var(--ccpdf-line); min-height: 38px; padding: 6px 14px; font-size: 14px; font-weight: 500; }
.ccpdf .ccpdf-btn-ghost:hover:not(:disabled) { background: var(--ccpdf-bg); border-color: var(--ccpdf-primary); }
.ccpdf-status { min-height: 1.5em; margin-top: 12px; text-align: center; color: var(--ccpdf-primary); font-weight: 500; }
.ccpdf-tool.is-busy .ccpdf-status::before {
content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px;
border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ccpdf-spin .7s linear infinite;
}
@keyframes ccpdf-spin { to { transform: rotate(360deg); } }
.ccpdf-alert { margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: #fdecea; color: #a1231a; border: 1px solid #f5c2bd; }
.ccpdf-result { margin-top: 18px; padding: 22px; border-radius: 12px; text-align: center; background: color-mix(in srgb, #27ae60 8%, #fff); border: 1px solid color-mix(in srgb, #27ae60 35%, #fff); }
.ccpdf-done { display: inline-flex; align-items: center; gap: 8px; color: #1e8449; font-size: 20px; }
.ccpdf-done .ccpdf-ic { width: 26px; height: 26px; }
.ccpdf-file-out { margin: 6px 0 14px; word-break: break-all; }
.ccpdf-result .ccpdf-actions { justify-content: center; }
.ccpdf .ccpdf-btn-dl { background: #27ae60; }
.ccpdf .ccpdf-btn-dl:hover { background: #1e8449 !important; }
.ccpdf-privacy { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px 0 0; font-size: 12.5px; color: var(--ccpdf-muted); } .ccpdf-pagebar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ccpdf-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 14px; }
.ccpdf-page { position: relative; padding: 10px 10px 30px; border: 1px solid var(--ccpdf-line); border-radius: 12px; background: #fff; transition: opacity .15s, border-color .15s; }
.ccpdf-page[draggable=true] { cursor: grab; }
.ccpdf-page.is-drag { opacity: .4; }
.ccpdf-page.is-rot { border-color: #2d9cdb; }
.ccpdf-page.is-del { border-color: var(--ccpdf-danger); }
.ccpdf-page.is-del .ccpdf-thumb canvas { opacity: .3; }
.ccpdf-page.is-del .ccpdf-thumb::after { content: "Sẽ xóa"; position: absolute; inset: auto 0 45% 0; text-align: center; font-weight: 700; color: var(--ccpdf-danger); }
.ccpdf-thumb { position: relative; height: 170px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--ccpdf-bg); border-radius: 8px; }
.ccpdf-thumb canvas { max-width: 100%; max-height: 100%; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); transition: transform .2s; }
.ccpdf-thumb-ph { width: 60%; height: 70%; border-radius: 4px; background: linear-gradient(90deg, #eceaf3, #f7f6fb, #eceaf3); background-size: 200% 100%; animation: ccpdf-sh 1.2s infinite; }
@keyframes ccpdf-sh { to { background-position: -200% 0; } }
.ccpdf-thumb-err { font-size: 12px; color: var(--ccpdf-muted); padding: 8px; text-align: center; }
.ccpdf-page-tools { display: flex; justify-content: center; flex-wrap: wrap; gap: 0; margin-top: 6px; }
.ccpdf-page-tools .ccpdf-ibtn { width: 28px; height: 28px; }
.ccpdf-page-n { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 12px; color: var(--ccpdf-muted); }
@media (max-width: 600px) {
.ccpdf-tool { padding: 16px; border-radius: 0; border-left: 0; border-right: 0; }
.ccpdf .ccpdf-title { font-size: 20px; }
.ccpdf-item { flex-wrap: wrap; }
.ccpdf-pages { grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ccpdf-thumb { height: 140px; }
.ccpdf .ccpdf-btn { width: 100%; }
.ccpdf-result .ccpdf-btn, .ccpdf-pagebar .ccpdf-btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) { .ccpdf * { transition: none !important; animation: none !important; } }