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

/* 변환 섹션 */
.convert-section {
  margin-top: 1.5rem;
}

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

/* 파일 정보 바 */
.file-info-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}

.file-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
}

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

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

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

.btn-change {
  padding: 0.35rem 0.75rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-sub);
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s;
}

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

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

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

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

.radio-group {
  display: flex;
  gap: 1rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.radio-label input {
  accent-color: var(--primary);
}

.range-wrapper input[type="range"] {
  width: 120px;
}

/* 변환 버튼 */
.btn-convert {
  width: 100%;
  padding: 0.75rem;
  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-header {
  margin-bottom: 0.75rem;
}

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

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.result-card img {
  width: 100%;
  aspect-ratio: 210 / 297;
  object-fit: contain;
  background: white;
  display: block;
}

.result-card-info {
  padding: 0.6rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.result-card-info .page-label {
  font-size: 0.8rem;
  color: var(--text-sub);
}

.result-card-info .btn-download {
  padding: 0.3rem 0.6rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

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

.btn-reset {
  display: block;
  width: 100%;
  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-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .file-info-bar {
    flex-wrap: wrap;
  }
}
