/* Override these variables on .stm-calculator to match a product template. */
.stm-calculator {
  --stm-ink:#332c27;
  --stm-muted:#6f6258;
  --stm-cream:#faf4e8;
  --stm-panel:#fff;
  --stm-input:#fff;
  --stm-red:#b52b25;
  --stm-red-hover:#92211c;
  --stm-orange:#e58a3a;
  --stm-border:#dfd0bd;
  --stm-control-border:#9b8677;
  --stm-frame:var(--stm-red);
  --stm-selected:#fff1ed;
  box-sizing:border-box;
  container:stm / inline-size;
  color:var(--stm-ink);
  color-scheme:light;
  font-family:inherit;
  font-size:16px;
  line-height:1.5;
  max-width:1100px;
  width:100%;
  min-width:0;
  margin:22px 0;
  padding:0;
  background:transparent;
  border:0;
  scroll-margin-top:32px;
}
.stm-calculator *, .stm-calculator *::before, .stm-calculator *::after {box-sizing:border-box}
.stm-calculator [hidden] {display:none!important}
.stm-calculator .stm-quantity-controls[data-single-layout="true"] {grid-template-columns:minmax(0,1fr)}
.stm-calculator .stm-form {display:block!important;margin:0!important;padding:24px!important;width:100%;background:var(--stm-panel)!important;border:2px solid var(--stm-frame);border-radius:0 0 12px 12px;box-shadow:none}
.stm-calculator h3 {font-size:20px;line-height:1.3;margin:0;color:var(--stm-ink)}
.stm-calculator p {font-size:14px;line-height:1.5;margin:8px 0;color:inherit}
.stm-calculator .stm-help {font-size:13px;color:var(--stm-muted)}
.stm-calculator button, .stm-calculator input, .stm-calculator select, .stm-calculator textarea {font-family:inherit;text-transform:none;letter-spacing:normal}
.stm-calculator button {cursor:pointer;margin:0;box-shadow:none;float:none;line-height:1.35}
.stm-calculator button:focus-visible, .stm-calculator summary:focus-visible, .stm-calculator a:focus-visible {outline:3px solid var(--stm-red);outline-offset:3px}
.stm-calculator button:disabled {cursor:not-allowed;opacity:1}
.stm-calculator .stm-tabs {display:flex;gap:0;position:relative;z-index:1;margin:0 0 -2px;padding:0}
.stm-calculator .stm-tabs button {display:flex;flex:1 1 0;align-items:center;justify-content:center;width:100%;min-width:0;min-height:52px;padding:12px 16px!important;border:2px solid var(--stm-frame)!important;border-radius:12px 12px 0 0;background:var(--stm-cream)!important;color:var(--stm-muted)!important;font-size:16px;font-weight:700;text-align:center}
.stm-calculator .stm-tabs button+button {margin-left:-2px}
.stm-calculator .stm-tabs button:focus-visible {position:relative;z-index:2}
.stm-calculator .stm-tabs button:hover:not(:disabled) {color:var(--stm-red)!important}
.stm-calculator .stm-tabs button[aria-selected=true] {background:var(--stm-panel)!important;color:var(--stm-red)!important;border-bottom-color:var(--stm-panel)!important}
.stm-calculator .stm-tabs button:disabled {color:var(--stm-muted)!important}
.stm-calculator .stm-layout {display:grid;grid-template-columns:minmax(0,1fr);gap:24px;align-items:start}
.stm-calculator .stm-main {min-width:0}
.stm-calculator section[data-step]:focus {outline:none}
.stm-calculator .stm-field.stm-format {margin-bottom:18px}
.stm-calculator .stm-options {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.stm-calculator .stm-options[data-option-count="2"] {grid-template-columns:repeat(2,minmax(0,1fr))}
.stm-calculator .stm-options[data-option-count="1"] {grid-template-columns:minmax(0,1fr)}
.stm-calculator .stm-sizes {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0}
.stm-calculator section[data-step="1"]>.stm-sizes:first-of-type, .stm-calculator .stm-options[hidden]+.stm-sizes {margin-top:0}
.stm-calculator .stm-field {display:flex;flex-direction:column;gap:7px;font-size:14px;font-weight:600;line-height:1.35;min-width:0;margin:0;color:var(--stm-ink)}
.stm-calculator .stm-field input, .stm-calculator .stm-field select, .stm-calculator .stm-fixed, .stm-calculator .stm-field textarea {width:100%!important;min-width:0;max-width:100%;height:46px;min-height:46px;margin:0;border:1px solid var(--stm-control-border)!important;border-radius:5px;padding:10px 12px!important;background:var(--stm-input)!important;color:var(--stm-ink)!important;font:inherit;font-size:16px!important;font-weight:400;line-height:1.4;box-shadow:none!important;opacity:1}
.stm-calculator .stm-field select {appearance:auto;background-image:none!important;padding-right:6px!important}
.stm-calculator .stm-field textarea {height:auto;min-height:86px;resize:vertical}
.stm-calculator .stm-field input:focus, .stm-calculator .stm-field select:focus, .stm-calculator .stm-field textarea:focus {outline:2px solid var(--stm-red)!important;outline-offset:2px}
.stm-calculator .stm-field input[readonly], .stm-calculator .stm-fixed {background:var(--stm-cream)!important}
.stm-calculator .stm-fixed {display:flex;align-items:center;height:auto;overflow-wrap:anywhere}
.stm-calculator .stm-design-section {margin:22px 0 0;border-top:1px solid var(--stm-border);padding-top:2px}
.stm-calculator .stm-allocation-summary {font-size:14px;overflow-wrap:anywhere}
.stm-calculator .stm-allocation-actions {display:flex;flex-wrap:wrap;gap:6px 18px;margin:4px 0 10px}
.stm-calculator .stm-quantity-rows {display:grid;gap:10px}
.stm-calculator .stm-quantity-row {display:grid;grid-template-columns:minmax(0,1fr) 105px;align-items:center;gap:12px}
.stm-calculator .stm-quantity-row span {overflow-wrap:anywhere}
.stm-calculator [data-quantity-editor] {padding:12px;background:var(--stm-cream);border:1px solid var(--stm-border);border-radius:6px;margin:8px 0 14px}
.stm-calculator [data-quantity-editor] .stm-help {margin-top:0;margin-bottom:12px}
.stm-calculator .stm-text-button {display:inline-flex;align-items:center;justify-content:flex-start;width:auto;min-height:32px;height:auto;background:transparent!important;color:var(--stm-red)!important;border:0!important;border-radius:3px;padding:4px 0!important;font-size:14px;font-weight:600;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;white-space:normal;text-align:left}
.stm-calculator .stm-text-button:hover {color:var(--stm-red-hover)!important;text-decoration-thickness:2px}
.stm-calculator .stm-text-button:disabled {color:var(--stm-muted)!important;text-decoration:none}
.stm-calculator .stm-primary {display:inline-flex;align-items:center;justify-content:center;width:100%;min-height:50px;padding:14px 18px!important;border:1px solid var(--stm-red)!important;border-radius:6px;background:var(--stm-red)!important;color:#fff!important;font-size:16px;font-weight:700;text-align:center;text-decoration:none}
.stm-calculator .stm-primary:hover:not(:disabled) {background:var(--stm-red-hover)!important;border-color:var(--stm-red-hover)!important}
.stm-calculator .stm-primary:disabled {background:#e9e1d5!important;border-color:var(--stm-control-border)!important;color:#62564b!important}
.stm-calculator .stm-secondary {display:inline-flex;align-items:center;justify-content:center;width:auto;min-height:44px;padding:10px 14px!important;border:1px solid var(--stm-red)!important;border-radius:5px;background:var(--stm-cream)!important;color:var(--stm-red)!important;font-size:14px;font-weight:700}
.stm-calculator .stm-secondary:hover:not(:disabled) {background:var(--stm-selected)!important}
.stm-calculator .stm-secondary:disabled {border-color:var(--stm-control-border)!important;color:var(--stm-muted)!important}
.stm-calculator .stm-quote {display:flex;flex-direction:column;gap:4px;min-width:0;border:1px solid var(--stm-border);border-radius:8px;background:var(--stm-cream);padding:20px;margin:0}
.stm-calculator .stm-price-row {display:flex;align-items:center;gap:10px;min-width:0}
.stm-calculator .stm-price-row [data-price] {min-width:0;overflow-wrap:anywhere}
.stm-calculator .stm-price-spinner {display:none;flex:0 0 16px;width:16px;height:16px;border:2px solid var(--stm-border);border-top-color:var(--stm-red);border-right-color:var(--stm-red);border-radius:50%;visibility:hidden}
.stm-calculator[data-loading-style=spinner] .stm-price-spinner {display:block}
.stm-calculator[data-loading-style=spinner][data-price-state=pending] .stm-price-spinner {visibility:visible;animation:stm-price-spin .8s linear infinite}
.stm-calculator[data-price-state=pending] [data-price] {opacity:.6}
.stm-calculator .stm-unit-line, .stm-calculator .stm-mobile-status {display:grid;grid-template-columns:minmax(0,1fr);min-height:1.5em}
.stm-calculator .stm-unit-line {font-size:14px}
.stm-calculator .stm-unit-line>span, .stm-calculator .stm-mobile-status>span {grid-area:1/1}
.stm-calculator .stm-unit-pending, .stm-calculator .stm-action-pending {visibility:hidden}
.stm-calculator[data-loading-style=unit_price][data-price-state=pending] .stm-unit-pending {visibility:visible}
.stm-calculator[data-loading-style=unit_price][data-price-state=pending] [data-unit], .stm-calculator[data-loading-style=unit_price][data-price-state=pending] [data-mobile-status] {visibility:hidden}
.stm-calculator [data-action] {display:grid;grid-template-columns:minmax(0,1fr)}
.stm-calculator [data-action]>span {grid-area:1/1}
.stm-calculator[data-loading-style=button][data-price-state=pending] [data-action-label] {visibility:hidden}
.stm-calculator[data-loading-style=button][data-price-state=pending] .stm-action-pending {visibility:visible}
@keyframes stm-price-spin {to {transform:rotate(360deg)}}
.stm-calculator .stm-quote [data-price] {font-size:32px;line-height:1.3;font-weight:700;color:var(--stm-ink)}
.stm-calculator .stm-quote [data-unit] {font-size:14px}
.stm-calculator .stm-quote-count {font-size:13px;color:var(--stm-muted);min-height:1.5em}
.stm-calculator .stm-spec-summary {font-size:13px;border-top:1px solid var(--stm-border);padding-top:12px;margin-top:10px;overflow-wrap:anywhere}
.stm-calculator .stm-action-help {font-size:12px;margin:5px 0 0}
.stm-calculator .stm-error {background:var(--stm-selected);border-left:3px solid var(--stm-red);padding:10px 12px;color:#842019;font-size:14px;overflow-wrap:anywhere}
.stm-calculator .stm-unavailable {font-size:14px}
.stm-calculator .stm-artwork-heading {display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px 12px;align-items:center}
.stm-calculator .stm-artwork-toolbar {display:flex;flex-wrap:wrap;gap:4px 18px;align-items:center;justify-content:space-between;margin:16px 0 10px;font-size:13px;color:var(--stm-muted)}
.stm-calculator .stm-artwork-toolbar button {font-size:13px}
.stm-calculator .stm-design-row {display:block;border:1px solid var(--stm-border);background:var(--stm-panel);border-radius:7px;padding:0;margin:12px 0 0;min-width:0;overflow:visible}
.stm-calculator .stm-design-row[open] {border-color:var(--stm-control-border)}
.stm-calculator .stm-design-summary {display:flex;align-items:center;gap:10px;padding:14px;cursor:pointer;list-style:none;border-radius:6px;background:var(--stm-cream);color:var(--stm-ink)}
.stm-calculator .stm-design-summary::-webkit-details-marker {display:none}
.stm-calculator .stm-design-summary::marker {content:''}
.stm-calculator .stm-card-info {display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.stm-calculator .stm-card-info strong {font-size:15px;overflow-wrap:anywhere}
.stm-calculator [data-card-quantity] {font-size:13px;color:var(--stm-muted)}
.stm-calculator .stm-card-status {font-size:12px;font-weight:600;max-width:80px;text-align:right;color:var(--stm-muted)}
.stm-calculator [data-artwork-ready=true] .stm-card-status {color:var(--stm-ink)}
.stm-calculator [data-card-preview] {width:38px;height:38px;object-fit:contain;background:#fff;border:1px solid var(--stm-border);border-radius:4px;flex-shrink:0}
.stm-calculator .stm-card-chevron {width:8px;height:8px;border-right:2px solid var(--stm-muted);border-bottom:2px solid var(--stm-muted);transform:rotate(45deg);flex-shrink:0;margin:0 2px 4px 3px}
.stm-calculator details[open]>.stm-design-summary .stm-card-chevron {transform:rotate(225deg);margin-top:6px}
.stm-calculator .stm-design-body {padding:16px;border-top:1px solid var(--stm-border)}
.stm-calculator .stm-artwork {margin-top:14px}
.stm-calculator .stm-upload {border:1px dashed var(--stm-control-border);border-radius:6px;padding:14px;background:var(--stm-input)}
.stm-calculator .stm-upload.stm-dragging {border-color:var(--stm-red);background:var(--stm-selected)}
.stm-calculator .stm-upload-prompt {display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;position:relative}
.stm-calculator [data-drop-prompt] {font-size:12px;color:var(--stm-muted)}
.stm-calculator .stm-file-input {position:absolute;width:1px;height:1px;clip:rect(0,0,0,0);clip-path:inset(50%);overflow:hidden;white-space:nowrap}
.stm-calculator .stm-upload-hint {display:block;font-size:12px;color:var(--stm-muted);line-height:1.5;margin-top:8px}
.stm-calculator [data-file-details] {display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:12px}
.stm-calculator [data-artwork-preview] {width:56px;height:56px;object-fit:contain;border:1px solid var(--stm-border);background:var(--stm-cream)}
.stm-calculator [data-artwork-download] {font-size:14px;color:var(--stm-red);overflow-wrap:anywhere;max-width:100%;text-decoration:underline}
.stm-calculator [data-upload-status] {font-size:13px;line-height:1.5;margin:10px 0 0}
.stm-calculator .stm-upload-error {color:#842019!important}
.stm-calculator .stm-upload-later {display:flex;align-items:center;gap:9px;font-size:14px;font-weight:500;min-height:36px;margin:10px 0 0;color:var(--stm-ink);cursor:pointer}
.stm-calculator .stm-upload-later input {appearance:auto!important;accent-color:var(--stm-red);width:18px!important;height:18px!important;min-width:18px;margin:0;padding:0;border:1px solid var(--stm-control-border);border-radius:2px;box-shadow:none;opacity:1}
.stm-calculator .stm-upload progress {width:100%;height:8px;margin-top:14px;accent-color:var(--stm-red)}
.stm-calculator .stm-artwork-notes {margin-top:10px;border:0;padding:0;background:transparent}
.stm-calculator .stm-artwork-notes summary {cursor:pointer;color:var(--stm-red);font-size:14px;padding:7px 0}
.stm-calculator .stm-artwork-notes .stm-field {margin-top:8px}
.stm-calculator .stm-visually-hidden {position:absolute;width:1px;height:1px;padding:0;clip:rect(0,0,0,0);clip-path:inset(50%);overflow:hidden;white-space:nowrap}
.stm-calculator .stm-upload-later input:focus-visible {outline:2px solid var(--stm-red);outline-offset:3px}
.stm-calculator .stm-mobile-bar {display:none}
.stm-calculator.stm-artwork-portal {padding:24px;background:var(--stm-panel);border:2px solid var(--stm-frame);border-radius:12px}
.stm-artwork-portal .stm-design-row {padding:16px}
@container stm (max-width:472px) {
  .stm-calculator .stm-options[data-option-count="3"] {grid-template-columns:repeat(2,minmax(0,1fr))}
  .stm-calculator .stm-options[data-option-count="3"]>.stm-field:first-child {grid-column:1/-1}
  .stm-calculator .stm-quote {padding:16px}
  .stm-calculator .stm-design-body {padding:12px}
}
@container stm (min-width:772px) {
  .stm-calculator .stm-layout {grid-template-columns:minmax(0,1fr) 270px;gap:26px}
  .stm-calculator .stm-quote {position:sticky;top:28px}
}
@media (max-width:767px) {
  .stm-calculator {margin:16px 0 110px;scroll-margin-top:16px}
  .stm-calculator .stm-form {padding:18px!important}
  .stm-calculator .stm-quote-actions {display:none}
  .stm-calculator .stm-mobile-bar {display:flex;position:fixed;bottom:0;left:0;right:0;width:100%;z-index:900;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px calc(12px + env(safe-area-inset-bottom));background:var(--stm-panel);border-top:2px solid var(--stm-frame);box-shadow:0 -4px 16px #332c2714}
  .stm-calculator .stm-mobile-price {display:flex;flex-direction:column;min-width:0;flex:1}
  .stm-calculator .stm-mobile-price strong {font-size:22px;line-height:1.25;color:var(--stm-ink)}
  .stm-calculator .stm-mobile-price span {font-size:12px;color:var(--stm-muted)}
  .stm-calculator .stm-mobile-bar .stm-primary {flex:0 1 180px;font-size:14px;min-height:48px;padding:10px 14px!important}
}
@media (prefers-reduced-motion:reduce) {
  .stm-calculator * {scroll-behavior:auto!important;transition:none!important}
  .stm-calculator .stm-price-spinner {animation:none!important}
}
