/* Include-safe scoped stylesheet: does not style the host product page globally. */
.hardbox-mockup-embed{
    color-scheme: light;
    --background: #f3f5f8;
    --surface: #ffffff;
    --text: #172033;
    --muted: #697589;
    --line: #dfe4eb;
    --primary: #1f63e9;
    --primary-dark: #194fac;
    --success: #13784a;
    --success-bg: #ebf8f1;
    --warning: #965b00;
    --warning-bg: #fff7e6;
    --danger: #b52f3a;
    --danger-bg: #fff0f1;
}

.hardbox-mockup-embed *{ box-sizing: border-box; }
.hardbox-mockup-embed{ margin: 0; color: var(--text); background: var(--background); line-height: 1.75; }
.hardbox-mockup-embed button, .hardbox-mockup-embed input{ font: inherit; }
.hardbox-mockup-embed button{ cursor: pointer; }

.hardbox-mockup-embed .hardbox-app{
    width: min(1060px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0 72px;
}

.hardbox-mockup-embed .page-header{ max-width: 760px; margin-bottom: 30px; }
.hardbox-mockup-embed .page-header h1{ margin: 2px 0 7px; font-size: clamp(1.85rem, 4vw, 2.65rem); line-height: 1.35; }
.hardbox-mockup-embed .page-header p, .hardbox-mockup-embed .section-heading p{ margin: 0; color: var(--muted); }
.hardbox-mockup-embed .eyebrow{ color: var(--primary) !important; font-size: 0.82rem; font-weight: 700; direction: ltr; text-align: right; }

.hardbox-mockup-embed .panel{
    margin-top: 22px;
    padding: clamp(20px, 4vw, 34px);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 12px 34px rgba(23, 32, 51, 0.055);
}

.hardbox-mockup-embed .section-heading{ display: flex; align-items: flex-start; gap: 13px; margin-bottom: 25px; }
.hardbox-mockup-embed .section-heading h2{ margin: 0 0 2px; font-size: 1.24rem; }
.hardbox-mockup-embed .step-number{ display: grid; flex: 0 0 34px; height: 34px; place-items: center; border-radius: 10px; color: #ffffff; background: var(--primary); font-weight: 700; }

.hardbox-mockup-embed .dimensions-grid{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hardbox-mockup-embed .field{ display: grid; gap: 7px; color: #3f495b; font-size: 0.92rem; font-weight: 600; }
.hardbox-mockup-embed .number-field{ display: flex; align-items: center; min-width: 0; border: 1px solid #cbd2dd; border-radius: 11px; overflow: hidden; transition: border-color 160ms, box-shadow 160ms; }
.hardbox-mockup-embed .number-field:focus-within{ border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 99, 233, 0.12); }
.hardbox-mockup-embed .number-field input{ width: 100%; min-width: 0; padding: 11px 12px; border: 0; outline: 0; color: var(--text); background: transparent; direction: ltr; text-align: right; }
.hardbox-mockup-embed .number-field small{ padding: 0 11px; border-right: 1px solid var(--line); color: var(--muted); direction: ltr; font-weight: 400; }

.hardbox-mockup-embed .template-summary{ min-height: 47px; margin: 18px 0; padding: 10px 13px; border-radius: 10px; color: #465269; background: #f5f7fa; font-size: 0.9rem; }
.hardbox-mockup-embed .button{ min-height: 44px; padding: 9px 18px; border: 1px solid transparent; border-radius: 10px; font-weight: 700; transition: background 160ms, border-color 160ms, opacity 160ms, transform 160ms; }
.hardbox-mockup-embed .button:not(:disabled):active{ transform: translateY(1px); }
.hardbox-mockup-embed .button--primary{ color: #ffffff; background: var(--primary); }
.hardbox-mockup-embed .button--primary:hover:not(:disabled){ background: var(--primary-dark); }
.hardbox-mockup-embed .button--secondary{ border-color: #b8c5da; color: #28528f; background: #f5f8fd; }
.hardbox-mockup-embed .button--secondary:hover:not(:disabled){ border-color: var(--primary); background: #eaf0ff; }
.hardbox-mockup-embed .button:disabled{ cursor: not-allowed; opacity: 0.45; }
.hardbox-mockup-embed .template-actions, .hardbox-mockup-embed .viewer-buttons{ display: flex; flex-wrap: wrap; gap: 10px; }

.hardbox-mockup-embed .upload-grid{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.hardbox-mockup-embed .upload-part{ min-width: 0; }
.hardbox-mockup-embed .part-chip{ display: inline-flex; margin-bottom: 9px; padding: 3px 10px; border-radius: 999px; color: #28528f; background: #eaf0ff; font-size: 0.82rem; font-weight: 700; }
.hardbox-mockup-embed .upload-box{ display: grid; min-height: 188px; place-items: center; align-content: center; gap: 4px; padding: 24px; border: 1.5px dashed #acb7c7; border-radius: 14px; text-align: center; background: #fafbfc; cursor: pointer; transition: border-color 160ms, background 160ms; }
.hardbox-mockup-embed .upload-box:hover, .hardbox-mockup-embed .upload-box:focus-within{ border-color: var(--primary); background: #f5f8ff; }
.hardbox-mockup-embed .upload-box small{ color: var(--muted); }
.hardbox-mockup-embed .upload-box input{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hardbox-mockup-embed .upload-icon{ display: grid; width: 42px; height: 42px; margin-bottom: 6px; place-items: center; border-radius: 12px; color: var(--primary); background: #eaf0ff; font-size: 1.5rem; font-weight: 700; }
.hardbox-mockup-embed .clear-artwork{ width: 100%; margin-top: 10px; }

.hardbox-mockup-embed .notice{ margin-top: 14px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; color: #3f4b5f; background: #f6f8fa; font-size: 0.9rem; }
.hardbox-mockup-embed .notice--success{ border-color: #bfe5d2; color: var(--success); background: var(--success-bg); }
.hardbox-mockup-embed .notice--warning{ border-color: #f0d7a5; color: var(--warning); background: var(--warning-bg); }
.hardbox-mockup-embed .notice--error{ border-color: #efc4c7; color: var(--danger); background: var(--danger-bg); }

.hardbox-mockup-embed .viewer-shell{ position: relative; width: 100%; height: clamp(420px, 61vw, 650px); border: 1px solid var(--line); border-radius: 14px; background: #f2f4f7; overflow: hidden; touch-action: none; }
.hardbox-mockup-embed .viewer-shell canvas{ display: block; width: 100%; height: 100%; outline: 0; cursor: grab; }
.hardbox-mockup-embed .viewer-shell canvas:active{ cursor: grabbing; }
.hardbox-mockup-embed .viewer-badge{ position: absolute; z-index: 3; top: 14px; left: 14px; padding: 5px 9px; border: 1px solid rgba(87, 99, 117, 0.2); border-radius: 8px; color: #5d697a; background: rgba(255, 255, 255, 0.76); backdrop-filter: blur(5px); direction: ltr; font-size: 0.73rem; pointer-events: none; }
.hardbox-mockup-embed .viewer-loading, .hardbox-mockup-embed .viewer-error{ position: absolute; z-index: 4; inset: 0; display: grid; place-items: center; padding: 24px; color: var(--muted); text-align: center; background: #f2f4f7; }
.hardbox-mockup-embed .viewer-loading[hidden], .hardbox-mockup-embed .viewer-error[hidden]{ display: none; }
.hardbox-mockup-embed .viewer-error{ color: var(--danger); }
.hardbox-mockup-embed .viewer-actions{ display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.hardbox-mockup-embed .viewer-dimensions{ color: var(--muted); font-size: 0.88rem; }
.hardbox-mockup-embed noscript{ display: block; margin-top: 20px; padding: 14px; border-radius: 10px; color: var(--danger); background: var(--danger-bg); }

@media (max-width: 760px) {
    .hardbox-mockup-embed .hardbox-app{ width: min(100% - 20px, 680px); padding: 30px 0 50px; }
    .hardbox-mockup-embed .dimensions-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hardbox-mockup-embed .upload-grid{ grid-template-columns: 1fr; }
    .hardbox-mockup-embed .viewer-shell{ height: min(112vw, 520px); }
}

@media (max-width: 430px) {
    .hardbox-mockup-embed .panel{ padding: 18px; border-radius: 14px; }
    .hardbox-mockup-embed .dimensions-grid{ grid-template-columns: 1fr; }
    .hardbox-mockup-embed .button{ width: 100%; }
    .hardbox-mockup-embed .template-actions, .hardbox-mockup-embed .viewer-buttons{ display: grid; grid-template-columns: 1fr; width: 100%; }
    .hardbox-mockup-embed .viewer-actions{ align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .hardbox-mockup-embed *, .hardbox-mockup-embed *::before, .hardbox-mockup-embed *::after{ scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}


.hardbox-mockup-embed .button[hidden]{ display: none !important; }
