/* 이미지 → PDF 변환 전용 스타일 */

/* 편집 섹션 */
.edit-section {
  margin-top: 1.5rem;
}

.edit-section[hidden] {
  display: none;
}

.file-list-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.file-list-header h2 {
  font-size: 1.25rem;
}

.file-count {
  font-size: 0.8rem;
  color: var(--text-sub);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
}

.drag-hint {
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-bottom: 0.75rem;
}

/* 파일 목록 */
.file-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: grab;
  transition: border-color 0.2s, box-shadow 0.2s;
  user-select: none;
}

.file-item:active {
  cursor: grabbing;
}

.file-item.dragging {
  opacity: 0.5;
  border-color: var(--primary);
}

.file-item.drag-over {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.file-item .handle {
  color: var(--text-sub);
  font-size: 1rem;
  flex-shrink: 0;
}

.file-item .thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.file-item .file-info {
  flex: 1;
  min-width: 0;
}

.file-item .file-name {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item .file-meta {
  font-size: 0.75rem;
  color: var(--text-sub);
}

.file-item .btn-remove {
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
  flex-shrink: 0;
}

.file-item .btn-remove:hover {
  color: #ef4444;
}

/* 옵션 (margin override) */
.options {
  margin-bottom: 1.25rem;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.option-group[hidden] {
  display: none;
}

.size-hint {
  font-size: 0.75rem;
  color: var(--text-sub);
}

.option-group > label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-sub);
}

.option-group select {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.option-group select:focus {
  outline: none;
  border-color: var(--primary);
}

/* 액션 버튼 */
.actions {
  display: flex;
  gap: 0.75rem;
}

.btn-add {
  flex: 1;
  padding: 0.65rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s;
}

.btn-add:hover {
  border-color: var(--primary);
}

.btn-convert {
  flex: 2;
  padding: 0.65rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-convert:hover {
  background: var(--primary-hover);
}

.btn-convert:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 진행 상태 (다른 구조: progress-bar / progress-fill) */
.progress-section {
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s;
}

/* 결과 */
.result-section {
  margin-top: 2rem;
}

.result-section[hidden] {
  display: none;
}

.result-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.result-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.result-info {
  flex: 1;
  min-width: 0;
}

.result-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.result-detail {
  font-size: 0.8rem;
  color: var(--text-sub);
}

.btn-download {
  padding: 0.5rem 1.2rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
}

.btn-download:hover {
  background: var(--primary-hover);
}

.btn-reset {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.6rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-sub);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-reset:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 반응형 */
@media (max-width: 480px) {
  .result-card {
    flex-wrap: wrap;
  }

  .btn-download {
    width: 100%;
    text-align: center;
  }

  .actions {
    flex-direction: column;
  }

  .btn-convert {
    flex: 1;
  }

  .options {
    flex-direction: column;
  }
}
