/* Custom banner order page (banners.html) and proof page (banner-proof.html). Builds on styles.css. */

.how-it-works {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 20px;
}
.how-it-works li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 0.85rem;
  font-weight: 600;
}
.how-it-works span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.8rem;
  font-weight: 700;
}
.label-note { font-weight: 400; color: var(--muted); }

/* ---------- Step 1: size cards ---------- */
.size-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.size-card {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  background: none;
  color: var(--ink);
  text-align: left;
  font: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.size-card:hover { border-color: rgba(173, 235, 0, 0.45); transform: translateY(-1px); }
.size-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.size-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The example art, framed at the banner's true proportions: a blurred copy fills the frame and the full
   example sits on top, so nothing is cropped away. */
.size-card { min-width: 0; }
.size-frame-area {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.size-frame {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  background: #000;
}
.size-frame .fg {
  display: block;
  width: 1px; /* real size set in px by fitFrame() */
  height: 1px;
  object-fit: contain;
  background: #000;
}
.size-frame::after {
  /* grommets in the corners */
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  bottom: 4px;
  left: 4px;
  background:
    radial-gradient(circle, #c9b27a 2.5px, transparent 3px) top left / 10px 10px no-repeat,
    radial-gradient(circle, #c9b27a 2.5px, transparent 3px) top right / 10px 10px no-repeat,
    radial-gradient(circle, #c9b27a 2.5px, transparent 3px) bottom left / 10px 10px no-repeat,
    radial-gradient(circle, #c9b27a 2.5px, transparent 3px) bottom right / 10px 10px no-repeat;
  pointer-events: none;
}
.size-title {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
}
.size-meta { color: var(--muted); font-size: 0.82rem; }
.size-price { color: var(--accent); font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.size-price .was { color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.size-card { position: relative; }
.sale-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
}
.size-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 8px; }
@media (max-width: 640px) {
  .size-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .size-card { padding: 8px; gap: 6px; }
  .size-frame-area { height: 78px; }
  .size-row { flex-direction: column; gap: 2px; }
  .size-title { font-size: 1.2rem; }
  .size-meta { font-size: 0.72rem; }
  .how-it-works li { font-size: 0.75rem; padding: 4px 10px 4px 4px; }
  .how-it-works span { width: 20px; height: 20px; }
}

/* To-scale size comparison */
.lineup-wrap { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 14px; }
.lineup-title { font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.lineup {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  border-bottom: 3px solid #3b3d38;
}
.lineup-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0;
}
.lineup-item img {
  display: block;
  object-fit: cover;
  border-radius: 2px;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.15s ease;
}
.lineup-item.selected { color: var(--accent); }
.lineup-item.selected img { outline-color: var(--accent); }
.lineup-person { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; color: var(--muted); font-size: 0.72rem; font-weight: 600; gap: 4px; }
.lineup-person svg { display: block; fill: #4a4c46; }

/* ---------- Step 2: upload ---------- */
.req-box {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}
.req-title { font-weight: 700; margin-bottom: 4px; }
.req-box ul { margin: 0; padding-left: 18px; color: var(--muted); }
.req-box li { margin-bottom: 3px; }
.req-box li strong { color: var(--ink); }
.designer-specs { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.designer-specs > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 0.85rem; }
.designer-specs p { color: var(--muted); font-size: 0.85rem; margin: 8px 0; }
.designer-specs strong { color: var(--ink); }
.specs-scroll { overflow-x: auto; }
.specs-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; white-space: nowrap; }
.specs-table th, .specs-table td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.specs-table th { color: var(--muted); font-weight: 600; }
.specs-table td small { color: var(--muted); }
.template-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
}
.chip-btn:hover { border-color: var(--accent); }
.chip-btn:disabled { opacity: 0.5; cursor: default; }
.chip-btn.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  border: 2px dashed rgba(173, 235, 0, 0.45);
  border-radius: var(--radius);
  padding: 22px 16px;
  cursor: pointer;
  margin: 0;
  font-weight: 400;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.drop-zone:hover, .drop-zone.dragging { background: var(--accent-soft); border-color: var(--accent); }
.drop-zone.disabled { opacity: 0.5; pointer-events: none; }
.drop-icon { font-size: 1.6rem; color: var(--accent); line-height: 1; }
.drop-title { font-family: var(--display); font-size: 1.4rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.drop-sub { color: var(--muted); font-size: 0.85rem; max-width: 460px; }

.design-list { display: grid; gap: 12px; margin-top: 14px; }
.design-card {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #0e0e0d;
}
.design-card.has-error { border-color: var(--danger-line); }
.design-card.is-ready { border-color: rgba(173, 235, 0, 0.45); }
@media (max-width: 640px) {
  .design-card { grid-template-columns: 1fr; }
}
.design-visual {
  display: grid;
  place-items: center;
  background: #131412;
  border-radius: 8px;
  min-height: 160px;
  overflow: hidden;
}
.design-visual canvas, .design-visual img { display: block; max-width: 100%; max-height: 360px; height: auto; }
.design-visual .thumb-bad { outline: 3px solid var(--danger); }
.design-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.design-title { font-weight: 700; }
.design-file { color: var(--muted); font-size: 0.8rem; word-break: break-all; }
.design-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 10px 0 6px; }
.design-controls .field { margin: 0; }
.design-controls select { width: auto; padding: 6px 8px; font-size: 0.9rem; }
.design-controls label { font-size: 0.75rem; }
.rotate-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0b0b0b;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}
.rotate-btn:hover { background: #000; box-shadow: 0 0 0 3px rgba(173, 235, 0, 0.2); }
.status-line { font-size: 0.85rem; margin-top: 6px; }
.status-ok { color: var(--accent); font-weight: 600; }
.status-warn { color: #f0c36d; }
.status-bad { color: var(--danger); font-weight: 600; }
.progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 6px; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width 0.2s ease; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.line-price { font-weight: 700; color: var(--accent); white-space: nowrap; }

/* ---------- Delivery ---------- */
.delivery-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
@media (max-width: 640px) { .delivery-options { grid-template-columns: 1fr; } }
.delivery-option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  margin: 0;
  font-weight: 600;
}
.delivery-option.selected { border-color: var(--accent); background: var(--accent-soft); }
.delivery-option .price { margin-left: auto; color: var(--accent); }
.delivery-option small { display: block; color: var(--muted); font-weight: 400; }
.delivery-option .ship-note { color: var(--accent); font-weight: 600; }
.grid-2.tight { gap: 10px; }

/* ---------- Proof page ---------- */
.proof-wrap { max-width: 760px; margin: 0 auto; }
.proof-status {
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.proof-status.ok { border-color: var(--accent); }
.proof-status.warn { border-color: #f0c36d; }
.proof-item img.mockup { display: block; width: 100%; height: auto; border-radius: 8px; }
.proof-item .meta { margin: 10px 0 0; color: var(--muted); font-size: 0.9rem; }
.proof-item .meta strong { color: var(--ink); }
.proof-actions { display: grid; gap: 14px; }
.btn-primary {
  width: 100%;
  background: #0b0b0b;
  color: var(--brand-green);
  border: 2px solid var(--brand-green);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.btn-primary:disabled { opacity: 0.55; cursor: default; }
.btn-secondary {
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  padding: 10px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn-secondary:hover { border-color: var(--accent); }
.replace-box { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }

/* Finishing options (grommets, pole pockets, wind slits) */
.finishing-box { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.finishing-box[hidden] { display: none; }
.finishing-controls { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 6px; }
.finishing-controls .field { margin: 0; min-width: 150px; }
.finishing-controls .field[hidden] { display: none; }
.finishing-controls label { font-size: 0.75rem; }
.finishing-controls select { padding: 6px 8px; font-size: 0.88rem; }
.finishing-controls select:disabled { opacity: 0.5; }
.field-note { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 3px; }
.finishing-details { margin: 8px 0 4px; font-size: 0.85rem; }
.finishing-details > summary { cursor: pointer; color: var(--muted); }
.finishing-details .link-like { color: var(--accent); font-weight: 600; margin-left: 4px; }
.finishing-details .finishing-controls { margin: 8px 0; }

/* Multiple banners: list heading, quantity stepper, add-another button */
.design-list-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-top: 16px; }
.design-list-head[hidden], .add-banner-btn[hidden] { display: none; }
.qty-stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty-stepper button { background: #0b0b0b; color: var(--accent); border: none; width: 34px; font-size: 1.1rem; font-weight: 700; cursor: pointer; }
.qty-stepper button:active { background: var(--accent-soft); }
.qty-stepper .qty-input { width: 56px; border: none; border-radius: 0; text-align: center; padding: 6px 4px; font-size: 0.95rem; -moz-appearance: textfield; }
.qty-stepper .qty-input::-webkit-outer-spin-button, .qty-stepper .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.add-banner-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  background: none;
  border: 2px dashed rgba(173, 235, 0, 0.45);
  border-radius: var(--radius);
  color: var(--accent);
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.add-banner-btn:hover { background: var(--accent-soft); border-color: var(--accent); }

.how-designs { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; font-size: 0.88rem; color: var(--muted); }
.how-designs strong { display: block; color: var(--ink); margin-bottom: 4px; }
.how-designs em { color: var(--accent); font-style: normal; font-weight: 600; }

/* "No artwork? We'll design it" */
.design-help-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.design-help-btn:hover { border-color: var(--accent); }
.design-help-btn strong { display: block; color: var(--accent); }
.design-help-btn span { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.ref-list { margin-top: 6px; }

/* Layout adjust panel (Fit / Fill & crop) */
.adjust-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 8px 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.adjust-panel .small-print { width: 100%; margin: 0; }
.adjust-zoom, .adjust-bg { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.82rem; }
.adjust-zoom input[type="range"] { width: 140px; accent-color: var(--accent); }
.adjust-bg select { width: auto; padding: 4px 6px; font-size: 0.82rem; }
.adjust-bg input[type="color"] { width: 36px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; }
.adjust-bg input[hidden] { display: none; }
.nudge { display: flex; align-items: center; gap: 4px; }
.nudge-btn { width: 32px; height: 30px; border: 1px solid var(--line); border-radius: 6px; background: #0b0b0b; color: var(--accent); font-weight: 700; cursor: pointer; }
canvas.draggable { cursor: grab; touch-action: none; }
canvas.draggable:active { cursor: grabbing; }
