/* ============================================================
   Image to WebP — export.css
   Step 3: bulk progress bar + per-file results list with
   individual download buttons
   ============================================================ */


/* ══════════════════════════════════════════
   1. PROGRESS BAR (shown while converting)
   ══════════════════════════════════════════ */
.itw-progress {
  margin: 4px 0 20px;
}

.itw-progress__bar {
  width: 100%;
  height: 8px;
  border-radius: 9999px;
  background: var(--itw-line);
  overflow: hidden;
}

.itw-progress__fill {
  height: 100%;
  width: 0%;
  border-radius: 9999px;
  background: var(--itw-brand);
  transition: width 0.2s ease;
}

.itw-progress__label {
  margin: 8px 0 0;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--itw-ink-soft);
}


/* ══════════════════════════════════════════
   2. SUMMARY LINE (total files / total size)
   ══════════════════════════════════════════ */
.itw-summary {
  display: block;
  text-align: center;
  line-height: 1.5;
  overflow-wrap: anywhere;
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--itw-brand-soft);
  font-size: 13px;
  font-weight: 700;
  color: var(--itw-brand-dark);
}


/* ══════════════════════════════════════════
   3. RESULTS LIST
   ══════════════════════════════════════════ */
.itw-results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.itw-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  min-width: 0;
  border-radius: 14px;
  border: 1.5px solid var(--itw-line);
  background: #fff;
  animation: fcResultIn 0.2s ease both;
}

@keyframes fcResultIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.itw-result__thumbwrap {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(45deg, #e9e9ef 25%, transparent 25%) -6px 0/ 12px 12px,
    linear-gradient(-45deg, #e9e9ef 25%, transparent 25%) -6px 0/ 12px 12px,
    #fafafd;
}

.itw-result__thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.itw-result__info {
  flex: 1;
  min-width: 0;
}

.itw-result__name {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--itw-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.itw-result__meta {
  margin: 2px 0 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--itw-ink-soft);
}

.itw-result__meta strong {
  color: var(--itw-brand-dark);
}

/* ── Per-row status: converting spinner / done check / error ── */
.itw-result__status {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.itw-result__status--spinner {
  border-radius: 50%;
  border: 2.5px solid var(--itw-line);
  border-top-color: var(--itw-brand);
  animation: fcSpin 0.7s linear infinite;
}

@keyframes fcSpin {
  to { transform: rotate(360deg); }
}

.itw-result__status--done {
  color: var(--itw-brand);
}

.itw-result__status--error {
  color: var(--itw-error);
}

/* ── Per-file download button ── */
.itw-result__download {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--itw-line);
  background: #fff;
  color: var(--itw-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.itw-result__download svg {
  width: 16px;
  height: 16px;
}

@media (hover: hover) {
  .itw-result__download:hover {
    border-color: var(--itw-brand);
    color: var(--itw-brand);
    background: var(--itw-brand-soft);
  }
}

.itw-result__download:active {
  border-color: var(--itw-brand);
  background: var(--itw-brand-soft);
}

@media (pointer: coarse) {
  .itw-result__download {
    width: 40px;
    height: 40px;
  }
}


/* ══════════════════════════════════════════
   4. DESKTOP ENHANCEMENTS (≥768px)
   ══════════════════════════════════════════ */
@media (min-width: 768px) {
  .itw-result {
    padding: 10px 12px;
  }

  .itw-result__name {
    font-size: 14px;
  }
}
