/* public/assets/css/tools/pdf-tape.css */
.pdf-tool-wrapper {
    display: flex;
    height: calc(100vh - 140px);
    min-height: 650px;
    background: var(--bg-body, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
    font-family: system-ui, -apple-system, sans-serif;
}

/* 经典三栏布局 */
.pdf-sidebar-left {
    width: 200px;
    background: var(--bg-surface, #ffffff);
    border-right: 1px solid var(--border-color, #e2e8f0);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 16px;
    gap: 16px;
}

.pdf-canvas-container {
    flex: 1;
    background: #e2e8f0; 
    overflow: auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px;
}
[data-theme="dark"] .pdf-canvas-container { background: #0f172a; }

.pdf-sidebar-right {
    width: 280px;
    background: var(--bg-surface, #ffffff);
    border-left: 1px solid var(--border-color, #e2e8f0);
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 24px;
    overflow-y: auto;
}

/* UI 组件与按钮 */
.pdf-panel-title { font-size: 1rem; font-weight: 700; color: var(--text-main, #1e293b); margin-bottom: 12px; display: flex; align-items: center; gap: 8px;}
.pdf-panel-title i { color: #3b82f6; }

.pdf-btn-main { background: #3b82f6; color: #fff; border: none; padding: 12px; border-radius: 8px; cursor: pointer; font-weight: 600; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s; }
.pdf-btn-main:hover { background: #2563eb; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59,130,246,0.3); }

.pdf-btn-picker { background: #eff6ff; border: 1px dashed #3b82f6; color: #1d4ed8; padding: 12px; border-radius: 8px; cursor: pointer; font-weight: 600; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s; }
.pdf-btn-picker:hover { background: #dbeafe; }
.pdf-btn-picker.active { background: #3b82f6; color: #fff; border-style: solid; box-shadow: 0 0 0 3px rgba(59,130,246,0.2); animation: pulse 2s infinite; }

.pdf-btn-export { background: #10b981; color: #fff; border: none; padding: 14px; border-radius: 8px; cursor: pointer; font-weight: 600; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s; margin-top: auto; }
.pdf-btn-export:hover { background: #059669; box-shadow: 0 4px 12px rgba(16,185,129,0.3); transform: translateY(-1px); }

/* 颜色池列表 */
.color-pool-list { display: flex; flex-direction: column; gap: 8px; min-height: 60px; border: 1px solid var(--border-color, #e2e8f0); border-radius: 8px; padding: 12px; background: var(--bg-body, #f8fafc); }
.color-pool-empty { text-align: center; color: #94a3b8; font-size: 0.85rem; margin: auto; }
.color-item { display: flex; align-items: center; justify-content: space-between; background: var(--bg-surface, #fff); padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border-color, #e2e8f0); box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.color-item-left { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; font-family: monospace; color: var(--text-main, #475569); }
.color-swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.1); }
.color-del-btn { color: #ef4444; cursor: pointer; border: none; background: transparent; padding: 4px; border-radius: 4px; transition: 0.2s; }
.color-del-btn:hover { background: #fee2e2; }

/* 画布与缩略图 */
.canvas-viewport { background: #fff; box-shadow: 0 4px 20px rgba(0,0,0,0.1); position: relative; margin: 0 auto; transition: width 0.1s, height 0.1s; }
.pdf-thumb-wrapper { cursor: pointer; border: 2px solid transparent; border-radius: 6px; padding: 4px; transition: 0.2s; }
.pdf-thumb-wrapper:hover { background: var(--bg-body, #f1f5f9); }
.pdf-thumb-wrapper.active { border-color: #3b82f6; background: #eff6ff; }
.pdf-thumb-canvas { width: 100%; box-shadow: 0 2px 6px rgba(0,0,0,0.1); border-radius: 2px; }
.pdf-thumb-label { font-size: 0.75rem; color: #64748b; margin-top: 6px; font-weight: 500; text-align: center; }

/* 加载动画 */
.pdf-loading { position: absolute; inset:0; background: rgba(255,255,255,0.8); backdrop-filter: blur(4px); z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #1e293b; font-weight: 600; }
[data-theme="dark"] .pdf-loading { background: rgba(15,23,42,0.8); color: #fff; }
.pdf-spinner { width: 40px; height: 40px; border: 4px solid var(--border-color, #e2e8f0); border-top-color: #3b82f6; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 12px; }
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(59,130,246,0.4); } 70% { box-shadow: 0 0 0 10px rgba(59,130,246,0); } 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); } }

/* 范围滑块美化 */
input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%; background: #3b82f6; cursor: pointer; margin-top: -6px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 4px; cursor: pointer; background: #cbd5e1; border-radius: 2px; }