/* ==========================================================================
   图片压缩 · 工具私有样式（挂在本工具目录下）
   基座（背景 / 卡片 / 控件）在 /tools/tool.css；这里只写本页特有的。
   ========================================================================== */

/* [hidden] 兜底：像 .range-row 这种带 display 的类会盖掉 UA 的 [hidden]，
   导致 JS 里切 hidden 藏不住（静默失效）→ 必须 !important。 */
[hidden] {
  display: none !important;
}

/* 拖放区文案 */
.dropzone-main {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 600;
}
.dropzone-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* 选项面板 */
#options {
  margin-top: 1.25rem;
  animation: toolFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem 1.5rem;
}
@media (min-width: 720px) {
  .options-grid { grid-template-columns: 1.2fr 1fr; }
}
.range-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.range-val {
  min-width: 3.2rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  color: var(--pink-deep);
  font-weight: 700;
}
/* 输出尺寸：随模式显隐的子行 + 预设 */
.resize-sub {
  margin-top: 0.4rem;
}
.resize-unit {
  font-size: 0.72rem;
  color: var(--text-3);
  white-space: nowrap;
}
.input-narrow {
  max-width: 9rem;
}
/* 每张卡片上的预计输出体积 */
.shot-est { color: var(--text-3); }

.options-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}
.options-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.options-actions {
  display: flex;
  gap: 0.6rem;
}

/* 结果网格 */
.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
}
@media (min-width: 720px) {
  .result-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 单张结果卡 */
.shot {
  display: flex;
  gap: 0.9rem;
  padding: 0.9rem;
}
.shot.is-done { animation: toolFadeUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) both; }

.shot-thumb {
  position: relative;
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  border-radius: 0.8rem;
  overflow: hidden;
  background: rgba(255, 253, 249, 0.8);
  border: 1px solid var(--border-color);
}
.shot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 压缩中：缩略图上叠一层进度环（只在处理中显示） */
.shot-ring {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 253, 249, 0.72);
}
.shot.is-doing .shot-ring { display: flex; }
.shot-ring svg { display: block; }

.shot-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.shot-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shot-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}
.shot-arrow { color: var(--macaron-mint-ink); }
.shot-save {
  color: var(--macaron-mint-ink);
  font-weight: 700;
}
.shot-save.is-bigger { color: var(--macaron-peach-ink); }

.shot-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(198, 156, 108, 0.18);
  overflow: hidden;
}
.shot-bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.shot-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
}
.shot-err {
  font-size: 0.72rem;
  color: var(--macaron-peach-ink);
}
.shot-stale {
  color: var(--macaron-peach-ink);
}

/* 下载小按钮 */
.shot-dl {
  padding: 0.32rem 0.7rem;
  font-size: 0.72rem;
}
