/* pdf-split 고유 스타일 */

/* 분할 섹션 */
.split-section {
  margin-top: 1.5rem;
}

.split-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);
}

/* 모드 컨텐츠 */
.mode-content {
  margin-bottom: 1.25rem;
}

.mode-content[hidden] {
  display: none;
}

.mode-desc {
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-top: 0.25rem;
}

/* 범위 입력 */
.range-inputs {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.range-separator {
  font-size: 1.25rem;
  color: var(--text-sub);
  padding-bottom: 0.4rem;
}

/* 폼 */
.form-group {
  margin-bottom: 0.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-sub);
  margin-bottom: 0.25rem;
}

.form-group input[type="number"],
.form-group input[type="text"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.range-inputs .form-group input[type="number"] {
  width: 100px;
}

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

/* 분할 버튼 */
.btn-split {
  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-split:hover {
  background: var(--primary-hover);
}

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

/* 진행 상태 */
.progress-section {
  margin-top: 1.5rem;
  text-align: center;
}

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

.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;
}

.progress-text {
  font-size: 0.85rem;
  color: var(--text-sub);
}

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

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

.result-section h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.result-list {
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.result-item {
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}

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

.result-item .result-name {
  font-size: 0.875rem;
  font-weight: 500;
}

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

.result-item .btn-download {
  padding: 0.4rem 0.8rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
}

.result-item .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) {
  .file-info-bar {
    flex-wrap: wrap;
  }

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