/* Blank Media — Product Designer — front-end editor. */
.bmpd-editor { margin: 1em 0; max-width: 640px; }
.bmpd-editor[hidden] { display: none !important; }
.bmpd-editor [hidden], .bmpd-video [hidden], .bmpd-product-options [hidden] { display: none !important; }
.bmpd-toolbar-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; padding: 7px; border: 1px solid #e3e3e3; border-radius: 6px; background: #fafafa; }
.bmpd-toolbar-panel[hidden] { display: none !important; }
.bmpd-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.bmpd-toolbar .button { cursor: pointer; }
.bmpd-icon-btn { min-width: 56px; height: auto; padding: 6px 8px !important; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; line-height: 1.1; }
.bmpd-icon-btn svg { display: block; }
.bmpd-icon-label { font-size: 11px; font-weight: 600; }
.bmpd-canvas-wrap { width: 100%; border: 1px solid #ddd; background: #fafafa; touch-action: pan-y; }
.bmpd-canvas-wrap canvas { max-width: 100%; touch-action: pan-y !important; user-select: none; -webkit-user-select: none; }
.bmpd-dpi-notice { margin-top: 8px; padding: 8px 10px; border-radius: 4px; font-size: 0.9em; }
.bmpd-dpi-warn { background: #fff6e5; border: 1px solid #f0b429; color: #7a4f01; }
.bmpd-dpi-block { background: #fde8e8; border: 1px solid #e02424; color: #7a0c0c; }
.bmpd-notice-stack { margin: 0 0 10px; }
.bmpd-notice-stack > :last-child { margin-bottom: 0; }

/* Design library drawer: opened from the Designs toolbar button. */
.bmpd-design-drawer { flex: 1 0 100%; min-width: 0; padding: 7px 0 2px; border-top: 1px solid #e2e8f0; }
.bmpd-design-drawer[hidden] { display: none !important; }
.bmpd-library-label { margin: 0 0 6px; font-weight: 600; }
.bmpd-library-carousel { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; align-items: center; gap: 6px; width: 100%; }
.bmpd-library-items { display: flex; flex-wrap: nowrap; gap: 8px; width: 100%; max-width: 100%; padding: 2px 2px 8px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scrollbar-width: thin; scroll-behavior: smooth; }
.bmpd-library-arrow { display: grid !important; place-items: center; width: 34px; height: 54px; padding: 0 !important; border: 1px solid #167dd8 !important; border-radius: 7px !important; background: #167dd8 !important; color: #fff !important; font-size: 30px !important; line-height: 1 !important; cursor: pointer; }
.bmpd-library-arrow:disabled { opacity: .3; cursor: default; }
.bmpd-lib-design { flex: 0 0 72px; width: 72px; height: 72px; padding: 4px; border: 1px solid #ddd; border-radius: 4px; background: #fff !important; cursor: pointer; }
.bmpd-lib-design:hover, .bmpd-lib-design:focus { border-color: #e6007e; }
.bmpd-lib-design img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; margin: 0 auto; }

/* Per-object tools (colour / white background) */
.bmpd-object-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0; padding: 4px 6px; border: 0; background: transparent; }
.bmpd-colour-ctl { display: inline-flex; align-items: center; gap: 8px; }
.bmpd-swatches { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.bmpd-swatch { width: 24px; height: 24px; padding: 0; border: 1px solid rgba(0, 0, 0, 0.25); border-radius: 50%; cursor: pointer; }
.bmpd-swatch:hover { transform: scale(1.15); }
.bmpd-swatch-active { outline: 2px solid #111; outline-offset: 2px; }
.bmpd-whitebg-ctl { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.bmpd-font-ctl { display: inline-flex; align-items: center; gap: 6px; }
.bmpd-font-select { max-width: 180px; }

/* Product video immediately before variations. */
.bmpd-pre-variations { margin: 12px 0 16px; }
.bmpd-video { margin: 12px 0 16px; }
.bmpd-video-play { width: 100%; min-height: 54px; display: flex !important; align-items: center; justify-content: center; gap: 10px; border-radius: 10px !important; background: #2446a8 !important; border-color: #2446a8 !important; color: #fff !important; font-size: 1.05em !important; font-weight: 800 !important; }
.bmpd-play-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #2446a8; font-size: 13px; padding-left: 2px; }
.bmpd-video-frame { position: relative; width: 100%; padding-top: 56.25%; margin-top: 10px; background: #000; border-radius: 8px; overflow: hidden; }
.bmpd-video-frame iframe, .bmpd-video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bmpd-video-frame video { display: block; object-fit: contain; background: #000; }

/* Optional once-per-order professional artwork service. */
.bmpd-artwork-service-choice { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; margin: 0 0 12px; padding: 12px; border: 1px solid #c8daf0; border-radius: 8px; background: #f8fbff; }
.bmpd-artwork-service { position: absolute; opacity: 0; pointer-events: none; }
.bmpd-artwork-service-btn { box-sizing: border-box; display: flex !important; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 100%; min-width: 0; min-height: 50px; white-space: normal !important; border: 2px solid #2446a8 !important; background: #fff !important; color: #2446a8 !important; font-weight: 800 !important; }
.bmpd-artwork-service-btn strong { color: inherit !important; }
.bmpd-artwork-service-btn strong { margin-left: auto; }
.bmpd-service-check { display: none; }
.bmpd-service-label-on, .bmpd-service-price { display: none; }
.bmpd-service-label-off, .bmpd-service-label-on { min-width: 0; overflow-wrap: anywhere; }
.bmpd-artwork-service:checked + .bmpd-artwork-service-btn { background: #2446a8 !important; border-color: #2446a8 !important; color: #fff !important; }
.bmpd-artwork-service:checked + .bmpd-artwork-service-btn .bmpd-service-check { display: inline; }
.bmpd-artwork-service:checked + .bmpd-artwork-service-btn .bmpd-service-label-off { display: none; }
.bmpd-artwork-service:checked + .bmpd-artwork-service-btn .bmpd-service-label-on,
.bmpd-artwork-service:checked + .bmpd-artwork-service-btn .bmpd-service-price { display: inline; }
.bmpd-artwork-service-choice p { margin: 7px 0 0; font-size: .88em; }
.bmpd-service-details { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; margin-top: 10px; padding-top: 10px; border-top: 1px solid #c7d8ee; overflow-wrap: anywhere; }
.bmpd-service-field { display: grid; gap: 5px; margin: 0 0 12px; }
.bmpd-service-field > span { color: #526075; font-size: .9em; }
.bmpd-service-field input[type="file"], .bmpd-service-field textarea { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; }
.bmpd-service-field textarea { resize: vertical; }
.bmpd-service-upload-status { min-height: 1.4em; margin: 6px 0 !important; font-weight: 700; }
.bmpd-service-upload-status.bmpd-busy { color: #2446a8; }
.bmpd-service-upload-status.bmpd-ok { color: #14733b; }
.bmpd-service-upload-status.bmpd-block { color: #8b1010; }
.bmpd-service-proof-message { padding: 10px 12px; border: 1px solid #91b6e6; border-radius: 7px; background: #eef6ff; color: #10233f; }
.bmpd-service-approval-message { margin: 0; color: #2446a8; }
.bmpd-artwork-service-choice.bmpd-service-mapped { margin-top: -4px; }
.bmpd-artwork-service-choice.bmpd-service-mapped .bmpd-artwork-service-btn { display: none !important; }
.bmpd-option-btn.bmpd-option-fixed:disabled { cursor: default; opacity: 1; }
.bmpd-artwork-fee-row { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; }
.bmpd-artwork-fee-row[hidden] { display: none !important; }
.bmpd-artwork-fee-row span:first-child { font-weight: 700; }
.bmpd-artwork-fee-row span:last-child { margin-left: auto; font-weight: 800; }

/* Customer-facing replacements for the hidden native WooCommerce/WAPF fields. */
form.variations_form.bmpd-native-options-hidden table.variations,
form.variations_form.bmpd-native-options-hidden .wapf { display: none !important; }
.bmpd-product-options { box-sizing: border-box; width: 100%; max-width: 640px; min-width: 0; margin: 0 0 14px; padding: 12px; border: 1px solid #d8e1ee; border-radius: 8px; background: #fff; }
.bmpd-option-row { margin: 0 0 11px; }
.bmpd-option-row:last-child { margin-bottom: 0; }
.bmpd-conditional-info { margin: 2px 0 11px; padding: 10px 12px; border-radius: 6px; background: #f4f7fb; }
.bmpd-conditional-info p { margin: 0; }
.bmpd-option-label { display: block; margin-bottom: 6px; font-weight: 700; }
.bmpd-option-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.bmpd-option-btn { padding: 7px 14px; border: 1px solid #2446a8; border-radius: 5px; background: #fff; color: #17203b; cursor: pointer; font-size: .92em; }
.bmpd-option-btn-image { display: flex; flex: 1 1 120px; max-width: 145px; min-width: 0; flex-direction: column; align-items: center; gap: 6px; padding: 6px; white-space: normal; text-align: center; }
.bmpd-option-image { display: block; width: 100%; max-width: 120px; aspect-ratio: 1; border-radius: 4px; object-fit: contain; background: #fff; }
.bmpd-option-btn-label { display: block; line-height: 1.25; }
.bmpd-option-btn:hover { background: #eef4ff; }
.bmpd-option-btn.bmpd-option-active { background: #167dd8; border-color: #167dd8; color: #fff; }
.bmpd-usb-colour-switch .bmpd-option-buttons { align-items: flex-end; gap: 11px; }
.bmpd-usb-colour-switch .bmpd-colour-choice { display: grid; place-items: center; position: relative; width: 50px; height: 76px; min-width: 50px; padding: 5px !important; border: 1px solid #2446a8; border-radius: 9px; background: #fff !important; }
.bmpd-usb-colour-switch .bmpd-colour-choice:hover { transform: translateY(-2px); background: #f5f8ff !important; }
.bmpd-usb-colour-switch .bmpd-colour-choice.bmpd-option-active { outline: 3px solid #e6007e; outline-offset: 2px; box-shadow: 0 0 0 2px #fff inset; }
.bmpd-usb-drive-icon { position: relative; display: block; width: 30px; height: 62px; }
.bmpd-usb-drive-icon::before { content: ''; position: absolute; left: 4px; top: 23px; width: 22px; height: 37px; box-sizing: border-box; border: 1px solid rgba(0, 0, 0, .3); border-radius: 2px 2px 7px 7px; background: var(--bmpd-choice-colour); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .16); }
.bmpd-usb-drive-icon::after { content: ''; position: absolute; z-index: 1; left: 3px; top: 1px; width: 24px; height: 28px; box-sizing: border-box; border: 2px solid #9da4ac; border-radius: 2px 2px 1px 1px; clip-path: polygon(8% 5%, 92% 0, 100% 100%, 0 100%); background: linear-gradient(to bottom, #252a30 0 4px, #fafafa 4px 7px, #d9dde1 100%); box-shadow: inset 2px 0 0 rgba(255, 255, 255, .75), inset -2px 0 0 rgba(97, 105, 113, .18), 0 1px 1px rgba(0, 0, 0, .22); }
.bmpd-usb-drive-hole { position: absolute; z-index: 2; left: 7px; top: 12px; width: 5px; height: 6px; border-radius: 1px; background: #24282d; box-shadow: inset 1px 0 rgba(255, 255, 255, .13); }
.bmpd-usb-drive-hole::before { content: ''; position: absolute; left: 11px; top: 0; width: 5px; height: 6px; border-radius: 1px; background: #24282d; box-shadow: inset 1px 0 rgba(255, 255, 255, .13); }
.bmpd-usb-drive-hole::after { content: ''; position: absolute; left: 2px; top: 10px; width: 3px; height: 2px; border-radius: 1px; background: #747b82; box-shadow: 9px 0 #747b82; }
.bmpd-choice-label-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.bmpd-option-row.bmpd-option-required { padding: 10px; outline: 3px solid #e6007e; outline-offset: 3px; border-radius: 6px; animation: bmpd-required-pulse .8s ease-in-out 2; }
.bmpd-option-required-message { display: block; margin-top: 8px; color: #8b1010; font-size: .88em; font-weight: 800; }
@keyframes bmpd-required-pulse { 0%, 100% { outline-color: #e6007e; } 50% { outline-color: rgba(230, 0, 126, .25); } }
.bmpd-product-options .bmpd-artwork-service-choice { margin: 0 0 11px; }
.bmpd-builder-switch { margin-top: 2px; }
.bmpd-builder-button { width: 100%; min-height: 50px; border-width: 2px; font-size: 1em; font-weight: 800; }
.bmpd-builder-button:disabled { cursor: not-allowed !important; opacity: .62; }
.bmpd-order-summary { margin-top: 4px; padding: 10px 12px; border-radius: 6px; background: #f4f7fb; color: #17203b; font-size: .9em; line-height: 1.65; }
.bmpd-order-summary strong { display: block; }
.bmpd-order-summary span { display: block; }

/* WooCommerce Quantity Manager tiers: five evenly spaced cards on the normal
   product form, then a compact two-column grid on genuinely narrow screens. */
form.bmpd-native-options-hidden .wqm-pricing-table-wrapper { width: 100%; }
form.bmpd-native-options-hidden .wqm-pricing-table { display: block !important; width: 100% !important; border-spacing: 0 !important; }
form.bmpd-native-options-hidden .wqm-pricing-table thead { display: none !important; }
form.bmpd-native-options-hidden .wqm-pricing-table tbody { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; width: 100%; }
form.bmpd-native-options-hidden .wqm-pricing-table tbody tr { display: flex !important; min-width: 0; flex-direction: column; align-items: center; justify-content: center; padding: 8px 3px !important; border: 1px solid #167dd8; border-radius: 8px; text-align: center; line-height: 1.25; }
form.bmpd-native-options-hidden .wqm-pricing-table tbody td { display: block !important; width: 100% !important; padding: 0 !important; border: 0 !important; white-space: nowrap; font-size: .8em; }
@media (max-width: 520px) {
  form.bmpd-native-options-hidden .wqm-pricing-table tbody { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  form.bmpd-native-options-hidden .wqm-pricing-table tbody tr:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Proof thumbnail shown on customer order details and emails. */
.bmpd-customer-proofs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 2px; }
.bmpd-customer-proof img { display: block; width: 150px; max-width: 100%; height: auto; border: 1px solid #ddd; border-radius: 5px; }

/* Transient tool guidance */
.bmpd-tool-hint { margin: 0 0 8px; padding: 8px 10px; border-radius: 4px; font-size: 0.9em; background: #fff6e5; border: 1px solid #f0b429; color: #7a4f01; }

/* Print/safe-area key (colours match the canvas outlines) */
.bmpd-key { display: flex; flex-wrap: wrap; gap: 16px; margin: 6px 0 8px; font-size: 0.85em; color: #444; }
.bmpd-key-item { display: inline-flex; align-items: center; gap: 6px; }
.bmpd-key-swatch { width: 20px; height: 13px; box-sizing: border-box; background: transparent; }
.bmpd-key-print { border: 2px solid #e6007e; }
.bmpd-key-safe { border: 2px dashed #00a0e3; }

/* Print-method switch (mirrors the branding-method option) */
.bmpd-mode-switch { margin-bottom: 11px; }
.bmpd-mode-label { font-weight: 600; }
.bmpd-mode-btn { padding: 7px 14px; border: 1px solid #2446a8; border-radius: 5px; background: #fff; cursor: pointer; font-size: 0.9em; }
.bmpd-mode-btn:hover { border-color: #2e6fdf; }
.bmpd-mode-btn.bmpd-mode-active { background: #2e6fdf; border-color: #2e6fdf; color: #fff; }

/* Vinyl notice */
.bmpd-vinyl-note { margin: 0 0 8px; padding: 8px 10px; border-radius: 4px; font-size: 0.9em; background: #e8f4fd; border: 1px solid #3b82c4; color: #0b466e; }

/* Two-side tabs */
.bmpd-side-tabs { display: flex; gap: 10px; margin: 12px 0 8px; }
.bmpd-side-tab { min-width: 120px; padding: 11px 22px; border: 2px solid #167dd8; border-radius: 8px; background: #fff; color: #145da0; cursor: pointer; font-size: 1.05em; font-weight: 800; box-shadow: 0 2px 5px rgba(15, 65, 120, .12); }
.bmpd-side-tab:hover { background: #eef7ff; }
.bmpd-side-tab.bmpd-side-tab-active { background: #167dd8; border-color: #167dd8; color: #fff; box-shadow: 0 3px 8px rgba(22, 125, 216, .3); }
.bmpd-side-tab.bmpd-side-required { animation: bmpd-side-pulse 1s ease-in-out 4; outline: 3px solid #e6007e; outline-offset: 2px; }
@keyframes bmpd-side-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
.bmpd-side2-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.bmpd-side2-hint { font-size: 0.85em; color: #666; }

/* Inline approval + contextual guidance flow */
.bmpd-approve-inline { margin: 10px 0; padding: 10px 12px; border: 1px solid #ddd; border-radius: 4px; background: #fafafa; }
.bmpd-authorise-row { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; margin: 0; }
.bmpd-authorise-row input { margin-top: 3px; }
.bmpd-approval-status { margin: 6px 0 0; font-size: 0.9em; }
.bmpd-approval-status.bmpd-ok { color: #0a6b2d; }
.bmpd-approval-status.bmpd-busy { color: #555; }
.bmpd-approval-status.bmpd-block { color: #7a0c0c; }
.bmpd-approval-status.bmpd-warn { color: #7a4f01; }
.bmpd-coach-hint { box-sizing: border-box; display: flex; flex: 1 0 100%; width: 100%; max-width: 100%; align-items: flex-start; justify-content: flex-start; gap: 8px; margin: 8px 0 2px; padding: 7px 10px 7px var(--bmpd-coach-indent, 10px); border-radius: 6px; background: #fff5fb; color: #b80063; text-align: left; }
.bmpd-coach-arrow { flex: 0 0 auto; color: #e6007e; font-size: 28px; font-weight: 900; line-height: 1; animation: bmpd-coach-bounce .8s ease-in-out infinite; }
.bmpd-coach-copy { display: grid; gap: 1px; min-width: 0; line-height: 1.3; }
.bmpd-coach-copy strong { display: block; color: #b80063; font-size: .9em; }
.bmpd-coach-copy > span { display: block; color: #8b174f; font-size: .82em; }
.bmpd-coach-hint.bmpd-coach-quantity,
.bmpd-coach-hint.bmpd-coach-cart { flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding-left: 10px; padding-right: 10px; text-align: center; }
.bmpd-coach-quantity .bmpd-coach-copy,
.bmpd-coach-cart .bmpd-coach-copy { justify-items: center; text-align: center; }
form.bmpd-coach-complete .bmpd-coach-hint { display: none !important; }
@keyframes bmpd-coach-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* Fullscreen editing: toolbar stays pinned on top, the canvas scrolls in the
   middle, and the approval row stays reachable at the bottom. */
.bmpd-editor.bmpd-fs { position: fixed; inset: 0; z-index: 2147483000; margin: 0; max-width: none; width: auto; float: none; padding: 12px 16px; background: #fff; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.bmpd-editor.bmpd-fs .bmpd-toolbar { margin-bottom: 0; }
.bmpd-editor.bmpd-fs .bmpd-toolbar-panel { flex: 0 0 auto; margin-bottom: 0; }
.bmpd-editor.bmpd-fs .bmpd-library-strip { margin-bottom: 0; }
.bmpd-editor.bmpd-fs .bmpd-sides { flex: 1 1 auto; min-height: 0; display: flex; }
.bmpd-editor.bmpd-fs .bmpd-side-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.bmpd-editor.bmpd-fs .bmpd-side2-actions { display: none; }
.bmpd-editor.bmpd-fs .bmpd-canvas-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; align-items: flex-start; justify-content: center; background: #f0f0f0; }
.bmpd-editor.bmpd-fs .bmpd-canvas-wrap,
.bmpd-editor.bmpd-fs .bmpd-canvas-wrap canvas { touch-action: none !important; }
.bmpd-editor.bmpd-fs .bmpd-approve-inline { margin: 0; }
.bmpd-fs-lock, .bmpd-fs-lock body { overflow: hidden; }
