/**
 * Modprinters Design Studio — fullscreen modal styles.
 */

.mp-studio-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: #f5f6fa;
	display: flex;
	flex-direction: column;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
	color: #0a0e1a;
	animation: mp-fade-in 0.2s ease;
}
@keyframes mp-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Layout ---------- */
.mp-studio { display: flex; flex-direction: column; width: 100%; height: 100%; }
.mp-studio__header {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.65rem 1.25rem;
	background: #fff;
	border-bottom: 1px solid #e5e7ee;
	box-shadow: 0 1px 0 rgba(10,14,26,0.04);
}
.mp-studio__title { display: flex; flex-direction: column; line-height: 1.2; }
.mp-studio__product { font-weight: 700; font-size: 14px; }
.mp-studio__size { font-size: 12px; color: #5c6680; }
.mp-studio__controls {
	display: flex; align-items: center; gap: 4px;
	margin: 0 auto;
	background: #f5f6fa;
	border-radius: 999px;
	padding: 4px;
}
.mp-studio__icon {
	background: transparent;
	border: 0;
	width: 32px; height: 32px;
	border-radius: 999px;
	cursor: pointer;
	font-size: 14px;
	color: #3a435a;
	transition: background 0.12s ease;
}
.mp-studio__icon:hover { background: #fff; }
.mp-studio__sep { width: 1px; height: 18px; background: #c4c8d6; margin: 0 4px; }
.mp-studio__zoom { font-size: 12px; color: #3a435a; min-width: 36px; text-align: center; }
.mp-studio__actions { display: flex; gap: 0.5rem; }
.mp-studio__btn {
	border: 0;
	border-radius: 999px;
	padding: 0.55rem 1.1rem;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.mp-studio__btn--ghost { background: transparent; color: #3a435a; }
.mp-studio__btn--ghost:hover { background: #f5f6fa; }
.mp-studio__btn--primary { background: #ff4d0a; color: #fff; box-shadow: 0 6px 16px -6px rgba(255,77,10,0.5); }
.mp-studio__btn--primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(255,77,10,0.55); }

.mp-studio__body {
	display: grid;
	grid-template-columns: 84px 280px 1fr 280px;
	flex: 1;
	min-height: 0;
}
@media (max-width: 1100px) {
	.mp-studio__body { grid-template-columns: 72px 240px 1fr; }
	.mp-studio__inspector { display: none; }
}

/* ---------- Tools rail ---------- */
.mp-studio__tools {
	background: #0a0e1a;
	color: #fff;
	display: flex;
	flex-direction: column;
	padding: 0.75rem 0.5rem;
	gap: 4px;
}
.mp-studio__tool {
	background: transparent;
	color: #c4c8d6;
	border: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 0.7rem 0.4rem;
	border-radius: 10px;
	cursor: pointer;
	font-size: 11px;
	transition: background 0.12s ease, color 0.12s ease;
}
.mp-studio__tool span { font-size: 18px; line-height: 1; }
.mp-studio__tool b { font-weight: 600; font-size: 11px; }
.mp-studio__tool:hover { background: rgba(255,255,255,0.06); color: #fff; }
.mp-studio__tool.is-active { background: #ff4d0a; color: #fff; }

/* ---------- Side panel ---------- */
.mp-studio__panel {
	background: #fff;
	border-right: 1px solid #e5e7ee;
	padding: 1.25rem;
	overflow-y: auto;
}
.mp-studio__panel h3 { margin: 0 0 0.5rem; font-size: 14px; font-weight: 700; }
.mp-studio__panel h4 { margin: 1rem 0 0.4rem; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #5c6680; }
.mp-studio__hint { font-size: 12px; color: #5c6680; margin: 0 0 0.75rem; }

.mp-studio__add {
	display: block;
	width: 100%;
	background: #f5f6fa;
	border: 1px solid #e5e7ee;
	color: #0a0e1a;
	padding: 0.65rem 0.75rem;
	border-radius: 10px;
	cursor: pointer;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 13px;
	text-align: left;
	transition: all 0.15s ease;
}
.mp-studio__add:hover { background: #fff; border-color: #0a0e1a; }

.mp-studio__fonts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.mp-studio__fonts button {
	background: #fff;
	border: 1px solid #e5e7ee;
	border-radius: 8px;
	padding: 0.45rem 0.5rem;
	cursor: pointer;
	font-size: 12px;
	transition: border-color 0.15s ease;
}
.mp-studio__fonts button:hover { border-color: #0a0e1a; }

.mp-studio__upload {
	display: block;
	border: 2px dashed #c4c8d6;
	border-radius: 12px;
	padding: 1.5rem 1rem;
	text-align: center;
	cursor: pointer;
	font-size: 13px;
	color: #5c6680;
	transition: all 0.15s ease;
}
.mp-studio__upload:hover { border-color: #ff4d0a; background: #fff4ed; color: #0a0e1a; }

.mp-studio__shapes {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 6px;
}
.mp-studio__shapes button {
	background: #f5f6fa;
	border: 1px solid #e5e7ee;
	border-radius: 8px;
	height: 48px;
	cursor: pointer;
	font-size: 18px;
	transition: all 0.15s ease;
}
.mp-studio__shapes button:hover { border-color: #ff4d0a; background: #fff4ed; }

.mp-studio__swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.mp-studio__swatches button {
	height: 32px;
	border-radius: 6px;
	border: 1px solid #e5e7ee;
	cursor: pointer;
	transition: transform 0.12s ease;
}
.mp-studio__swatches button:hover { transform: scale(1.1); }

.mp-studio__field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #5c6680; margin-top: 8px; }
.mp-studio__field input[type="text"],
.mp-studio__field input[type="number"],
.mp-studio__field textarea {
	border: 1px solid #c4c8d6;
	border-radius: 8px;
	padding: 0.45rem 0.6rem;
	font-size: 13px;
	color: #0a0e1a;
	width: 100%;
	box-sizing: border-box;
}
.mp-studio__field textarea { min-height: 70px; resize: vertical; }
.mp-studio__field input[type="color"] { width: 40px; height: 28px; padding: 0; border: 1px solid #c4c8d6; border-radius: 6px; cursor: pointer; }

.mp-studio__layers {
	list-style: none;
	margin: 0;
	padding: 0;
}
.mp-studio__layers li button {
	width: 100%;
	text-align: left;
	background: #f5f6fa;
	border: 1px solid #e5e7ee;
	border-radius: 8px;
	padding: 0.5rem 0.65rem;
	margin-bottom: 4px;
	cursor: pointer;
	font-size: 12px;
}
.mp-studio__layers li button:hover { border-color: #0a0e1a; }

/* ---------- Stage ---------- */
.mp-studio__stage {
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: auto;
	background:
		radial-gradient(1200px 600px at 50% -20%, rgba(255,77,10,0.04), transparent 60%),
		linear-gradient(180deg, #ecedf3 0%, #f5f6fa 100%);
	padding: 2rem;
}
.mp-studio__canvas-wrap {
	background: #fff;
	box-shadow: 0 24px 60px -24px rgba(10,14,26,0.25), 0 4px 12px -4px rgba(10,14,26,0.1);
	border-radius: 4px;
}
.mp-studio--grid .mp-studio__canvas-wrap {
	background-image:
		linear-gradient(to right, rgba(10,14,26,0.04) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(10,14,26,0.04) 1px, transparent 1px);
	background-size: 24px 24px;
}

/* ---------- Inspector ---------- */
.mp-studio__inspector {
	background: #fff;
	border-left: 1px solid #e5e7ee;
	padding: 1.25rem;
	overflow-y: auto;
}
.mp-studio__inspector h3 { margin: 0 0 0.75rem; font-size: 14px; font-weight: 700; }
.mp-studio__inspector-empty {
	font-size: 13px;
	color: #5c6680;
	padding: 2rem 0;
	text-align: center;
}
.mp-studio__row {
	display: flex;
	gap: 4px;
	margin-top: 0.75rem;
	flex-wrap: wrap;
}
.mp-studio__row button {
	flex: 1;
	min-width: 0;
	background: #f5f6fa;
	border: 1px solid #e5e7ee;
	border-radius: 8px;
	padding: 0.45rem 0.5rem;
	cursor: pointer;
	font-size: 12px;
	transition: all 0.12s ease;
}
.mp-studio__row button:hover { border-color: #0a0e1a; }

/* ---------- Footer ---------- */
.mp-studio__footer {
	background: #fff;
	border-top: 1px solid #e5e7ee;
	padding: 0.65rem 1.25rem;
	display: flex;
	align-items: center;
	gap: 1.5rem;
	flex-wrap: wrap;
}
.mp-studio__sides { display: flex; gap: 4px; background: #f5f6fa; border-radius: 999px; padding: 4px; }
.mp-studio__side {
	background: transparent;
	border: 0;
	padding: 0.4rem 1rem;
	border-radius: 999px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	color: #5c6680;
	transition: all 0.12s ease;
}
.mp-studio__side.is-active { background: #fff; color: #0a0e1a; box-shadow: 0 2px 6px -2px rgba(10,14,26,0.15); }

.mp-studio__legend {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	font-size: 11px;
	color: #5c6680;
	margin-left: auto;
}
.mp-studio__swatch {
	display: inline-block;
	width: 14px; height: 2px;
	border-top: 2px dashed currentColor;
	margin-right: 6px;
	vertical-align: middle;
}
.mp-studio__swatch--bleed { color: #ff4d0a; }
.mp-studio__swatch--safe { color: #22c55e; }

/* ---------- Preview modal ---------- */
.mp-preview {
	position: fixed; inset: 0; z-index: 100000;
	background: rgba(10,14,26,0.7);
	display: flex; align-items: center; justify-content: center;
	padding: 2rem;
	animation: mp-fade-in 0.18s ease;
}
.mp-preview__inner {
	background: #fff;
	border-radius: 14px;
	padding: 1.75rem;
	max-width: 1200px;
	width: 100%;
	max-height: 90vh;
	overflow: auto;
}
.mp-preview__inner h3 { margin: 0 0 1rem; font-size: 18px; }
.mp-preview__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
}
.mp-preview__grid > div {
	background: #f5f6fa;
	border-radius: 12px;
	padding: 1rem;
	text-align: center;
}
.mp-preview__grid span { font-size: 12px; color: #5c6680; display: block; margin-bottom: 0.5rem; }
.mp-preview__grid img { max-width: 100%; max-height: 60vh; border-radius: 6px; box-shadow: 0 8px 24px -8px rgba(10,14,26,0.2); }
.mp-preview__actions {
	margin-top: 1.25rem;
	display: flex; gap: 0.5rem; justify-content: flex-end;
}
.mp-preview__actions button {
	background: #f5f6fa;
	border: 1px solid #e5e7ee;
	border-radius: 999px;
	padding: 0.6rem 1.2rem;
	cursor: pointer;
	font-weight: 600;
}
.mp-preview__actions button.mp-studio__btn--primary {
	background: #ff4d0a;
	color: #fff;
	border-color: #ff4d0a;
}
