/*
 * The photograph queue on the sell form (assets/js/sell-photos.js).
 *
 * Its own stylesheet rather than src/theme.css because the queue is one
 * component on one page, and a separate file with a separate version string
 * (enqueue.php stamps its filemtime) is the cheapest deploy that cannot
 * invalidate the whole Tailwind build for every other page.
 *
 * The palette is the theme's own — these custom properties are printed into
 * :root by the main stylesheet, and the fallbacks are what the queue looks
 * like on the few seconds a stale cache spends without them.
 */

.duncan-pq {
  margin-top: 0.75rem;
}

.duncan-pq__banner {
  margin: 0 0 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--sand-300, #d8d2c8);
  background: var(--sand-50, #faf9f7);
  color: var(--ink-600, #55605f);
  font-size: 14px;
  line-height: 1.45;
}

.duncan-pq__banner.is-bad {
  border-color: #b3261e;
  background: #fdf1f0;
  color: #8c1d18;
}

.duncan-pq__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.duncan-pq__row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--sand-200, #e8e4dd);
  border-radius: 0.5rem;
  background: #fff;
}

.duncan-pq__row.is-failed {
  border-color: #e3b7b3;
  background: #fdf7f6;
}

.duncan-pq__row.is-processing,
.duncan-pq__row.is-sending {
  border-color: var(--sand-300, #d8d2c8);
}

.duncan-pq__thumb {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.375rem;
  object-fit: cover;
  flex: none;
}

.duncan-pq__meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.duncan-pq__name {
  font-size: 13px;
  color: var(--ink-800, #22282b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.duncan-pq__status {
  font-size: 12px;
  color: var(--ink-500, #636e6d);
}

.duncan-pq__row.is-failed .duncan-pq__status {
  color: #8c1d18;
}

.duncan-pq__bar {
  height: 5px;
  border-radius: 999px;
  background: var(--sand-200, #e8e4dd);
  overflow: hidden;
}

.duncan-pq__fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand-600, #14673f);
  transition: width 0.25s ease-out;
}

.duncan-pq__row.is-processing .duncan-pq__fill {
  opacity: 0.55;
}

.duncan-pq__cover {
  flex: none;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--brand-700, #0f5132);
  background: var(--sand-100, #f4f2ee);
  border: 1px solid var(--sand-200, #e8e4dd);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

.duncan-pq__action {
  flex: none;
  appearance: none;
  border: 1px solid var(--sand-300, #d8d2c8);
  border-radius: 0.4rem;
  background: #fff;
  color: var(--ink-600, #55605f);
  font-size: 12px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}

.duncan-pq__action:hover {
  border-color: var(--ink-400, #98a2a1);
  color: var(--ink-800, #22282b);
}

/*
 * The "Clear form" button at the top of the sell page (sell.php). Printed
 * hidden because it is only honest once this script has bound to it: on a
 * browser this queue cannot run, the button must not look like a promise it
 * cannot keep. The ready class goes on with the binding.
 */
.duncan-sell-clear {
  display: none;
}

html.duncan-sell-clear-ready .duncan-sell-clear {
  display: inline-flex;
}
