/* SmartPrint Pro V2 — Public Styles */

.sp-workspace {
	--sp-radius: 14px;
	font-family: inherit;
	margin: 20px 0 26px;
	direction: rtl;
	text-align: right;
}

.sp-tabs-nav {
	display: flex;
	gap: 8px;
	background: #f4f4f7;
	padding: 6px;
	border-radius: calc(var(--sp-radius) + 4px);
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.sp-tab-btn {
	flex: 1 1 auto;
	border: none;
	background: transparent;
	padding: 10px 16px;
	border-radius: var(--sp-radius);
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	color: #555;
	transition: all .25s ease;
	white-space: nowrap;
}

.sp-tab-btn.active-tab {
	background: linear-gradient(135deg, var(--sp-primary, var(--e-global-color-primary, #7c3aed)), var(--sp-secondary, var(--e-global-color-secondary, #06b6d4)));
	color: #fff;
	box-shadow: 0 4px 14px rgba(0,0,0,.15);
}

/* STRICT pane display rules — override any rogue theme CSS */
.sp-tab-panel-pane {
	display: none !important;
	animation: sp-fade-in .25s ease;
}

.sp-tab-panel-pane.active-pane {
	display: block !important;
}

@keyframes sp-fade-in {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

.sp-card {
	background: #fff;
	border: 1px solid #ececf2;
	border-radius: calc(var(--sp-radius) + 2px);
	padding: 20px;
	box-shadow: 0 2px 18px rgba(20,20,40,.05);
	margin-bottom: 16px;
}

.sp-field-label {
	display: block;
	font-weight: 700;
	margin-bottom: 10px;
	font-size: 14px;
	color: #222;
}

.sp-upload-dropzone {
	position: relative;
	border: 2px dashed #d8d8e2;
	border-radius: var(--sp-radius);
	padding: 22px;
	text-align: center;
	cursor: pointer;
	transition: border-color .2s, background .2s;
	background: #fafafe;
}

.sp-upload-dropzone.drag-over,
.sp-upload-dropzone:hover {
	border-color: var(--sp-primary, var(--e-global-color-primary, #7c3aed));
	background: #f5f2ff;
}

.sp-upload-dropzone input[type="file"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
	height: 100%;
}

.sp-upload-preview {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	color: #777;
	font-size: 13.5px;
	pointer-events: none;
}

.sp-upload-icon {
	font-size: 26px;
	color: var(--sp-primary, var(--e-global-color-primary, #7c3aed));
}

.sp-grid-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	margin-top: 16px;
}

.sp-field-wide {
	grid-column: 1 / -1;
}

.sp-field label {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	color: #555;
	margin-bottom: 6px;
}

.sp-input,
.sp-input-readonly {
	width: 100%;
	border: 1px solid #e2e2ea;
	border-radius: 10px;
	padding: 9px 12px;
	font-size: 13.5px;
	background: #fff;
	box-sizing: border-box;
	transition: border-color .2s, box-shadow .2s;
}

.sp-input:focus {
	outline: none;
	border-color: var(--sp-primary, var(--e-global-color-primary, #7c3aed));
	box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}

.sp-input-readonly {
	background: repeating-linear-gradient(135deg, #f6f6fb, #f6f6fb 6px, #f1f1f8 6px, #f1f1f8 12px);
	color: #444;
	font-weight: 700;
	cursor: not-allowed;
	border-style: dashed;
}

.sp-field-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-direction: row-reverse;
	justify-content: flex-end;
}

.sp-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
}

.sp-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.sp-switch-slider {
	position: absolute;
	inset: 0;
	background: #dcdce4;
	border-radius: 999px;
	transition: .25s;
	cursor: pointer;
}

.sp-switch-slider::before {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: .25s;
	box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.sp-switch input:checked + .sp-switch-slider {
	background: linear-gradient(135deg, var(--sp-primary, var(--e-global-color-primary, #7c3aed)), var(--sp-secondary, var(--e-global-color-secondary, #06b6d4)));
}

.sp-switch input:checked + .sp-switch-slider::before {
	transform: translateX(-18px);
}

/* Colorful, modern pure-CSS tooltip — no JS needed */
.sp-tooltip-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 17px;
	height: 17px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--sp-primary, var(--e-global-color-primary, #7c3aed)), var(--sp-secondary, var(--e-global-color-secondary, #06b6d4)));
	color: #fff;
	font-size: 10.5px;
	font-weight: 800;
	cursor: help;
	position: relative;
	vertical-align: middle;
	margin-right: 4px;
}

.sp-tooltip-icon:hover::after,
.sp-tooltip-icon:focus::after,
.sp-tooltip-icon:hover::before,
.sp-tooltip-icon:focus::before {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.sp-tooltip-icon::after {
	content: attr(data-tooltip);
	position: absolute;
	bottom: calc(100% + 10px);
	right: 50%;
	transform: translateY(4px) translateX(50%);
	background: linear-gradient(135deg, #2b1055, #1a0b3d);
	color: #f3ecff;
	padding: 10px 13px;
	border-radius: 10px;
	font-size: 11.5px;
	font-weight: 500;
	line-height: 1.7;
	width: 220px;
	white-space: normal;
	text-align: right;
	opacity: 0;
	visibility: hidden;
	transition: all .18s ease;
	z-index: 20000;
	box-shadow: 0 8px 24px rgba(80,30,180,.35);
	pointer-events: none;
}

.sp-tooltip-icon::before {
	content: "";
	position: absolute;
	bottom: calc(100% + 4px);
	right: calc(50% - 6px);
	transform: translateY(4px);
	border: 6px solid transparent;
	border-top-color: #1a0b3d;
	opacity: 0;
	visibility: hidden;
	transition: all .18s ease;
	z-index: 20000;
	pointer-events: none;
}

.sp-length-range-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #eef7ff;
	color: #1567b8;
	border: 1px solid #cfe8ff;
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 700;
	margin-top: 10px;
}

/* Bolder, more modern styling for width/length/print-count fields specifically */
.sp-file-card-fields .sp-input,
.sp-file-card-fields .sp-input-readonly {
	font-weight: 800;
	font-size: 13px;
	border-width: 2px;
	border-radius: 9px;
}

.sp-file-card-fields .sp-input:focus {
	border-color: var(--sp-primary, var(--e-global-color-primary, #7c3aed));
	box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

.sp-size-preset-row {
	display: flex;
	gap: 8px;
	margin-top: 4px;
	flex-wrap: wrap;
}

.sp-size-preset-option {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 10.5px;
	font-weight: 700;
	color: #555;
	background: #f4f2fc;
	border-radius: 7px;
	padding: 3px 8px;
	cursor: pointer;
}

.sp-size-preset-option input {
	accent-color: var(--sp-primary, var(--e-global-color-primary, #7c3aed));
	width: 13px;
	height: 13px;
}

/* Aspect-ratio mismatch confirmation modal */
.sp-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(20,15,40,.55);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.sp-modal-box {
	background: #fff;
	border-radius: 16px;
	padding: 22px;
	width: 420px;
	max-width: 100%;
	box-shadow: 0 20px 60px rgba(0,0,0,.3);
	text-align: right;
	direction: rtl;
}

.sp-modal-box h4 {
	margin: 0 0 10px;
	font-size: 15px;
	color: #222;
	display: flex;
	align-items: center;
	gap: 6px;
}

.sp-modal-box p {
	font-size: 13px;
	color: #444;
	line-height: 1.9;
	margin: 6px 0;
}

.sp-modal-actions {
	display: flex;
	gap: 10px;
	margin-top: 18px;
}

.sp-modal-actions .sp-btn {
	flex: 1;
}

.sp-modal-box-wide {
	width: 520px;
	max-height: 80vh;
	overflow-y: auto;
}

.sp-ratio-row-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 14px 0;
}

.sp-ratio-row {
	background: #fafafe;
	border: 1px solid #ececf4;
	border-radius: 10px;
	padding: 10px 12px;
}

.sp-ratio-row-name {
	font-weight: 700;
	font-size: 12.5px;
	color: #222;
}

.sp-ratio-row-detail {
	font-size: 11.5px;
	color: #555;
	line-height: 1.8;
	margin: 4px 0 8px;
}

.sp-ratio-accept-check {
	padding: 6px 10px;
}

.sp-addon-package-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 10px;
}

.sp-addon-package-card {
	position: relative;
	cursor: pointer;
	display: block;
}

.sp-addon-package-card input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.sp-addon-package-card-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	background: #fff;
	border: 2px solid #e6e6f0;
	border-radius: 12px;
	padding: 12px 14px;
	transition: all .15s ease;
}

.sp-addon-package-card:hover .sp-addon-package-card-body {
	border-color: #c9bdf5;
}

.sp-addon-package-card input:checked + .sp-addon-package-card-body {
	border-color: transparent;
	background: linear-gradient(135deg, rgba(124,58,237,.08), rgba(6,182,212,.08));
	box-shadow: 0 0 0 2px var(--sp-primary, var(--e-global-color-primary, #7c3aed)) inset;
}

.sp-addon-package-title {
	font-weight: 800;
	font-size: 13px;
	color: #222;
}

.sp-addon-package-meta {
	font-size: 11px;
	color: #777;
}

.sp-addon-package-price {
	font-weight: 800;
	font-size: 13px;
	color: var(--sp-primary, var(--e-global-color-primary, #7c3aed));
	margin-top: 4px;
}

.sp-allowed-formats-line {
	font-size: 11.5px;
	color: #777;
	margin: 4px 0 10px;
}

/* ---------------------------------------------------------------------
 * Defensive reset: on sites with a heavily customized theme or other
 * plugins injecting their own global CSS, properties like box-sizing,
 * line-height, list markers, or button resets can leak into our
 * workspace and break the layout. Scoping a reset to everything INSIDE
 * .sp-workspace (high specificity, applied last in the cascade — see the
 * late enqueue priority in class-smartprint-public.php) makes our UI
 * resilient to that regardless of what else is loaded on the page.
 * ------------------------------------------------------------------- */
.sp-workspace,
.sp-workspace * {
	box-sizing: border-box;
}

.sp-workspace {
	line-height: 1.6;
	text-align: right;
}

.sp-workspace ul,
.sp-workspace ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sp-workspace button {
	font-family: inherit;
}

.sp-workspace input,
.sp-workspace select,
.sp-workspace textarea {
	font-family: inherit;
	box-shadow: none;
	outline: none;
}

.sp-workspace img {
	max-width: none;
}

.sp-modal-overlay,
.sp-modal-overlay * {
	box-sizing: border-box;
}

.sp-file-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 14px;
}

.sp-file-card {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #fafafe;
	border: 1px solid #ececf4;
	border-radius: 12px;
	padding: 10px 12px;
}

.sp-thumb {
	width: 52px;
	height: 52px;
	border-radius: 10px;
	object-fit: cover;
	border: 1px solid #e4e4ee;
	background: #fff;
	flex-shrink: 0;
}

.sp-thumb-sm {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	object-fit: cover;
	border: 1px solid #e4e4ee;
	background: #fff;
	vertical-align: middle;
}

.sp-thumb-lg {
	width: 90px;
	height: 90px;
	border-radius: 14px;
	object-fit: cover;
	border: 1px solid #e4e4ee;
	background: #fff;
}

.sp-file-card-info {
	flex: 1;
	min-width: 0;
}

.sp-file-card-name {
	font-size: 13px;
	font-weight: 700;
	color: #333;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sp-file-card-meta {
	font-size: 11.5px;
	color: #888;
	margin-top: 2px;
}

.sp-file-card-fields {
	display: flex;
	align-items: center;
	gap: 8px;
}

.sp-file-card-fields .sp-input,
.sp-file-card-fields .sp-input-readonly {
	width: 90px;
	padding: 6px 8px;
	font-size: 12.5px;
}

.sp-file-card-fields-spotlight {
	position: relative;
	display: flex;
	gap: 10px;
	background: linear-gradient(135deg, #f7f2ff 0%, #f0fbfd 100%);
	border: none;
	border-radius: 14px;
	padding: 12px 14px !important;
	box-shadow: 0 2px 12px rgba(124,58,237,.10), inset 0 0 0 1.5px #e4d9fb;
}

.sp-file-card-fields-spotlight::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 14px;
	padding: 1.5px;
	background: linear-gradient(120deg, var(--sp-primary, var(--e-global-color-primary, #7c3aed)), var(--sp-secondary, var(--e-global-color-secondary, #06b6d4)), var(--sp-primary, var(--e-global-color-primary, #7c3aed)));
	background-size: 200% 200%;
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: .35;
	animation: sp-spotlight-sheen 5s ease infinite;
	pointer-events: none;
}

@keyframes sp-spotlight-sheen {
	0%   { background-position: 0% 50%; }
	50%  { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

.sp-file-card-fields-spotlight .sp-mini-field {
	position: relative;
	z-index: 1;
	flex: 1;
}

.sp-file-card-fields-spotlight .sp-mini-field label {
	display: flex;
	align-items: center;
	gap: 3px;
	font-size: 10.5px;
	color: #6b3fd4;
	font-weight: 800;
	margin-bottom: 3px;
}

.sp-file-card-fields-spotlight .sp-input,
.sp-file-card-fields-spotlight .sp-input-readonly {
	width: 100%;
	font-size: 14.5px;
	font-weight: 900;
	border-width: 2px;
	border-color: #d9cdfb;
	background: #fff;
	border-radius: 9px;
	text-align: center;
	transition: all .15s ease;
}

.sp-file-card-fields-spotlight .sp-input:hover {
	border-color: #b8a3f0;
}

.sp-file-card-fields-spotlight .sp-input:focus {
	border-color: var(--sp-primary, var(--e-global-color-primary, #7c3aed));
	box-shadow: 0 0 0 4px rgba(124,58,237,.18);
	transform: scale(1.05);
}

.sp-file-card-remove {
	border: none;
	background: #fff2f2;
	color: #c62828;
	border-radius: 8px;
	width: 30px;
	height: 30px;
	cursor: pointer;
	font-size: 15px;
	flex-shrink: 0;
	transition: background .15s ease;
}

.sp-file-card-remove:hover {
	background: #ffe1e1;
}

.sp-shared-options {
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px dashed #e4e4ee;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.sp-radio-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sp-radio-group-title {
	font-size: 12.5px;
	font-weight: 700;
	color: #444;
	margin-bottom: 2px;
}

.sp-radio-option {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #333;
	cursor: pointer;
}

.sp-radio-option input[type="radio"] {
	accent-color: var(--sp-primary, var(--e-global-color-primary, #7c3aed));
	width: 16px;
	height: 16px;
	cursor: pointer;
}

/* Native WooCommerce quantity stepper is hidden — quantity is derived
   automatically from the requested print length, never typed manually. */
.sp-hide-qty {
	display: none !important;
}

/* Modern confirmation checkbox ("پس‌زمینه حذف شده" style requirement) */
.sp-modern-check {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	padding: 10px 14px;
	background: #fafafe;
	border: 1.5px solid #ececf4;
	border-radius: 12px;
	transition: border-color .15s ease, background .15s ease;
}

.sp-modern-check.sp-check-invalid {
	border-color: #f3b8b8;
	background: #fff6f6;
}

.sp-modern-check input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.sp-modern-check-box {
	width: 22px;
	height: 22px;
	border-radius: 7px;
	border: 2px solid #d4d4e2;
	display: flex;
	align-items: center;
	justify-content: center;
	color: transparent;
	background: #fff;
	flex-shrink: 0;
	transition: all .15s ease;
}

.sp-modern-check input:checked + .sp-modern-check-box {
	background: linear-gradient(135deg, var(--sp-primary, var(--e-global-color-primary, #7c3aed)), var(--sp-secondary, var(--e-global-color-secondary, #06b6d4)));
	border-color: transparent;
	color: #fff;
}

.sp-modern-check-label {
	font-size: 13px;
	font-weight: 600;
	color: #333;
}

.sp-required-star {
	color: #c62828;
	font-weight: 800;
}

/* Segmented / pill-style radio choice */
.sp-segmented-group {
	background: #fafafe;
	border: 1.5px solid #ececf4;
	border-radius: 12px;
	padding: 12px 14px;
	transition: border-color .15s ease, background .15s ease;
}

.sp-segmented-group.sp-check-invalid {
	border-color: #f3b8b8;
	background: #fff6f6;
}

.sp-segmented-title {
	font-size: 12.5px;
	font-weight: 700;
	color: #444;
	margin-bottom: 10px;
}

.sp-segmented-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sp-segmented-option {
	flex: 1 1 auto;
	position: relative;
	cursor: pointer;
}

.sp-segmented-option input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.sp-segmented-option span {
	display: block;
	text-align: center;
	padding: 9px 12px;
	border-radius: 9px;
	border: 1.5px solid #e2e2ee;
	background: #fff;
	font-size: 12.5px;
	font-weight: 600;
	color: #555;
	transition: all .15s ease;
	white-space: nowrap;
}

.sp-segmented-option input:checked + span {
	background: linear-gradient(135deg, var(--sp-primary, var(--e-global-color-primary, #7c3aed)), var(--sp-secondary, var(--e-global-color-secondary, #06b6d4)));
	border-color: transparent;
	color: #fff;
	box-shadow: 0 3px 10px rgba(124,58,237,.25);
}

/* Storage add-on panel */
.sp-addon-panel {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px dashed #e4e4ee;
}

/* Mobile-fit file card: thumbnail + name on top, then a tight row of
   width / length / print-count that still fits a narrow phone screen. */
.sp-file-card {
	flex-wrap: wrap;
}

.sp-file-card-fields {
	flex-wrap: wrap;
	gap: 6px;
}

.sp-file-card-fields .sp-mini-field {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.sp-file-card-fields .sp-mini-field label {
	font-size: 9.5px;
	color: #999;
	font-weight: 700;
}

.sp-file-card-fields .sp-input,
.sp-file-card-fields .sp-input-readonly {
	width: 64px;
	padding: 6px 6px;
	font-size: 12px;
	text-align: center;
}

@media (max-width: 480px) {
	.sp-file-card {
		gap: 8px;
	}
	.sp-file-card-info {
		flex-basis: 100%;
	}
	.sp-file-card-fields .sp-input,
	.sp-file-card-fields .sp-input-readonly {
		width: 100%;
	}
}

/* Generic responsive table helper: stacks table rows into cards on narrow
   screens instead of letting the table overflow / get cut off. */
@media (max-width: 680px) {
	table.sp-responsive-table thead {
		display: none;
	}
	table.sp-responsive-table, table.sp-responsive-table tbody, table.sp-responsive-table tr, table.sp-responsive-table td {
		display: block;
		width: 100%;
	}
	table.sp-responsive-table tr {
		margin-bottom: 12px;
		border: 1px solid #ececf4;
		border-radius: 12px;
		padding: 8px 10px;
	}
	table.sp-responsive-table td {
		display: flex;
		justify-content: space-between;
		gap: 10px;
		padding: 6px 2px;
		border: none !important;
		font-size: 13px;
	}
	table.sp-responsive-table td[data-label]::before {
		content: attr(data-label);
		font-weight: 700;
		color: #666;
		flex-shrink: 0;
	}
}

/* Cart-page quantity lock: plain read-only figure, no +/- spinner exists
   since we replace the entire input with this span server-side. */
/* File card shown in cart, checkout, invoice/order-received, My Account
   order view, HTML emails, and the WP-Admin Edit Order screen — thumbnail,
   friendly code, length/width/print-count fields, and a download button. */
.sp-order-item-files {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 8px;
}

.sp-order-file-card {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	background: #fafafe;
	border: 1px solid #ececf4;
	border-radius: 10px;
	padding: 8px 10px;
}

.sp-order-file-card .sp-thumb-sm {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	object-fit: cover;
	border: 1px solid #e2e2ea;
	flex-shrink: 0;
}

.sp-order-file-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 12px;
	color: #555;
	flex: 1 1 auto;
	min-width: 140px;
}

.sp-order-file-meta b {
	font-size: 12.5px;
	color: #222;
}

.sp-order-file-card .sp-btn {
	flex-shrink: 0;
}

.sp-order-file-locked {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #fff6e6;
	color: #a15c00;
	border: 1px solid #ffe1a8;
	border-radius: 8px;
	padding: 4px 9px;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}

.sp-order-file-ratio-note {
	display: block;
	font-size: 10.5px;
	color: #a15c00;
	background: #fff6e6;
	border: 1px solid #ffe1a8;
	border-radius: 6px;
	padding: 3px 7px;
	margin-top: 3px;
	width: fit-content;
}

.sp-order-summary-block {
	margin: 16px 0;
	padding: 14px;
	background: #fafafe;
	border: 1px dashed #d9cdfb;
	border-radius: 12px;
}

.sp-order-summary-title {
	margin: 0 0 10px;
	font-size: 13.5px;
	color: #333;
}

.sp-order-item-files-title {
	font-weight: 700;
	font-size: 12.5px;
	color: #333;
	margin-bottom: 4px;
}

.sp-order-file-shared {
	font-size: 12px;
	color: #555;
	margin-top: 4px;
}

.sp-blocks-order-meta {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 10px;
	width: 100%;
}

.sp-locked-qty {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	padding: 4px 10px;
	border-radius: 8px;
	background: #f4f2fc;
	color: #5b21b6;
	font-weight: 700;
	font-size: 13px;
}

.sp-progress-wrap {
	margin-top: 16px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.sp-progress-bar {
	flex: 1;
	height: 8px;
	border-radius: 999px;
	background: #eee;
	overflow: hidden;
}

.sp-progress-fill {
	height: 100%;
	width: 0%;
	background: linear-gradient(135deg, var(--sp-primary, var(--e-global-color-primary, #7c3aed)), var(--sp-secondary, var(--e-global-color-secondary, #06b6d4)));
	transition: width .2s ease;
}

.sp-progress-text {
	font-size: 12px;
	font-weight: 700;
	min-width: 40px;
	text-align: left;
}

.sp-alert {
	margin-top: 14px;
	padding: 10px 14px;
	border-radius: 10px;
	background: #fff2f2;
	border: 1px solid #ffd6d6;
	color: #c62828;
	font-size: 13px;
	font-weight: 600;
}

.sp-alert.sp-alert-success {
	background: #f1fbf3;
	border-color: #c8ecd0;
	color: #1e8a3c;
}

.sp-metrics-card {
	margin-top: 18px;
	background: #faf9ff;
	border-radius: var(--sp-radius);
	border: 1px solid #ececf7;
	padding: 14px 16px;
}

.sp-metric-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px 0;
	font-size: 13.5px;
	color: #444;
}

.sp-metric-price {
	font-size: 17px;
	font-weight: 800;
	color: #222;
	border-top: 1px dashed #ddd;
	margin-top: 4px;
	padding-top: 10px;
}

.sp-content-wrapper {
	line-height: 2;
	font-size: 14.5px;
	color: #333;
}

/* Ensure add-to-cart button sits cleanly below the workspace cards */
form.cart {
	margin-top: 4px !important;
}

form.cart .single_add_to_cart_button {
	border-radius: 12px !important;
	padding: 12px 26px !important;
	font-weight: 700 !important;
	font-size: 14.5px !important;
	background: linear-gradient(135deg, var(--sp-primary, var(--e-global-color-primary, #7c3aed)), var(--sp-secondary, var(--e-global-color-secondary, #06b6d4))) !important;
	border: none !important;
	color: #fff !important;
	letter-spacing: .2px;
	box-shadow: 0 3px 10px rgba(124,58,237,.22);
	transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

form.cart .single_add_to_cart_button:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(124,58,237,.32);
	filter: brightness(1.05);
}

form.cart .single_add_to_cart_button:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(124,58,237,.25);
}

form.cart .single_add_to_cart_button:disabled {
	opacity: .85;
	cursor: progress;
	transform: none;
}

/* Uploading state: subtle animated gradient sweep so the button visibly
   communicates "working", distinct from its normal idle appearance. */
form.cart .single_add_to_cart_button.sp-btn-uploading {
	background: linear-gradient(120deg, var(--sp-primary, var(--e-global-color-primary, #7c3aed)), var(--sp-secondary, var(--e-global-color-secondary, #06b6d4)), var(--sp-primary, var(--e-global-color-primary, #7c3aed))) !important;
	background-size: 220% 220% !important;
	animation: sp-btn-sweep 1.6s ease infinite;
	cursor: progress;
}

@keyframes sp-btn-sweep {
	0%   { background-position: 0% 50%; }
	50%  { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

/* Reusable modern button classes for SmartPrint's own UI (My Account, admin-facing widgets) */
.sp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: none;
	border-radius: 10px;
	padding: 9px 18px;
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease, filter .15s ease, background .15s ease;
	text-decoration: none;
}

.sp-btn:hover {
	transform: translateY(-1px);
	filter: brightness(1.05);
}

.sp-btn:active {
	transform: translateY(0);
}

.sp-btn:disabled {
	opacity: .6;
	cursor: not-allowed;
	transform: none;
}

.sp-btn-primary {
	background: linear-gradient(135deg, var(--sp-primary, var(--e-global-color-primary, #7c3aed)), var(--sp-secondary, var(--e-global-color-secondary, #06b6d4)));
	color: #fff;
	box-shadow: 0 3px 10px rgba(124,58,237,.22);
}

.sp-btn-outline {
	background: #fff;
	color: var(--sp-primary, var(--e-global-color-primary, #7c3aed));
	border: 1.5px solid var(--sp-primary, var(--e-global-color-primary, #7c3aed));
}

.sp-btn-outline:hover {
	background: #faf7ff;
}

.sp-btn-danger {
	background: #fff;
	color: #c62828;
	border: 1.5px solid #f3c6c6;
}

.sp-btn-danger:hover {
	background: #fff2f2;
}

.sp-btn-sm {
	padding: 6px 12px;
	font-size: 12.5px;
	border-radius: 8px;
}

@media (max-width: 640px) {
	.sp-grid-row {
		grid-template-columns: 1fr;
	}
	.sp-tabs-nav {
		flex-direction: column;
	}
}
