/* ПДФ в Джипег */

.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.is-over {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.dz-inner { display: flex; flex-direction: column; gap: 6px; }
.dz-inner strong { font-size: var(--fs-lg); }
.dz-inner span { color: var(--text-muted); font-size: var(--fs-sm); }
.dz-hint { font-size: var(--fs-xs) !important; }

.pages-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0 10px;
}
.file-name { font-size: var(--fs-sm); color: var(--text-muted); overflow-wrap: anywhere; }
.pages-actions { display: inline-flex; gap: 14px; }
.link-btn {
    background: none; border: 0; padding: 0;
    color: var(--accent);
    font-size: var(--fs-sm); cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

.pages-grid {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.pages-grid li { position: relative; }
.page-thumb {
    display: block;
    width: 100%;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    line-height: 0;
}
.page-thumb img, .page-thumb canvas { width: 100%; height: auto; display: block; }
.page-thumb .page-num {
    display: block;
    line-height: 1.4;
    font-size: var(--fs-xs);
    color: var(--text-muted);
    text-align: center;
    padding: 4px 0;
    background: var(--bg-subtle);
}
li.is-selected .page-thumb { border-color: var(--accent); }
li.is-selected .page-thumb::after {
    content: '✓';
    position: absolute;
    top: 6px; right: 6px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    line-height: 20px;
    text-align: center;
}

.progress {
    height: 6px;
    border-radius: 999px;
    background: var(--border);
    margin: 14px 0 0;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: var(--accent);
    transition: width .2s;
}

.actions { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.actions-note { font-size: var(--fs-sm); color: var(--text-muted); }
