/* 압축 풀기 */

nav { max-width: 1000px; }
main { max-width: 1000px; }

/* .dropzone 기본형은 common.css 한 곳에 있다 */
.dropzone:hover, .dropzone:focus-visible, .dropzone.drag-over {
  border-color: var(--primary);
  background-color: color-mix(in srgb, var(--primary) 4%, transparent);
  outline: none;
}
.dropzone[hidden] { display: none; }

.dz-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-sub);
}
.dz-icon { font-size: 2.2rem; }
.dz-line { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.dz-sub { font-size: 0.82rem; font-family: var(--font-mono); letter-spacing: 0.02em; }

.ax-reading {
  margin: 1rem 0;
  padding: 0.8rem 1rem;
  font-size: 0.88rem;
  color: var(--text-sub);
  background: var(--surface-2);
  border-radius: 10px;
  text-align: center;
}
.ax-reading[hidden] { display: none; }

/* ── 안내 문구 (인코딩·암호) ── */
.ax-note {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-sub);
}

.ax-password,
.ax-encoding {
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
  background: color-mix(in srgb, var(--warning) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--warning) 25%, transparent);
  border-radius: 12px;
}
.ax-password[hidden], .ax-encoding[hidden] { display: none; }

.ax-password-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
}
.ax-password-row input {
  flex: 1 1 auto;
  min-height: 46px;
  padding: 0.6rem 0.8rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.ax-password-row input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-tint);
}
.ax-password-row .btn { min-height: 46px; }

.ax-encoding label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-sub);
}
.ax-encoding select {
  min-height: 44px;
  padding: 0.5rem 0.7rem;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
}

/* ── 파일 이름 줄 ── */
.ax-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.7rem;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ax-bar[hidden] { display: none; }
.ax-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  overflow-wrap: anywhere;
}
.ax-count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-sub);
}
.ax-bar .btn-clear { margin-left: auto; }

/* ── 목록 ── */
.ax-list-wrap {
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ax-list-wrap[hidden] { display: none; }

.ax-list {
  list-style: none;
  max-height: 440px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
}
.ax-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid var(--border);
}
.ax-row:last-child { border-bottom: none; }
.ax-row-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.88rem;
  color: var(--text);
  /* 긴 경로가 줄을 밀어내지 않게 자른다 — 전체는 title로 볼 수 있다 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ax-row-size {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-sub);
}
.ax-row-btn {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 0.7rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.ax-row-btn:hover { border-color: var(--primary); }
.ax-row-btn:disabled { opacity: 0.5; cursor: default; }

.ax-truncated {
  padding: 0.5rem 0.4rem 0.2rem;
  font-size: 0.78rem;
  color: var(--text-sub);
}
.ax-truncated[hidden] { display: none; }

/* ── 저장 ── */
.ax-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.ax-actions[hidden] { display: none; }
.ax-actions .btn {
  min-height: 50px;
  min-width: 190px;
  font-size: 0.95rem;
  font-weight: 700;
}
.ax-actions .btn:disabled { opacity: 0.6; cursor: default; }
.ax-actions .btn[hidden] { display: none; }

@media (max-width: 480px) {
  .ax-list { max-height: 360px; }
  .ax-row-name { font-size: 0.82rem; }
  .ax-actions .btn { width: 100%; min-width: 0; }
  .ax-format { width: 100%; }
  .ax-format select { flex: 1 1 auto; }
  .ax-password-row { flex-direction: column; }
}

/* 압축 프로그램이 넣은 항목을 숨겼다는 알림 — 목록의 마지막 줄로 조용히 */
.ax-hidden-note {
  padding: 0.5rem 0.4rem 0.2rem;
  font-size: 0.76rem;
  color: var(--text-sub);
  list-style: none;
}

/* 폴더 저장이 막히는 환경 안내 */
.ax-format {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-sub);
}
.ax-format select {
  min-height: 50px;
  padding: 0.5rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.ax-format select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-tint);
}

.ax-save-hint {
  margin-top: 0.6rem;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--text-sub);
  text-align: center;
}
.ax-save-hint[hidden] { display: none; }
