/**
 * svcd-designer.css
 *
 * All styles for the frontend SafetyVest Custom Designer.
 * Every selector is scoped under .svcd- (BEM convention) so this
 * stylesheet cannot affect the rest of the page.
 *
 * CSS custom properties are injected by PHP (via wp_add_inline_style)
 * from the admin appearance settings, e.g.:
 *   --svcd-primary, --svcd-secondary, --svcd-accent,
 *   --svcd-bg, --svcd-canvas-bg, --svcd-zone-color
 *
 * @package SafetyVestCustomDesigner
 * @since   1.0.0
 */

/* =========================================================================
   CSS Variable Defaults (overridden by PHP-injected values)
========================================================================= */
:root {
	--svcd-primary:    #FF6600;
	--svcd-secondary:  #333333;
	--svcd-accent:     #FFD700;
	--svcd-bg:         #F5F5F5;
	--svcd-canvas-bg:  #FFFFFF;
	--svcd-zone-color: #00AAFF;
	--svcd-radius:     6px;
	--svcd-shadow:     0 2px 8px rgba(0,0,0,.12);
	--svcd-font:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* =========================================================================
   Wrapper
========================================================================= */
.svcd-designer-wrapper {
	display:        flex;
	flex-direction: column;
	background:     #f0f2f5;
	font-family:    var(--svcd-font);
	font-size:      14px;
	color:          var(--svcd-secondary);
	border-radius:  10px;
	overflow:       hidden;
	user-select:    none;
	box-shadow:     0 4px 24px rgba(0,0,0,.12);
	width:          100%;
	box-sizing:     border-box;
	min-height:     82vh;
}

/* =========================================================================
   Header bar
========================================================================= */
.svcd-designer-header {
	display:         flex;
	align-items:     center;
	gap:             12px;
	padding:         0 16px;
	height:          56px;
	background:      #1a1d21;
	color:           #fff;
	flex-shrink:     0;
	flex-wrap:       nowrap;
	border-bottom:   1px solid rgba(255,255,255,.06);
}

.svcd-designer-header__logo img {
	height:       32px;
	width:        auto;
	display:      block;
}

.svcd-designer-header__product-name {
	flex:          1;
	font-size:     15px;
	font-weight:   600;
	white-space:   nowrap;
	overflow:      hidden;
	text-overflow: ellipsis;
	letter-spacing: .01em;
	color:         rgba(255,255,255,.95);
}

/* History buttons */
.svcd-designer-header__history {
	display:     flex;
	gap:         4px;
}

/* View tabs */
.svcd-designer-header__views {
	display:  flex;
	gap:      6px;
}

.svcd-view-tab {
	display:        flex;
	flex-direction: column;
	align-items:    center;
	gap:            3px;
	padding:        5px 10px;
	background:     rgba(255,255,255,.07);
	border:         1px solid rgba(255,255,255,.12);
	border-radius:  6px;
	color:          rgba(255,255,255,.6);
	cursor:         pointer;
	font-size:      11px;
	font-weight:    600;
	letter-spacing: .04em;
	text-transform: uppercase;
	transition:     all .15s;
	position:       relative;
}
.svcd-view-tab img {
	width:         34px;
	height:        44px;
	object-fit:    contain;
	border-radius: 3px;
	opacity:       .85;
}
.svcd-view-tab--active {
	background:   var(--svcd-primary, #FF6600);
	border-color: var(--svcd-primary, #FF6600);
	color:        #fff;
	box-shadow:   0 2px 8px rgba(255,102,0,.35);
}
.svcd-view-tab--active img { opacity: 1; }
.svcd-view-tab:hover:not(.svcd-view-tab--active) {
	background:   rgba(255,255,255,.14);
	border-color: rgba(255,255,255,.25);
	color:        #fff;
}

/* Badge dot */
.svcd-view-tab__badge {
	position:      absolute;
	top:           4px;
	right:         4px;
	width:         8px;
	height:        8px;
	border-radius: 50%;
	background:    var(--svcd-accent);
	border:        1px solid rgba(0,0,0,.2);
}

/* =========================================================================
   Body (toolbar + canvas + properties)
========================================================================= */
.svcd-designer-body {
	display:    flex;
	flex:       1;
	min-height: 0;
	overflow:   hidden;
	height:     0;
	background: var(--svcd-bg, #f0f2f5);
}

/* ── LEFT TOOLBAR ── */
.svcd-designer-toolbar {
	display:         flex;
	flex-direction:  column;
	align-items:     center;
	gap:             4px;
	padding:         16px 8px;
	background:      #1a1d21;
	border-right:    none;
	flex-shrink:     0;
	width:           80px;
	min-width:       80px;
	z-index:         10;
	position:        relative;
}

.svcd-tool-btn {
	display:        flex;
	flex-direction: column;
	align-items:    center;
	gap:            5px;
	padding:        10px 6px 8px;
	background:     rgba(255,255,255,.06);
	border:         1px solid rgba(255,255,255,.08);
	border-radius:  8px;
	color:          rgba(255,255,255,.6);
	cursor:         pointer;
	font-size:      10px;
	font-weight:    600;
	letter-spacing: .04em;
	text-transform: uppercase;
	transition:     all .15s;
	width:          60px;
}
.svcd-tool-btn svg { color: rgba(255,255,255,.7); transition: color .15s; }
.svcd-tool-btn:hover:not(:disabled) {
	background:   var(--svcd-primary, #FF6600);
	border-color: var(--svcd-primary, #FF6600);
	color:        #fff;
	box-shadow:   0 3px 10px rgba(255,102,0,.3);
}
.svcd-tool-btn:hover:not(:disabled) svg { color: #fff; }
.svcd-tool-btn--danger:hover:not(:disabled) {
	background:   #e53935;
	border-color: #e53935;
	color:        #fff;
}
.svcd-tool-btn:disabled { opacity:.3; cursor:not-allowed; }
.svcd-tool-btn__label { font-size:9px; text-align:center; line-height:1.2; letter-spacing:.06em; }

/* ── CANVAS AREA ── */
.svcd-designer-canvas-wrapper {
	flex:             1;
	position:         relative;
	display:          flex;
	align-items:      center;
	justify-content:  center;
	background:       #f0f2f5;
	overflow:         auto;
	padding:          24px 20px;
	box-sizing:       border-box;
}
.svcd-designer-canvas-area {
	position:    relative;
	line-height: 0;
	display:     inline-block; /* shrink-wrap: sized by Fabric canvas-container */
	overflow:    visible;
}
/* Mockup <img> — absolute, fills canvas area exactly, sits behind canvas */
#svcd-mockup-bg-img {
	position:       absolute;
	top:            0;
	left:           0;
	width:          100%;
	height:         100%;
	pointer-events: none;
	z-index:        0;
	display:        block;
	object-fit:     fill;
}
/* Fabric wrapper: relative + explicit z-index so it layers above the img */
.svcd-designer-canvas-area .canvas-container {
	position: relative !important;
	z-index:  1;
	display:  block !important;
}
/* Both Fabric canvas layers must be transparent */
.svcd-designer-canvas-area canvas,
.svcd-designer-canvas-area .upper-canvas,
.svcd-designer-canvas-area .lower-canvas {
	display:    block;
	background: transparent !important;
}

/* Canvas loader overlay */
.svcd-designer-canvas-loader {
	position:        absolute;
	inset:           0;
	display:         flex;
	flex-direction:  column;
	align-items:     center;
	justify-content: center;
	gap:             10px;
	background:      rgba(255,255,255,.8);
	font-size:       14px;
	color:           var(--svcd-secondary);
	z-index:         10;
}
.svcd-spinner {
	display:          inline-block;
	width:            28px;
	height:           28px;
	border:           3px solid rgba(0,0,0,.15);
	border-top-color: var(--svcd-primary);
	border-radius:    50%;
	animation:        svcd-spin .7s linear infinite;
}
@keyframes svcd-spin { to { transform: rotate(360deg); } }

/* ── RIGHT PROPERTIES PANEL ── */
.svcd-designer-properties {
	width:        260px;
	min-width:    260px;
	flex-shrink:  0;
	background:   #fff;
	border-left:  1px solid #e8eaed;
	overflow-y:   auto;
	padding:      16px 14px;
	box-shadow:   -2px 0 8px rgba(0,0,0,.04);
	display:      flex !important;  /* always visible */
	flex-direction: column;
	gap:          0;
}
.svcd-props-section {
	margin-bottom: 16px;
	padding-bottom:12px;
	border-bottom: 1px solid #eee;
}
.svcd-props-section:last-child { border-bottom: none; margin-bottom: 0; }
.svcd-props-section__title {
	font-size:    12px;
	font-weight:  700;
	text-transform:uppercase;
	letter-spacing:.06em;
	color:        #999;
	margin:       0 0 10px;
}

/* Property rows */
.svcd-prop-row {
	display:        flex;
	align-items:    center;
	flex-wrap:      wrap;
	gap:            6px;
	margin-bottom:  8px;
	font-size:      12px;
}
.svcd-prop-row > label { flex: 1; min-width: 60px; color: #555; }
.svcd-prop-row--inline { flex-wrap:nowrap; }
.svcd-prop-row--buttons { gap: 4px; }
.svcd-prop-row--grid2 { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.svcd-prop-row--grid2 label { display:flex; flex-direction:column; gap:2px; font-size:11px; }

.svcd-prop-control { font-size: 12px; }
.svcd-prop-number  { width: 56px; padding: 3px 5px; border: 1px solid #ccc; border-radius: 3px; }
select.svcd-prop-control { width: 100%; padding: 4px; border: 1px solid #ccc; border-radius: 3px; }
input[type="color"].svcd-prop-control { width: 36px; height: 28px; padding: 1px; border: 1px solid #ccc; border-radius: 3px; cursor: pointer; }
input[type="range"].svcd-prop-control { flex: 1; }
input[type="checkbox"] { margin-right: 4px; }

/* Toggle buttons (bold / italic / align) */
.svcd-prop-btn {
	padding:       5px 8px;
	background:    #f5f5f5;
	border:        1px solid #ccc;
	border-radius: 3px;
	cursor:        pointer;
	font-size:     12px;
	transition:    background .1s;
}
.svcd-prop-btn:hover { background: #e8e8e8; }
.svcd-prop-btn--active, .svcd-prop-btn--toggle[aria-pressed="true"] {
	background:   var(--svcd-primary);
	border-color: var(--svcd-primary);
	color:        #fff;
}

/* =========================================================================
   Footer bar
========================================================================= */
.svcd-designer-footer {
	display:       flex;
	align-items:   center;
	gap:           16px;
	padding:       10px 20px;
	background:    #fff;
	border-top:    1px solid #e8eaed;
	flex-shrink:   0;
	flex-wrap:     wrap;
	box-shadow:    0 -2px 8px rgba(0,0,0,.04);
}

.svcd-designer-footer__pricing {
	display:     flex;
	align-items: center;
	gap:         12px;
	flex:        1;
	flex-wrap:   wrap;
}

.svcd-quantity-control {
	display:     flex;
	align-items: center;
	gap:         4px;
}
.svcd-quantity-control label { font-size: 13px; font-weight: 600; }
#svcd-quantity {
	width:        54px;
	padding:      4px 6px;
	text-align:   center;
	border:       1px solid #ccc;
	border-radius:var(--svcd-radius);
	font-size:    14px;
}

.svcd-price-breakdown {
	display:     flex;
	align-items: baseline;
	gap:         8px;
	font-size:   14px;
}
.svcd-price-unit    { color: #666; }
.svcd-price-discount{ color: #090; font-size: 12px; }
.svcd-price-total   { font-size: 18px; font-weight: 700; color: var(--svcd-primary); }

.svcd-designer-footer__actions { margin-left: auto; }

.svcd-designer-footer__status {
	width:    100%;
	font-size:12px;
	color:    #666;
	min-height:16px;
}

/* =========================================================================
   Buttons
========================================================================= */
.svcd-btn {
	display:         inline-flex;
	align-items:     center;
	gap:             6px;
	padding:         8px 14px;
	border:          1px solid transparent;
	border-radius:   var(--svcd-radius);
	cursor:          pointer;
	font-size:       13px;
	font-weight:     600;
	text-decoration: none;
	transition:      background .15s, opacity .15s;
	white-space:     nowrap;
}
.svcd-btn:disabled { opacity: .5; cursor: not-allowed; }

.svcd-btn--primary {
	background:    var(--svcd-primary, #FF6600);
	color:         #fff;
	border-color:  var(--svcd-primary, #FF6600);
	box-shadow:    0 2px 8px rgba(255,102,0,.3);
}
.svcd-btn--primary:hover:not(:disabled) {
	filter:     brightness(1.08);
	box-shadow: 0 4px 14px rgba(255,102,0,.4);
	transform:  translateY(-1px);
}

.svcd-btn--danger   { background: #fff0f0; color: #c00; border-color: #f44; }
.svcd-btn--danger:hover:not(:disabled) { background: #ffe0e0; }

.svcd-btn--small    { padding: 4px 8px; font-size: 16px; line-height: 1; }
.svcd-btn--large    { padding: 10px 22px; font-size: 15px; }
.svcd-btn--icon     { padding: 6px; background: transparent; border-color: rgba(255,255,255,.3); color: #fff; }
.svcd-btn--icon:hover:not(:disabled) { background: rgba(255,255,255,.15); }
.svcd-btn--full     { width: 100%; justify-content: center; }

/* =========================================================================
   Toast notification
========================================================================= */
.svcd-toast {
	position:      fixed;
	bottom:        24px;
	left:          50%;
	transform:     translateX(-50%);
	z-index:       99999;
	padding:       10px 20px;
	border-radius: 20px;
	font-size:     14px;
	font-weight:   500;
	box-shadow:    var(--svcd-shadow);
	animation:     svcd-fadein .2s ease;
	pointer-events:none;
}
.svcd-toast--success { background: #222; color: #fff; }
.svcd-toast--error   { background: #c00; color: #fff; }
@keyframes svcd-fadein { from { opacity:0; transform:translateX(-50%) translateY(8px); } to { opacity:1; transform:translateX(-50%) translateY(0); } }

/* =========================================================================
   Template Selector Grid
========================================================================= */
.svcd-template-selector { padding: 24px; }
.svcd-template-selector__title { font-size: 22px; font-weight: 700; margin: 0 0 20px; }
.svcd-template-selector__empty { color: #888; font-style: italic; }

.svcd-template-grid {
	display:               grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap:                   20px;
}
.svcd-template-card {
	display:        flex;
	flex-direction: column;
	background:     #fff;
	border:         1px solid #e0e0e0;
	border-radius:  var(--svcd-radius);
	overflow:       hidden;
	text-decoration:none;
	color:          inherit;
	transition:     box-shadow .15s, transform .15s;
	box-shadow:     var(--svcd-shadow);
}
.svcd-template-card:hover {
	box-shadow: 0 4px 16px rgba(0,0,0,.16);
	transform:  translateY(-2px);
}
.svcd-template-card__image { background: #f0f0f0; }
.svcd-template-card__image img { width: 100%; aspect-ratio: 4/5; object-fit: contain; display: block; }
.svcd-template-card__info { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.svcd-template-card__name  { font-size: 14px; font-weight: 600; margin: 0; }
.svcd-template-card__price { font-size: 15px; color: var(--svcd-primary); font-weight: 700; }
.svcd-template-card__cta   { align-self: flex-start; margin-top: 4px; font-size: 12px; padding: 6px 12px; }

/* =========================================================================
   Responsive — hide properties panel on narrow screens
========================================================================= */
/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
	.svcd-designer-properties { width: 220px; }
}
@media (max-width: 860px) {
	.svcd-designer-properties { display: none; }
	.svcd-designer-canvas-wrapper { padding: 16px 12px; }
}
@media (max-width: 600px) {
	/* Toolbar moves to bottom on mobile */
	.svcd-designer-body    { flex-direction: column-reverse; }
	.svcd-designer-toolbar {
		flex-direction: row;
		width:          100%;
		height:         64px;
		padding:        8px 12px;
		justify-content:center;
		border-top:     1px solid rgba(255,255,255,.08);
		border-right:   none;
	}
	.svcd-tool-btn         { width: 52px; padding: 6px 4px; }
	.svcd-designer-header  { gap: 8px; height: 50px; padding: 0 10px; }
	.svcd-designer-canvas-wrapper { padding: 10px 8px; align-items: flex-start; }
}

/* =========================================================================
   Auth Modal (Module 9)
========================================================================= */
.svcd-modal {
	position:        fixed;
	inset:           0;
	z-index:         999998;
	display:         none;
	align-items:     center;
	justify-content: center;
}
.svcd-modal__backdrop {
	position:   absolute;
	inset:      0;
	background: rgba(0,0,0,.6);
	cursor:     pointer;
}
.svcd-modal__close {
	position:    absolute;
	top:         12px;
	right:       14px;
	background:  none;
	border:      none;
	font-size:   26px;
	line-height: 1;
	cursor:      pointer;
	color:       #555;
	padding:     4px 8px;
	z-index:     1;
}
.svcd-modal__close:hover { color:#000; }

/* Dialog */
.svcd-auth-dialog {
	position:      relative;
	z-index:       1;
	background:    #fff;
	border-radius: 10px;
	padding:       28px 28px 24px;
	max-width:     90vw;
	width:         460px;
	max-height:    90vh;
	overflow-y:    auto;
	box-shadow:    0 12px 40px rgba(0,0,0,.2);
}
.svcd-auth-dialog__header { margin-bottom: 20px; }
.svcd-auth-dialog__title  { font-size:20px; font-weight:700; margin:0 0 6px; color:#1d2327; }
.svcd-auth-dialog__subtitle { font-size:13px; color:#666; margin:0; }

/* Tabs */
.svcd-auth-tabs {
	display:       flex;
	border-bottom: 2px solid #e0e0e0;
	margin-bottom: 20px;
	gap:           4px;
}
.svcd-auth-tab {
	padding:       8px 16px;
	background:    none;
	border:        none;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
	cursor:        pointer;
	font-size:     14px;
	font-weight:   600;
	color:         #666;
	transition:    color .15s, border-color .15s;
}
.svcd-auth-tab:hover { color: var(--svcd-primary,#FF6600); }
.svcd-auth-tab--active {
	color:        var(--svcd-primary,#FF6600);
	border-color: var(--svcd-primary,#FF6600);
}

/* Forms */
.svcd-auth-form { display:flex; flex-direction:column; gap:14px; }
.svcd-form-row  { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.svcd-form-field { display:flex; flex-direction:column; gap:4px; }
.svcd-form-field label { font-size:13px; font-weight:600; color:#444; }
.svcd-form-input {
	width:         100%;
	padding:       9px 11px;
	border:        1px solid #ccc;
	border-radius: 5px;
	font-size:     14px;
	transition:    border-color .15s, box-shadow .15s;
	box-sizing:    border-box;
}
.svcd-form-input:focus {
	border-color: var(--svcd-primary,#FF6600);
	box-shadow:   0 0 0 3px rgba(255,102,0,.15);
	outline:      none;
}
.svcd-form-input-wrap { position:relative; }
.svcd-form-input-wrap .svcd-form-input { padding-right:40px; }
.svcd-password-toggle {
	position:   absolute;
	right:      10px;
	top:        50%;
	transform:  translateY(-50%);
	background: none;
	border:     none;
	cursor:     pointer;
	color:      #888;
	padding:    4px;
	line-height:1;
}
.svcd-password-toggle:hover { color:#333; }
.svcd-form-hint    { font-size:11px; color:#888; }
.svcd-form-privacy { font-size:12px; color:#666; margin:0; }
.svcd-form-privacy a { color:var(--svcd-primary,#FF6600); }
.svcd-form-field--row {
	flex-direction: row;
	align-items:    center;
	justify-content:space-between;
}
.svcd-form-checkbox { display:flex; align-items:center; gap:6px; font-size:13px; cursor:pointer; }
.svcd-auth-link     { font-size:12px; color:var(--svcd-primary,#FF6600); text-decoration:none; }
.svcd-auth-link:hover { text-decoration:underline; }

/* Error + Success */
.svcd-auth-error {
	background:    #fff0f0;
	border:        1px solid #f99;
	border-radius: 5px;
	padding:       10px 14px;
	font-size:     13px;
	color:         #c00;
}
.svcd-auth-success {
	display:         flex;
	align-items:     center;
	gap:             10px;
	padding:         16px;
	background:      #f0fff4;
	border:          1px solid #6f9;
	border-radius:   5px;
	font-size:       14px;
	color:           #1a7340;
	justify-content: center;
}
.svcd-auth-success__icon { font-size:22px; color:#1a7340; }

/* Shake animation for failed attempts */
@keyframes svcd-shake {
	0%,100% { transform:translateX(0); }
	20%,60% { transform:translateX(-6px); }
	40%,80% { transform:translateX(6px); }
}
.svcd-shake { animation: svcd-shake .4s ease; }

/* =========================================================================
   Two-Step Product Selector (Module 3 fix)
========================================================================= */

/* Category grid */
.svcd-category-grid {
	display:               grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap:                   20px;
	margin-top:            16px;
}

.svcd-category-card {
	display:        flex;
	flex-direction: column;
	background:     #fff;
	border:         2px solid #e0e0e0;
	border-radius:  var(--svcd-radius, 6px);
	overflow:       hidden;
	cursor:         pointer;
	text-align:     left;
	transition:     border-color .15s, box-shadow .15s, transform .15s;
	box-shadow:     0 2px 6px rgba(0,0,0,.08);
	padding:        0;
}
.svcd-category-card:hover,
.svcd-category-card:focus {
	border-color: var(--svcd-primary, #FF6600);
	box-shadow:   0 4px 16px rgba(0,0,0,.14);
	transform:    translateY(-2px);
	outline:      none;
}
.svcd-category-card__image { background: #f5f5f5; }
.svcd-category-card__image img {
	width:        100%;
	aspect-ratio: 4/5;
	object-fit:   contain;
	display:      block;
}
.svcd-category-card__info {
	padding:        12px;
	display:        flex;
	flex-direction: column;
	gap:            4px;
}
.svcd-category-card__name {
	font-size:   15px;
	font-weight: 700;
	color:       #1d2327;
}
.svcd-category-card__count {
	font-size: 12px;
	color:     #888;
}

/* Breadcrumb / back button */
.svcd-selector-breadcrumb {
	display:     flex;
	align-items: center;
	gap:         8px;
	margin-bottom: 14px;
	font-size:   13px;
	color:       #666;
}
.svcd-back-btn {
	background:  none;
	border:      none;
	cursor:      pointer;
	color:       var(--svcd-primary, #FF6600);
	font-size:   13px;
	font-weight: 600;
	padding:     0;
}
.svcd-back-btn:hover { text-decoration: underline; }
.svcd-breadcrumb-sep     { color: #ccc; }
.svcd-breadcrumb-current { font-weight: 600; color: #333; }

/* Shared title */
.svcd-selector-title {
	font-size:     22px;
	font-weight:   700;
	margin:        0 0 16px;
	color:         #1d2327;
}

/* =========================================================================
   Tool divider
========================================================================= */
.svcd-tool-divider {
	width:        40px;
	height:       1px;
	background:   rgba(255,255,255,.1);
	margin:       6px 0;
	flex-shrink:  0;
}

/* Download button — teal accent */
.svcd-tool-btn--download:hover:not(:disabled) {
	background:   #0097a7 !important;
	border-color: #0097a7 !important;
	box-shadow:   0 3px 10px rgba(0,151,167,.35) !important;
}

/* =========================================================================
   "Create New Design" modal
========================================================================= */
#svcd-new-design-modal {
	position:        fixed;
	inset:           0;
	z-index:         999998;
	display:         flex;
	align-items:     center;
	justify-content: center;
}
.svcd-ndm__backdrop {
	position:   absolute;
	inset:      0;
	background: rgba(0,0,0,.55);
	cursor:     pointer;
}
.svcd-ndm__dialog {
	position:      relative;
	background:    #fff;
	border-radius: 12px;
	padding:       36px 32px 28px;
	max-width:     400px;
	width:         90vw;
	text-align:    center;
	box-shadow:    0 16px 48px rgba(0,0,0,.22);
	animation:     svcdSlideUp .25s ease;
}
@keyframes svcdSlideUp {
	from { transform: translateY(20px); opacity: 0; }
	to   { transform: translateY(0);    opacity: 1; }
}
.svcd-ndm__icon {
	width:          52px;
	height:         52px;
	border-radius:  50%;
	background:     #e8f5e9;
	color:          #2e7d32;
	font-size:      26px;
	line-height:    52px;
	margin:         0 auto 16px;
}
.svcd-ndm__title {
	font-size:   20px;
	font-weight: 700;
	color:       #1d2327;
	margin:      0 0 8px;
}
.svcd-ndm__body {
	font-size:   14px;
	color:       #666;
	margin:      0 0 24px;
	line-height: 1.5;
}
.svcd-ndm__actions {
	display:    flex;
	gap:        12px;
	justify-content: center;
	flex-wrap:  wrap;
}
.svcd-btn--outline {
	background:   transparent;
	color:        #555;
	border:       1px solid #ccc;
	border-radius: var(--svcd-radius, 5px);
	padding:      10px 20px;
	font-size:    14px;
	font-weight:  600;
	cursor:       pointer;
	text-decoration: none;
	display:      inline-flex;
	align-items:  center;
	transition:   all .15s;
}
.svcd-btn--outline:hover {
	border-color: #999;
	color:        #333;
	text-decoration: none;
}

/* =========================================================================
   Pricing Sidebar
========================================================================= */
.svcd-pricing-sidebar {
	width:        260px;
	min-width:    260px;
	flex-shrink:  0;
	background:   #fff;
	border-left:  1px solid #e8eaed;
	overflow-y:   auto;
	display:      flex;
	flex-direction: column;
	gap:          0;
}
.svcd-pricing-sidebar__section {
	padding:      16px 14px;
	border-bottom:1px solid #f0f2f5;
}
.svcd-pricing-sidebar__heading {
	font-size:   11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color:       #888;
	margin:      0 0 10px;
	display:     flex;
	align-items: center;
	gap:         6px;
}

/* Bulk Discount Table */
.svcd-bulk-table {
	width:           100%;
	border-collapse: collapse;
	font-size:       12px;
}
.svcd-bulk-table th {
	text-align:    left;
	padding:       5px 6px;
	background:    #f8f9fa;
	color:         #555;
	font-weight:   600;
	border-bottom: 2px solid #e8eaed;
}
.svcd-bulk-table td {
	padding:       5px 6px;
	border-bottom: 1px solid #f0f2f5;
	color:         #333;
}
.svcd-bulk-table tr:last-child td { border-bottom: none; }
.svcd-bulk-table tr td:nth-child(3) { color: #2e7d32; font-weight: 600; }

/* Order Summary */
.svcd-summary-rows { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.svcd-summary-row {
	display:     flex;
	justify-content: space-between;
	font-size:   12px;
	color:       #444;
	padding:     2px 0;
}
.svcd-summary-row--hint { color: #aaa; font-style: italic; justify-content: center; }
.svcd-summary-row--discount { color: #2e7d32; font-weight: 600; }
.svcd-summary-row--shipping { color: #555; }
.svcd-summary-row--total {
	font-size:   14px;
	font-weight: 700;
	color:       #1a1d21;
	padding-top: 6px;
}
.svcd-summary-divider { height: 1px; background: #e8eaed; margin: 6px 0; }

/* Proceed button */
.svcd-designer-footer__left { flex: 1; }
.svcd-footer-hint { font-size: 12px; color: #888; }

/* =========================================================================
   Size Selection Modal
========================================================================= */
#svcd-size-modal {
	position:        fixed;
	inset:           0;
	z-index:         999997;
	display:         flex;
	align-items:     center;
	justify-content: center;
}
.svcd-sm__backdrop {
	position:   absolute;
	inset:      0;
	background: rgba(0,0,0,.55);
}
.svcd-sm__dialog {
	position:      relative;
	background:    #fff;
	border-radius: 12px;
	padding:       28px;
	max-width:     640px;
	width:         94vw;
	max-height:    88vh;
	overflow-y:    auto;
	box-shadow:    0 20px 60px rgba(0,0,0,.22);
	animation:     svcdSlideUp .25s ease;
}
.svcd-sm__close {
	position:    absolute;
	top:         12px; right: 16px;
	background:  none; border: none;
	font-size:   26px; line-height: 1;
	cursor:      pointer; color: #888;
	padding:     4px 8px;
}
.svcd-sm__close:hover { color: #333; }
.svcd-sm__title {
	font-size:   20px; font-weight: 700;
	color:       #1a1d21; margin: 0 0 20px;
}
.svcd-sm__section { margin-bottom: 24px; }
.svcd-sm__section-title {
	font-size:    13px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .07em;
	color:        #888; margin: 0 0 12px;
	padding-bottom: 6px; border-bottom: 1px solid #f0f2f5;
}

/* Size chart table */
.svcd-size-chart-table {
	width:           100%;
	border-collapse: collapse;
	font-size:       13px;
}
.svcd-size-chart-table th {
	background:    #1a1d21; color: #fff;
	padding:       8px 12px; text-align: center;
	font-weight:   600; font-size: 12px;
}
.svcd-size-chart-table td {
	padding:       8px 12px; text-align: center;
	border-bottom: 1px solid #f0f2f5; color: #444;
}
.svcd-size-chart-table tr:nth-child(even) td { background: #f8f9fa; }
.svcd-size-chart-table td:first-child { font-weight: 700; color: #1a1d21; }

/* Size qty selectors */
.svcd-size-selectors { display: flex; flex-direction: column; gap: 0; }
.svcd-size-header {
	display:        grid;
	grid-template-columns: 60px 1fr 100px;
	gap:            8px;
	padding:        6px 8px;
	background:     #f8f9fa;
	border-radius:  6px 6px 0 0;
	font-size:      11px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .06em; color: #888;
	border:         1px solid #e8eaed;
}
.svcd-size-row {
	display:     grid;
	grid-template-columns: 60px 1fr 100px;
	gap:         8px;
	align-items: center;
	padding:     10px 8px;
	border:      1px solid #e8eaed;
	border-top:  none;
}
.svcd-size-row:last-child { border-radius: 0 0 6px 6px; }
.svcd-size-row:hover { background: #fafafa; }
.svcd-size-row__label { font-size: 15px; font-weight: 700; color: #1a1d21; }
.svcd-size-row__qty {
	display:     flex;
	align-items: center;
	gap:         6px;
}
.svcd-sqty-btn {
	width:         28px; height: 28px;
	border:        1px solid #ddd; border-radius: 4px;
	background:    #fff; cursor: pointer;
	font-size:     16px; line-height: 1;
	display:       flex; align-items: center; justify-content: center;
	transition:    background .12s;
}
.svcd-sqty-btn:hover { background: #f0f2f5; border-color: #bbb; }
.svcd-sqty-input {
	width:       50px; height: 28px;
	border:      1px solid #ddd; border-radius: 4px;
	text-align:  center; font-size: 14px;
	padding:     0;
}
.svcd-size-row__subtotal { font-size: 13px; font-weight: 600; color: #1a1d21; text-align: right; }

/* Totals bar */
.svcd-sm__totals {
	background:    #f8f9fa; border: 1px solid #e8eaed;
	border-radius: 8px; padding: 14px 16px;
	margin-bottom: 20px;
	display:       flex; flex-direction: column; gap: 6px;
}
.svcd-sm__totals-row {
	display:     flex; justify-content: space-between;
	font-size:   13px; color: #555;
}
.svcd-sm__discount { color: #2e7d32; }
.svcd-sm__unit-row { color: #555; }
.svcd-sm__grand {
	font-size:  16px; font-weight: 700; color: #1a1d21;
	padding-top: 6px; border-top: 1px solid #e8eaed; margin-top: 4px;
}
.svcd-sm__footer { text-align: right; }
.svcd-sm__footer .svcd-btn--large { padding: 12px 32px; font-size: 15px; }

@media (max-width: 860px) {
	.svcd-pricing-sidebar { display: none; }
}

/* =========================================================================
   My Designs Modal
========================================================================= */
#svcd-my-designs-modal {
	position:        fixed; inset: 0;
	z-index:         999997;
	display:         flex; align-items: center; justify-content: center;
}
.svcd-md__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); cursor: pointer; }
.svcd-md__dialog {
	position: relative; background: #fff; border-radius: 12px;
	padding: 28px; max-width: 700px; width: 94vw;
	max-height: 85vh; overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0,0,0,.22);
	animation: svcdSlideUp .25s ease;
}
.svcd-md__loading, .svcd-md__empty {
	text-align: center; color: #888; padding: 40px; font-size: 14px;
}
.svcd-md__grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 14px; margin-top: 4px;
}
.svcd-md__card {
	border: 1px solid #e8eaed; border-radius: 8px; overflow: hidden;
	transition: box-shadow .15s;
}
.svcd-md__card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.svcd-md__thumb {
	aspect-ratio: 1; background: #f8f9fa;
	display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.svcd-md__thumb img { width: 100%; height: 100%; object-fit: cover; }
.svcd-md__no-preview { font-size: 11px; color: #bbb; }
.svcd-md__info { padding: 8px 10px 4px; }
.svcd-md__name { display: block; font-size: 13px; font-weight: 600; color: #1a1d21; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svcd-md__date { font-size: 11px; color: #888; }
.svcd-md__actions { padding: 8px 10px; display: flex; gap: 6px; border-top: 1px solid #f0f2f5; }
.svcd-md__actions .svcd-btn--primary { flex: 1; padding: 6px; font-size: 12px; }
.svcd-md__actions .svcd-btn--outline  { padding: 6px 10px; font-size: 14px; }

/* Save/My Designs toolbar buttons */
.svcd-tool-btn--save:hover:not(:disabled)      { background: #7b1fa2 !important; border-color: #7b1fa2 !important; box-shadow: 0 3px 10px rgba(123,31,162,.3) !important; }
.svcd-tool-btn--my-designs:hover:not(:disabled) { background: #0277bd !important; border-color: #0277bd !important; box-shadow: 0 3px 10px rgba(2,119,189,.3) !important; }

/* =========================================================================
   Footer Save/My Designs buttons
========================================================================= */
.svcd-footer-saved-actions {
	display:     flex;
	align-items: center;
	gap:         8px;
	flex-wrap:   wrap;
}
.svcd-btn--ghost {
	background:    transparent;
	border:        1px solid rgba(255,255,255,.15);
	color:         #555;
	border-radius: var(--svcd-radius, 5px);
	padding:       8px 14px;
	font-size:     13px;
	font-weight:   600;
	cursor:        pointer;
	display:       inline-flex;
	align-items:   center;
	gap:           6px;
	transition:    all .15s;
	text-decoration: none;
	border-color:  #ddd;
}
.svcd-btn--ghost:hover { background: #f5f5f5; border-color: #bbb; color: #333; }
.svcd-footer-save-btn:hover     { border-color: #7b1fa2; color: #7b1fa2; background: #f3e5f5; }
.svcd-footer-mydesigns-btn:hover{ border-color: #0277bd; color: #0277bd; background: #e3f2fd; }

.svcd-saved-count {
	background:    var(--svcd-primary, #FF6600);
	color:         #fff;
	border-radius: 10px;
	padding:       2px 6px;
	font-size:     11px;
	font-weight:   700;
	min-width:     18px;
	text-align:    center;
}
.svcd-footer-hint {
	font-size:   12px;
	color:       #888;
	display:     flex;
	align-items: center;
	gap:         5px;
}

/* ── Save Design Prompt ── */
#svcd-save-prompt {
	position: fixed; inset: 0; z-index: 999998;
	display:  flex; align-items: center; justify-content: center;
}
.svcd-sp__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.svcd-sp__dialog {
	position:      relative;
	background:    #fff;
	border-radius: 12px;
	padding:       28px 28px 22px;
	max-width:     420px;
	width:         90vw;
	box-shadow:    0 16px 48px rgba(0,0,0,.2);
	animation:     svcdSlideUp .2s ease;
}
.svcd-sp__title  { font-size: 18px; font-weight: 700; margin: 0 0 8px; color: #1a1d21; }
.svcd-sp__desc   { font-size: 13px; color: #666; margin: 0 0 16px; line-height: 1.5; }
.svcd-sp__input  {
	width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px;
	font-size: 14px; margin-bottom: 16px; box-sizing: border-box;
}
.svcd-sp__input:focus { outline: none; border-color: var(--svcd-primary, #FF6600); box-shadow: 0 0 0 3px rgba(255,102,0,.15); }
.svcd-sp__actions { display: flex; gap: 10px; justify-content: flex-end; }

/* Unit note in size chart section title */
.svcd-sm__unit-note {
	font-size:      11px;
	font-weight:    400;
	color:          #aaa;
	text-transform: none;
	letter-spacing: 0;
	margin-left:    4px;
}

/* ── Image Properties Panel ─────────────────────────────────────── */
#svcd-image-props { display: none; }

.svcd-prop-toggle {
	display:       flex;
	align-items:   center;
	gap:           6px;
	padding:       5px 12px;
	border:        1px solid #ddd;
	border-radius: 20px;
	background:    #f5f5f5;
	cursor:        pointer;
	font-size:     12px;
	font-weight:   600;
	transition:    all .15s;
	min-width:     70px;
	justify-content: center;
}
.svcd-prop-toggle .svcd-toggle-on  { display: none;  }
.svcd-prop-toggle .svcd-toggle-off { display: block; }
.svcd-prop-toggle--active {
	background:  #1a1d21;
	color:       #fff;
	border-color:#1a1d21;
}
.svcd-prop-toggle--active .svcd-toggle-on  { display: block; }
.svcd-prop-toggle--active .svcd-toggle-off { display: none;  }

.svcd-prop-row--wide { justify-content: space-between; align-items: center; }
.svcd-prop-btn-group { display: flex; gap: 4px; }
.svcd-prop-btn-group .svcd-prop-btn { padding: 4px 10px; font-size: 12px; }

/* ── No-selection hint in properties panel ─── */
.svcd-no-selection-hint {
	display:        flex;
	flex-direction: column;
	align-items:    center;
	justify-content:center;
	gap:            10px;
	padding:        40px 16px;
	color:          #bbb;
	font-size:      12px;
	text-align:     center;
	line-height:    1.5;
	flex:           1;
}

/* Greyscale button full-width */
.svcd-prop-greyscale-btn {
	width:         100%;
	border-radius: 6px;
	padding:       8px 12px;
	font-size:     13px;
}

/* ── Greyscale button ──────────────────────────────────────────── */
.svcd-prop-greyscale-btn {
	display:       flex;
	align-items:   center;
	gap:           8px;
	width:         100%;
	padding:       8px 12px;
	border:        1px solid #ddd;
	border-radius: 6px;
	background:    #f5f5f5;
	cursor:        pointer;
	font-size:     13px;
	font-weight:   500;
	color:         #333;
	transition:    all .15s;
	margin:        4px 0 8px;
}
.svcd-prop-greyscale-btn:hover {
	background:  #1a1d21;
	color:       #fff;
	border-color:#1a1d21;
}
/* Active state (greyscale is on) */
.svcd-prop-greyscale-btn[aria-pressed="true"] {
	background:  #1a1d21;
	color:       #fff;
	border-color:#1a1d21;
}
/* Show/hide correct label */
.svcd-prop-greyscale-btn .svcd-gs-label-on  { display: none;  }
.svcd-prop-greyscale-btn .svcd-gs-label-off { display: block; }
.svcd-prop-greyscale-btn[aria-pressed="true"] .svcd-gs-label-on  { display: block; }
.svcd-prop-greyscale-btn[aria-pressed="true"] .svcd-gs-label-off { display: none;  }
