/* ============ Batch upload page ============ */

.batch-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 28px 120px;
}
@media (max-width: 820px) { .batch-page { padding: 56px 20px 80px; } }

.batch-head {
  max-width: 720px;
  margin-bottom: 56px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.batch-h {
  font-size: clamp(48px, 7vw, 80px);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1;
}
.batch-sub {
  margin: 0;
  font-size: 18px;
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 56ch;
}
.batch-sub b {
  color: var(--ink);
  font-weight: 600;
}

/* Two-column layout: copy on left, animated platform list on right.
   Collapses to single column under 960px. */
.batch-head-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 80px;
  align-items: center;
  margin-bottom: 56px;
}
@media (max-width: 960px) {
  .batch-head-grid { grid-template-columns: 1fr; gap: 40px; }
}
.batch-head-grid .batch-head { margin-bottom: 0; }

/* Inline spec chips under the sub-line */
.batch-spec-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.batch-spec-chip {
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--bg-2);
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.batch-spec-chip b { color: var(--ink); font-weight: 600; }

/* Animated platform checklist */
.pf-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pf-list-eyebrow {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.pf-list-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pf-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.pf-list.is-revealed .pf-list-item { opacity: 1; transform: translateX(0); }
.pf-list.is-revealed .pf-list-item:nth-child(1) { transition-delay: 0.05s; }
.pf-list.is-revealed .pf-list-item:nth-child(2) { transition-delay: 0.25s; }
.pf-list.is-revealed .pf-list-item:nth-child(3) { transition-delay: 0.45s; }
.pf-list.is-revealed .pf-list-item:nth-child(4) { transition-delay: 0.65s; }
.pf-list.is-revealed .pf-list-item:nth-child(5) { transition-delay: 0.95s; }
.pf-list-check {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 14%, var(--bg));
  border: 1px solid color-mix(in oklab, var(--accent) 38%, var(--line));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transform: scale(0.85);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pf-list.is-revealed .pf-list-item .pf-list-check { transform: scale(1); }
.pf-list-check svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke: var(--accent-ink);
  fill: none;
  stroke-dasharray: 14;
  stroke-dashoffset: 14;
  transition: stroke-dashoffset 0.4s ease 0.15s;
}
.pf-list.is-revealed .pf-list-item .pf-list-check svg { stroke-dashoffset: 0; }
.pf-list-item.is-more .pf-list-check {
  background: transparent;
  border-color: color-mix(in oklab, var(--ink) 20%, transparent);
}
.pf-list-item.is-more .pf-list-check svg { stroke: var(--ink-3); }
.pf-list-item.is-more .pf-list-name {
  color: var(--ink-3);
  font-style: italic;
  font-family: var(--ff-display);
  font-size: 22px;
  letter-spacing: 0.005em;
}
.pf-list-name {
  font-family: var(--ff-sans);
  font-size: 21px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.batch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: flex-start;
}
@media (max-width: 960px) {
  .batch-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ====== Drop zone ====== */
.batch-drop {
  display: block;
  border: 1.5px dashed color-mix(in oklab, var(--ink) 22%, transparent);
  border-radius: var(--radius-xl);
  background: var(--bg-2);
  padding: 64px 28px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
  text-align: center;
}
.batch-drop:hover, .batch-drop.is-drag {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 6%, var(--bg-2));
}
.batch-drop.is-drag { transform: scale(1.005); }
.batch-drop.is-compact {
  padding: 28px 24px;
}
.batch-drop-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.batch-drop-icon {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 6px;
}
.batch-drop.is-compact .batch-drop-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 0;
}
.batch-drop.is-compact .batch-drop-icon svg { width: 22px; height: 22px; }
.batch-drop-title {
  font-family: var(--ff-display);
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.batch-drop.is-compact .batch-drop-title { font-size: 19px; }
.batch-drop-sub {
  color: var(--ink-3);
  font-size: 14.5px;
}
.batch-drop-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 14px;
}

/* ====== List ====== */
.batch-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 28px 0 14px;
  font-size: 14px;
}
.batch-list-count b {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: 22px;
  color: var(--ink);
  margin-right: 4px;
}
.batch-list-actions {
  display: flex;
  gap: 8px;
}
.btn-sm { padding: 6px 12px; font-size: 13px; }

.batch-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.batch-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px 8px 8px;
  transition: border-color 0.15s, transform 0.15s;
}
.batch-item:hover {
  border-color: color-mix(in oklab, var(--accent) 50%, var(--line));
}
.batch-item-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: var(--bg-2);
  flex-shrink: 0;
}
.batch-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.batch-item-n {
  position: absolute;
  top: 4px;
  left: 4px;
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 2px 5px;
  border-radius: 3px;
}
.batch-item-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.batch-item-name {
  font-size: 13.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.batch-item-size {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.batch-item-x {
  border: none;
  background: transparent;
  color: var(--ink-3);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}
.batch-item-x:hover {
  background: var(--bg-2);
  color: var(--ink);
}

/* ====== Cart sidebar ====== */
.batch-cart {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (max-width: 960px) {
  .batch-cart { position: static; }
}
.cart-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cart-row-head {
  margin-bottom: 6px;
}
.cart-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14.5px;
  color: var(--ink-2);
}
.cart-line-v { color: var(--ink); font-weight: 500; }
.cart-line-v b {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: 20px;
}
.cart-line-total {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 4px;
  font-size: 15px;
  color: var(--ink);
}
.cart-total-n {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: 36px;
  letter-spacing: -0.01em;
  color: var(--accent);
}
.cart-eta {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--bg-2);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.4;
}
.cart-eta-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--accent);
  flex-shrink: 0;
  animation: cart-pulse 1.6s ease-in-out infinite;
}
@keyframes cart-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 50%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 0%, transparent); }
}
.cart-cta {
  width: 100%;
  margin-top: 4px;
}
.cart-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.cart-fine {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.batch-back {
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
  text-decoration: none;
  padding: 8px;
}
.batch-back:hover { color: var(--ink); }

/* ====== Payment modal ====== */
.modal-scrim {
  position: fixed;
  inset: 0;
  background: color-mix(in oklab, var(--ink) 70%, transparent);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  animation: fade-in 0.2s ease-out;
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal {
  background: var(--bg);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 480px;
  width: 100%;
  position: relative;
  animation: modal-in 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink-3);
  font-size: 14px;
  transition: background 0.15s;
}
.modal-x:hover { background: var(--bg-2); color: var(--ink); }
.modal-h {
  font-family: var(--ff-display);
  font-size: 30px;
  font-weight: 400;
  margin: 8px 0 12px;
  letter-spacing: -0.01em;
  line-height: 1.1;
  max-width: 22ch;
}
.modal-p {
  margin: 0 0 22px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
}

.pay-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pay-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pay-field span {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-family: var(--ff-mono);
}
.pay-field input {
  font-size: 15px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  font-family: var(--ff-sans);
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}
.pay-field input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
}
.pay-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.pay-cta {
  width: 100%;
  margin-top: 8px;
}
.pay-fine {
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-3);
}

.pay-progress {
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pay-progress-bar {
  height: 6px;
  background: var(--bg-2);
  border-radius: 999px;
  overflow: hidden;
}
.pay-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  animation: progress-grow 12s ease-out forwards;
}
@keyframes progress-grow {
  0% { width: 0%; }
  100% { width: 92%; }
}
.pay-progress-label {
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-align: center;
}

/* ====== Delivery view (post-payment) ====== */
.dv-progress {
  margin: 8px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dv-bar {
  height: 6px;
  background: var(--bg-2);
  border-radius: 999px;
  overflow: hidden;
}
.dv-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.dv-bar-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.dv-grid {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  padding: 2px;
}
.dv-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-2);
  opacity: 0.35;
  transition: opacity 0.3s, filter 0.4s;
  filter: grayscale(0.6);
}
.dv-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dv-cell.is-done {
  opacity: 1;
  filter: none;
}
.dv-cell.is-working {
  opacity: 0.85;
  filter: grayscale(0.2);
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.dv-cell-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  display: grid;
  place-items: center;
}
.dv-cell-spinner {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--accent);
  border-radius: 6px;
  animation: dv-spin 0.9s linear infinite;
}
@keyframes dv-spin {
  to { transform: rotate(360deg); }
}
.dv-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}
.dv-download {
  width: 100%;
}
.dv-download:disabled {
  opacity: 0.5;
  cursor: progress;
}
.dv-fine {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
}

/* ====== Orphaned-session warning (arrived from a different tab) ====== */
.batch-orphan {
  background: color-mix(in oklab, #f59e0b 14%, var(--bg-2));
  border: 1px solid color-mix(in oklab, #f59e0b 40%, var(--line));
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 32px;
  max-width: 720px;
}
.batch-orphan b { font-weight: 600; }

/* ====== Awaiting payment (Stripe popup is open in another tab) ====== */
.batch-await {
  display: flex;
  justify-content: center;
  padding: 64px 0;
}
.batch-await-card {
  max-width: 560px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}
.batch-await-card h2 {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 6px 0 4px;
}
.batch-await-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.55;
}
.batch-await-card p b { color: var(--ink); font-weight: 600; }
.batch-await-pulse {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  align-self: flex-start;
}
.batch-await-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  animation: pfx-pulse 1.4s ease-in-out infinite;
}
@keyframes pfx-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}
.batch-await-fallback {
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
}
.batch-await-fallback a { color: var(--accent); text-decoration: underline; }

/* ====== Delivery view standalone (post-payment) ====== */
.batch-delivery {
  max-width: 960px;
}
.dv-cell.is-failed {
  outline: 2px solid #dc2626;
  outline-offset: -2px;
  opacity: 0.7;
}
