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


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

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

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

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


/* ══════════════════════════════════════════
   2. SUMMARY LINE (total files / total size)
   ══════════════════════════════════════════ */
.fc-format-convert-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--fc-brand-soft);
  font-size: 13px;
  font-weight: 700;
  color: var(--fc-brand-dark);
}


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

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

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

.fc-format-convert-result__thumbwrap {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(45deg, #e9e9ef 25%, transparent 25%) -6px 0/ 12px 12px,
    linear-gradient(-45deg, #e9e9ef 25%, transparent 25%) -6px 0/ 12px 12px,
    #fafafd;
}

.fc-format-convert-result__thumbwrap .fc-format-convert-icon {
  width: 44%;
  height: 44%;
  color: var(--fc-ink-soft);
}

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

.fc-format-convert-result__info {
  flex: 1;
  min-width: 0;
}

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

.fc-format-convert-result__meta {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--fc-ink-soft);
}

.fc-format-convert-result__meta strong {
  color: var(--fc-brand-dark);
}

/* Small "PNG" pill shown once a row is actually converted — confirms at a
   glance that the file is no longer HEIC, right next to the size change. */
.fc-format-convert-result__badge {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--fc-brand-soft);
  color: var(--fc-brand-dark);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  vertical-align: 1px;
}

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

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

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

.fc-format-convert-result__status--done {
  color: var(--fc-brand);
}

.fc-format-convert-result__status--error {
  color: var(--fc-error);
}

/* ── Per-file download button ── */
.fc-format-convert-result__download {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--fc-line);
  background: #fff;
  color: var(--fc-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;
}

.fc-format-convert-result__download svg {
  width: 16px;
  height: 16px;
}

.fc-format-convert-result__download:hover {
  border-color: var(--fc-brand);
  color: var(--fc-brand);
  background: var(--fc-brand-soft);
}


/* ══════════════════════════════════════════
   4. START OVER — plain-text link under the export
   actions, for clearing this batch and converting a
   fresh set of photos without a full page reload
   ══════════════════════════════════════════ */
.fc-format-convert-start-over {
  display: block;
  width: 100%;
  margin: 16px 0 0;
  padding: 6px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--fc-ink-soft);
  text-decoration: underline;
  text-decoration-color: transparent;
  cursor: pointer;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.fc-format-convert-start-over:hover {
  color: var(--fc-brand-dark);
  text-decoration-color: currentColor;
}


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

  .fc-format-convert-result__name {
    font-size: 14px;
  }

  .fc-format-convert-start-over {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
}
