/* Hillman Reid stamp designer: inherits the theme's fonts; colours are tokens a theme can override */
.hrsd {
  --hrsd-ink: #1f1d1a; --hrsd-muted: #6b665e; --hrsd-line: #e3ddd2; --hrsd-bg: #fbf8f2; --hrsd-card: #ffffff;
  --hrsd-accent: #2e6b4f; --hrsd-accent-ink: #ffffff;
  --hrsd-err: #a8321d; --hrsd-err-bg: #fbece8; --hrsd-warn: #8a5a00; --hrsd-warn-bg: #fdf3dc;
  --hrsd-info: #2c5a85; --hrsd-info-bg: #eaf2fa; --hrsd-ok: #2e6b4f; --hrsd-ok-bg: #e8f3ec;
  font: inherit; color: var(--hrsd-ink); background: var(--hrsd-bg); border: 1px solid var(--hrsd-line);
  box-sizing: border-box; border-radius: 12px; padding: 20px; margin: 16px 0; display: grid; gap: 12px; max-width: 640px; min-width: 0; width: 100%; overflow-wrap: anywhere;
}
.hrsd * { box-sizing: border-box; }
.hrsd p { margin: 0; }
.hrsd-loading { color: var(--hrsd-muted); }
.hrsd-eyebrow { font-size: 0.78em; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hrsd-muted); font-weight: 600; margin-top: 4px; }
.hrsd-form { display: grid; gap: 10px; }
.hrsd-drop { display: grid; gap: 4px; padding: 22px; text-align: center; border: 1.5px dashed #c9bfae; border-radius: 10px; background: var(--hrsd-card); cursor: pointer; }
.hrsd-drop span { color: var(--hrsd-muted); font-size: 0.9em; }
.hrsd-drop.is-over { border-color: var(--hrsd-accent); background: var(--hrsd-ok-bg); }
.hrsd-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.hrsd-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.hrsd-seg__opt { font: inherit; padding: 10px 6px; border: 1px solid var(--hrsd-line); background: var(--hrsd-card); border-radius: 8px; cursor: pointer; color: var(--hrsd-ink); }
.hrsd-seg__opt.is-on { border-color: var(--hrsd-accent); box-shadow: inset 0 0 0 1px var(--hrsd-accent); font-weight: 600; }
/* Width × Height: compact controls with an "in" suffix; the × is centred on the controls, not the labels */
.hrsd-row { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.hrsd-num { display: grid; gap: 4px; flex: 0 1 6.5em; min-width: 5.75em; }
.hrsd-num__label { font-size: 0.85em; color: var(--hrsd-muted); }
.hrsd-num__control { display: flex; align-items: center; height: 2.9em; min-height: 44px; border: 1px solid #cfc7b8; border-radius: 8px;
  background: var(--hrsd-card); padding-right: 12px; cursor: text; }
.hrsd-num__control:focus-within { border-color: var(--hrsd-accent); box-shadow: 0 0 0 2px rgba(46, 107, 79, 0.18); }
.hrsd .hrsd-num__control input { font: inherit; color: var(--hrsd-ink); flex: 1 1 auto; width: 100%; min-width: 0; max-width: none; height: 100%; min-height: 0;
  margin: 0; padding: 0 4px 0 12px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; outline: none; -moz-appearance: textfield; appearance: textfield; }
.hrsd .hrsd-num__control input::-webkit-outer-spin-button, .hrsd .hrsd-num__control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hrsd-num__unit { flex: none; color: var(--hrsd-muted); font-size: 0.95em; pointer-events: none; }
.hrsd-x { display: flex; align-items: center; height: 2.9em; min-height: 44px; color: var(--hrsd-muted); }
.hrsd-hint { font-size: 0.86em; color: var(--hrsd-muted); }
.hrsd-check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: 0.93em; cursor: pointer; }
.hrsd-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--hrsd-accent); }
.hrsd-check--rights { background: var(--hrsd-card); border: 1px solid var(--hrsd-line); border-radius: 8px; padding: 12px; }
.hrsd-btn { font: inherit; font-weight: 600; padding: 13px 18px; border-radius: 8px; border: 0; background: var(--hrsd-accent); color: var(--hrsd-accent-ink); cursor: pointer; width: 100%; }
.hrsd-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.hrsd-link { font: inherit; font-size: 0.88em; background: none; border: 0; color: var(--hrsd-accent); text-decoration: underline; cursor: pointer; padding: 0; }
.hrsd-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.hrsd-status { font-weight: 700; font-size: 1.1em; }
.hrsd-status--rejected, .hrsd-status--artwork_rejected, .hrsd-status--changes_requested { color: var(--hrsd-err); }
.hrsd-status--customer_approved, .hrsd-status--production_ready { color: var(--hrsd-ok); }
.hrsd-progress { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; background: var(--hrsd-card); border: 1px solid var(--hrsd-line); border-radius: 10px; padding: 14px; }
.hrsd-progress p { color: var(--hrsd-muted); font-size: 0.92em; margin-top: 2px; }
.hrsd-steps { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 8px 0 4px; padding: 0; list-style: none; font-size: 0.86em; }
.hrsd-steps__item { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--hrsd-line); color: var(--hrsd-muted); }
.hrsd-steps__item.is-done { color: var(--hrsd-ok); border-color: var(--hrsd-ok); }
.hrsd-steps__item.is-current { color: var(--hrsd-accent-ink); background: var(--hrsd-accent); border-color: var(--hrsd-accent); font-weight: 600; }
.hrsd-preflight { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--hrsd-line); border-radius: 10px; background: var(--hrsd-card); }
.hrsd-preflight__measured { margin: 0; padding-left: 18px; font-size: 0.93em; }
.hrsd-preflight__size { font-weight: 600; }
.hrsd-preflight__figure { margin: 0; }
.hrsd-preflight__figure img { display: block; width: 100%; height: auto; border: 1px solid var(--hrsd-line); border-radius: 8px; }
.hrsd-preflight__figure figcaption { font-size: 0.85em; color: var(--hrsd-muted); margin-top: 4px; }
.hrsd-spinner { width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--hrsd-line); border-top-color: var(--hrsd-accent); animation: hrsd-spin 0.9s linear infinite; }
@keyframes hrsd-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hrsd-spinner { animation: none; } }
.hrsd-reject { border-left: 4px solid var(--hrsd-err); padding: 4px 0 4px 12px; }
.hrsd-reject strong { color: var(--hrsd-err); font-size: 1.05em; }
.hrsd-reject p { color: var(--hrsd-muted); font-size: 0.92em; }
.hrsd-note { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: 0.93em; }
.hrsd-note__icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.8em; color: #fff; }
.hrsd-note__body { display: grid; gap: 3px; min-width: 0; }
/* a note without an icon must not fall into the 24px icon column */
.hrsd-note > .hrsd-note__body:first-child { grid-column: 1 / -1; }
.hrsd-note__fix span, .hrsd-note__staff span { font-weight: 600; }
.hrsd-note--error { background: var(--hrsd-err-bg); } .hrsd-note--error .hrsd-note__icon { background: var(--hrsd-err); }
.hrsd-note--warning { background: var(--hrsd-warn-bg); } .hrsd-note--warning .hrsd-note__icon { background: var(--hrsd-warn); }
.hrsd-note--info { background: var(--hrsd-info-bg); } .hrsd-note--info .hrsd-note__icon { background: var(--hrsd-info); }
.hrsd-note--success { background: var(--hrsd-ok-bg); } .hrsd-note--success .hrsd-note__icon { background: var(--hrsd-ok); }
.hrsd-previews { display: grid; gap: 8px; }
.hrsd-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hrsd-line); }
.hrsd-tabs button { font: inherit; font-size: 0.9em; background: none; border: 0; padding: 8px 12px; cursor: pointer; color: var(--hrsd-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.hrsd-tabs button.is-on { color: var(--hrsd-ink); border-bottom-color: var(--hrsd-accent); font-weight: 600; }
.hrsd-preview { max-width: 100%; width: 100%; height: auto; border-radius: 10px; background: #fff; border: 1px solid var(--hrsd-line); aspect-ratio: 1 / 1; object-fit: contain; }
.hrsd-caption { font-size: 0.86em; color: var(--hrsd-muted); }
.hrsd-specs { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; font-size: 0.93em; }
.hrsd-specs dt { color: var(--hrsd-muted); } .hrsd-specs dd { margin: 0; font-variant-numeric: tabular-nums; }
.hrsd-approve { display: grid; gap: 10px; background: var(--hrsd-card); border: 1px solid var(--hrsd-line); border-radius: 10px; padding: 14px; }
.hrsd-price { font-weight: 600; }
.hrsd-locked { opacity: 0.5 !important; cursor: not-allowed !important; }
@media (max-width: 480px) { .hrsd { padding: 14px; } .hrsd-seg { grid-template-columns: repeat(2, 1fr); } }

.hrsd-pdf { display: inline-block; margin-top: 8px; font-size: 14px; color: inherit; text-decoration: underline; }

.hrsd-warning-list { margin: 2px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.hrsd-warning-list li { line-height: 1.35; }
.hrsd-warning-fix { color: var(--hrsd-muted); }
.hrsd-alternative-tabs { flex-wrap: wrap; }

.hrsd-design-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hrsd-design-comparison > div { display: grid; gap: 6px; }
@media (max-width: 480px) { .hrsd-design-comparison { grid-template-columns: 1fr; } }

/* Keep comparison artwork inside padded, equally sized panels. */
.hrsd-design-comparison > div { min-width: 0; }
.hrsd-design-comparison .hrsd-preview {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 220px;
  padding: 20px;
  object-fit: contain;
  object-position: center;
  background: white;
}

/* Square preview frames and bordered navigation tabs. */
.hrsd .hrsd-preview,
.hrsd .hrsd-design-comparison .hrsd-preview {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}
[data-hr-stamp-product-preview] {
  aspect-ratio: 1 / 1;
  height: auto;
  overflow: hidden;
}
.hrsd .hrsd-tabs {
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 0;
}
.hrsd .hrsd-tabs button {
  flex: 1 1 auto;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--hrsd-line);
  border-radius: 8px;
  background: var(--hrsd-card);
  text-align: center;
}
.hrsd .hrsd-tabs button.is-on,
.hrsd .hrsd-tabs button[aria-selected="true"] {
  background: var(--hrsd-accent);
  border-color: var(--hrsd-accent);
  color: var(--hrsd-accent-ink);
}
.hrsd .hrsd-tabs button:focus-visible {
  outline: 2px solid var(--hrsd-accent);
  outline-offset: 3px;
}

/* Stamp layout acceptance and rejection controls. */
.hrsd-layout-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.hrsd .hrsd-btn--secondary {
  background: var(--hrsd-card);
  color: var(--hrsd-accent);
  border: 1px solid var(--hrsd-accent);
}
@media (max-width: 480px) {
  .hrsd-layout-actions { grid-template-columns: 1fr; }
}

/* Readable artwork revision choices. */
.hrsd [data-design-options] { gap: 14px; }
.hrsd [data-design-options] > .hrsd-check {
  padding: 12px;
  border: 1px solid var(--hrsd-line);
  border-radius: 8px;
  background: var(--hrsd-card);
}
.hrsd [data-design-options] > .hrsd-check > span {
  display: grid;
  gap: 5px;
}
.hrsd-mode-description {
  line-height: 1.45;
  color: var(--hrsd-muted);
}
.hrsd-mode-unavailable {
  font-size: 0.85em;
  color: var(--hrsd-muted);
}

.hrsd-artwork-guidance {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--hrsd-line);
  padding-top: 10px;
}

.hrsd-artwork-guidance ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
/* Upload and (when configured) Canva side by side; stacked on narrow screens. The Canva link looks like a button. */
.hrsd-artwork-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hrsd-artwork-actions > .hrsd-btn { flex: 1 1 200px; text-align: center; text-decoration: none; box-sizing: border-box; }
@media (max-width: 480px) { .hrsd-artwork-actions > .hrsd-btn { flex-basis: 100%; } }

.hrsd-flash:empty { display: none; }

/* product preview overlay (sits inside the page's product image area; the theme image stays below) */
.hrsd-product-preview { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: inherit; overflow: hidden; }
.hrsd-product-preview[hidden] { display: none; }
.hrsd-product-preview__img { display: block; width: 100%; height: 100%; object-fit: contain; }
.hrsd-product-preview__badge { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 6px 10px; border-radius: 6px;
  background: rgba(17, 17, 17, 0.78); color: #fff; font-size: 0.85em; line-height: 1.3; text-align: center; }
.hrsd-product-preview[data-state="job"] .hrsd-product-preview__badge { background: rgba(48, 100, 71, 0.85); }
.hrsd-product-preview[data-state="job-blocked"] .hrsd-product-preview__badge { background: rgba(140, 90, 10, 0.88); }
.hrsd-product-preview[data-state="failed"] .hrsd-product-preview__badge { background: rgba(160, 40, 40, 0.88); }
/* failed: no example stamp behind the message (it could be mistaken for the customer's result) */
.hrsd-product-preview[data-state="failed"] { background: #f4f1ea; }
.hrsd-product-preview[data-state="failed"] .hrsd-product-preview__img { visibility: hidden; }
.hrsd-product-preview[data-state="failed"] .hrsd-product-preview__badge { top: 50%; bottom: auto; transform: translateY(-50%); }
.hrsd-product-preview__photos { position: absolute; top: 10px; right: 10px; padding: 5px 10px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); color: #222; font: inherit; font-size: 0.8em; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); }
@media (max-width: 600px) { .hrsd-product-preview__badge { left: 6px; right: 6px; bottom: 6px; font-size: 0.78em; } }
.hrsd-variant-note { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--hrsd-warn-bg); font-size: 0.93em; }

/* automatic size pricing: "Your Stamp" summary beside the size inputs; price + Add to Cart after approval */
/* size inputs + Your Stamp: side by side only when the designer itself is wide enough (container query) */
.hrsd-size-grid { container-type: inline-size; container-name: hrsd-size; min-width: 0; }
.hrsd-size-grid__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.hrsd-size-grid__inputs { display: grid; gap: 8px; min-width: 0; }
@container hrsd-size (min-width: 30em) {
  .hrsd-size-grid__inner { grid-template-columns: minmax(15.5em, 1fr) minmax(12.5em, 14em); gap: 16px; }
}
.hrsd-summary { display: grid; gap: 10px; border: 1px solid var(--hrsd-line); border-radius: 10px; background: var(--hrsd-card); padding: 14px 16px; min-width: 0; }
.hrsd-summary .hrsd-eyebrow { margin: 0; }
.hrsd-summary__item { display: grid; gap: 2px; min-width: 0; }
.hrsd-summary__label { font-size: 0.85em; color: var(--hrsd-muted); }
.hrsd-summary__value { font-weight: 600; }
.hrsd-summary__price .hrsd-price-value { font-size: 1.5em; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow-wrap: normal; }
.hrsd-summary__price .hrsd-price-value--note { font-size: 0.93em; font-weight: 400; line-height: 1.45; white-space: normal; overflow-wrap: break-word; color: var(--hrsd-ink); }
.hrsd .hrsd-summary__actual { margin: 0; padding-top: 10px; border-top: 1px solid var(--hrsd-line); font-size: 0.93em; overflow-wrap: break-word; }
.hrsd-summary__actual .hrsd-summary__label { font-size: inherit; }
.hrsd-summary__actual [data-summary-actual] { white-space: nowrap; }
.hrsd-buy { display: grid; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hrsd-line); }
.hrsd-buy__note:empty { display: none; }
.hrsd-buy__note { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--hrsd-warn-bg); font-size: 0.93em; }
.hrsd-btn--cart { width: 100%; }
