/* 짠툴 — 여러 장 한꺼번에 처리 패널
   index.html 의 색 변수를 그대로 쓴다(다크모드 자동 따라감). */

.batch-panel {
    display: none;
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--card-bg);
    overflow: hidden;
}
.batch-panel.active { display: block; }

.batch-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: .75rem; padding: .85rem 1.1rem;
    background: var(--primary-light);
    border-bottom: 1px solid var(--border-color);
}
.batch-title { font-weight: 700; color: var(--text-main); font-size: 1rem; }
.batch-title i { color: var(--primary-color); margin-right: .4rem; }

/* 닫기 단추 — 손가락으로 누를 수 있는 크기 */
.batch-close {
    min-width: 40px; min-height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-color); border-radius: 10px;
    background: var(--bg-color); color: var(--text-sub);
    cursor: pointer; font-size: 1rem; line-height: 1;
}
.batch-close:hover { color: var(--danger-color); border-color: var(--danger-color); }

.batch-body { padding: 1.1rem; }
.batch-count { font-weight: 600; margin-bottom: .7rem; color: var(--text-main); }

/* 파일 목록 */
.batch-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.batch-list li {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .55rem .7rem; border-radius: 9px;
    background: var(--category-bg); margin-bottom: .35rem;
    font-size: .92rem;
}
.batch-list .bn {
    color: var(--text-main); overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; min-width: 0; flex: 1;
}
.batch-list .bs { color: var(--text-sub); font-size: .85rem; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.batch-list .bs.working { color: var(--primary-color); }
.batch-list .bs.done { color: var(--success-color); font-weight: 600; }
.batch-list .bs.fail { color: var(--danger-color); font-weight: 600; }

/* 진행 막대 */
.batch-bar {
    height: 8px; border-radius: 999px; overflow: hidden;
    background: var(--badge-bg); margin-bottom: 1rem;
}
.batch-bar-fill {
    height: 100%; width: 0;
    background: var(--primary-color);
    transition: width .18s ease;
}

.batch-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.batch-actions button { min-height: 44px; }

.batch-note {
    margin: .9rem 0 0; padding: .8rem .9rem;
    border-radius: 10px; background: var(--category-bg);
    border: 1px dashed var(--border-color);
    font-size: .88rem; color: var(--text-sub); line-height: 1.7;
}
.batch-note i { color: var(--primary-color); }
.batch-note b { color: var(--text-main); }
.batch-soon { color: var(--text-sub); }

@media (max-width: 600px) {
    .batch-actions button { width: 100%; }
    .batch-list li { font-size: .88rem; }
}

/* ── 이미지 자르기 손잡이 ─────────────────────────────────── */
.crop-handle {
    width: 14px; height: 14px;
    background: #fff;
    border: 2px solid var(--primary-color);
    border-radius: 3px;
    box-sizing: border-box;
    display: block;
}
.crop-handle[data-h="nw"] { cursor: nwse-resize; }
.crop-handle[data-h="se"] { cursor: nwse-resize; }
.crop-handle[data-h="ne"] { cursor: nesw-resize; }
.crop-handle[data-h="sw"] { cursor: nesw-resize; }

/* 손가락으로도 잡을 수 있게 — 보이는 크기는 그대로 두고 누르는 자리만 넓힌다 */
@media (max-width: 768px) {
    .crop-handle::after {
        content: '';
        position: absolute;
        left: -12px; top: -12px; right: -12px; bottom: -12px;
    }
}
