/* ============================================================
   SwiftLife — HEIC to JPG (/tools/heic-to-jpg/)
   Sits on the placeholder's sheet and the tools section's
   (../tools.css). Here: the drop area, the settings, the list of
   photos and the notes under it, in the photo tile's gold
   (--photo, in placeholder.css).
   ============================================================ */

.hc { margin-top: 26px; }
.tl a:not(.hc-dl) { color: var(--link); text-underline-offset: 2px; }
.tl a:not(.hc-dl):hover { color: var(--link-2); }

/* A small label in the dateline's voice. */
.hc-opt > label:not(.hc-check), .hc-status {
  font: 500 .6875rem/1.35 var(--mono); letter-spacing: .12em; text-transform: uppercase;
}

/* ---- the drop area ---- */
.hc-drop {
  position: relative; text-align: center;
  padding: 30px 20px 22px;
  border: 2px dashed var(--rule-2); border-radius: 18px;
  background: var(--card); box-shadow: var(--shadow);
  transition: border-color .2s ease, background-color .2s ease;
}
.hc-drop.hc-over { border-color: var(--photo); background: var(--photo-tint); }
.hc-drop-i { display: block; width: 48px; height: 48px; margin: 0 auto 10px; color: var(--photo); }
.hc-drop-t { margin: 0 0 16px; font: 400 1.375rem/1.25 var(--serif); letter-spacing: -.01em; color: var(--ink); }
/* The real file box: out of sight, but still reached by Tab. */
.hc-file {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.hc-pick {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--photo); background: var(--photo); color: var(--on-photo);
  font: 600 1rem/1 var(--sans);
  transition: background-color .2s ease, border-color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.hc-pick:hover { background: var(--photo-2); border-color: var(--photo-2); }
.hc-file:focus-visible + .hc-pick { outline: 2px solid var(--focus); outline-offset: 3px; }
.hc-private {
  display: flex; justify-content: center; align-items: flex-start; gap: .6em; margin: 16px 0 0;
  font: 400 .75rem/1.5 var(--mono); color: var(--ink-3);
}
.hc-private svg { flex: none; width: 14px; height: 14px; margin-top: 2px; }

/* ---- the settings ---- */
.hc-opts {
  display: grid; gap: 16px 22px; margin: 18px 0 0; padding: 16px 18px;
  border: 1px solid var(--rule); border-radius: 14px; background: var(--cream);
}
.hc-opt > label:not(.hc-check) { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; color: var(--ink-2); }
.hc-opt .hc-q-out { font: 500 .875rem/1 var(--mono); letter-spacing: 0; color: var(--ink); }
.hc-opt input[type="range"] { display: block; width: 100%; height: 28px; margin: 0; accent-color: var(--photo); cursor: pointer; }
.hc-sel { position: relative; display: block; }
.hc-sel::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
  border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3); transform: rotate(45deg); pointer-events: none;
}
.hc-sel select {
  display: block; width: 100%; margin: 0; padding: 10px 40px 10px 12px;
  border: 1px solid var(--rule-2); border-radius: 10px;
  background: var(--bg); color: var(--ink);
  font: 400 16px/1.4 var(--sans); cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.hc-sel select:focus { border-color: var(--focus); outline: 3px solid var(--line-soft); outline-offset: 0; }
.hc-check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 500; color: var(--ink); }
.hc-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--photo); cursor: pointer; }
.hc-note { margin: 2px 0 0; font-size: .8125rem; line-height: 1.45; color: var(--ink-3); }

/* ---- what's happening, and the buttons for all of them ---- */
.hc-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.hc-bar[data-on="1"] { margin: 24px 0 0; }
.hc-status { margin: 0; color: var(--ink-2); }
.hc-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.hc-btn {
  min-height: 44px; padding: 0 18px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--rule-2); background: var(--card); color: var(--ink);
  font: 600 .9375rem/1 var(--sans);
  transition: background-color .2s ease, border-color .2s ease;
}
.hc-btn:hover { background: var(--cream); }
.hc-btn-go { border-color: var(--photo); background: var(--photo); color: var(--on-photo); }
.hc-btn-go:hover { border-color: var(--photo-2); background: var(--photo-2); }
.hc-btn-quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.hc-btn-quiet:hover { background: var(--cream); color: var(--ink); }

/* ---- the photos ---- */
.hc-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.hc-list:empty { display: none; }
.hc-list:focus { outline: none; }
.hc-item {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 10px 12px 10px 10px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow);
}
.hc-thumb {
  display: grid; place-items: center; width: 64px; height: 64px; overflow: hidden;
  border-radius: 10px; background: var(--photo-tint); color: var(--photo);
}
.hc-thumb svg { width: 26px; height: 26px; }
.hc-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hc-info { min-width: 0; }
.hc-name { display: block; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-meta { display: block; margin-top: 2px; font-size: .8125rem; line-height: 1.45; color: var(--ink-2); }
.hc-item[data-state="wait"] .hc-meta { color: var(--ink-3); }
.hc-item[data-state="fail"] { border-color: var(--err-line); }
.hc-item[data-state="fail"] .hc-thumb { background: var(--err-bg); color: var(--err-ink); }
.hc-item[data-state="fail"] .hc-meta { color: var(--err-ink); }
@media (prefers-reduced-motion: no-preference) {
  .hc-item[data-state="work"] .hc-thumb svg { animation: hc-pulse 1.1s ease-in-out infinite; }
}
@keyframes hc-pulse { 50% { opacity: .35; } }
.hc-dl {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--photo); border-radius: 11px;
  color: var(--photo); text-decoration: none; font: 600 .9375rem/1 var(--sans);
  transition: background-color .2s ease, color .2s ease;
}
.hc-dl svg { width: 18px; height: 18px; flex: none; }
.hc-dl:hover { background: var(--photo); color: var(--on-photo); }
@media (max-width: 479px) {
  .hc-item { grid-template-columns: 56px minmax(0, 1fr); }
  .hc-thumb { width: 56px; height: 56px; }
  .hc-dl { grid-column: 1 / -1; justify-content: center; }
}

/* ---- without a script, or in a browser too old ---- */
.hc-alt {
  margin: 26px 0 0; padding: 11px 14px;
  border: 1px solid var(--rule-2); border-radius: 10px; background: var(--cream);
  font-size: .9375rem; color: var(--ink-2);
}

/* ---- good to know ---- */
.hc-h {
  margin: 52px 0 6px;
  font: 360 clamp(1.625rem, 1.3rem + 1.4vw, 2.125rem)/1.12 var(--serif); letter-spacing: -.022em;
  text-wrap: balance;
}
.hc-know h3 { margin: 24px 0 6px; font: 600 1.0625rem/1.35 var(--sans); color: var(--ink); }
.hc-know p { margin: 0; max-width: 64ch; line-height: 1.65; color: var(--ink-2); }
.hc-foot { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); }
.hc-foot p { margin: 0 0 10px; max-width: 62ch; font-size: .875rem; line-height: 1.6; color: var(--ink-2); }

@media (min-width: 560px) {
  .hc-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hc-opt-date { grid-column: 1 / -1; }
}
@media (min-width: 640px) {
  .hc-drop { padding: 40px 28px 26px; }
}
