/* OnMerch Product Quote — configurator modal
   Style inspiré de la maquette : modal blanc, boutons navy foncé. */

.ompq-open {
	margin-top: 12px;
}

body.ompq-locked {
	overflow: hidden;
}

.ompq-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

/* ---------- Overlay & modal ---------- */
.ompq-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	z-index: 99999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 32px 16px;
	overflow-y: auto;
}

.ompq-overlay[hidden] {
	display: none;
}

.ompq-modal {
	--ompq-ink: #0F172A;
	--ompq-navy: #101828;
	--ompq-muted: #64748B;
	--ompq-border: #E2E8F0;
	--ompq-bg-soft: #F8FAFC;
	--ompq-radius: 12px;

	background: #fff;
	border-radius: 16px;
	width: 100%;
	max-width: 880px;
	font-family: inherit;
	color: var(--ompq-ink);
	box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
}

.ompq-modal *,
.ompq-modal *::before,
.ompq-modal *::after {
	box-sizing: border-box;
}

.ompq-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 22px 28px;
	border-bottom: 1px solid var(--ompq-border);
}

.ompq-modal__header h2 {
	margin: 0;
	font-size: 1.3rem;
	font-weight: 700;
}

.ompq-close {
	background: none;
	border: none;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	color: var(--ompq-muted);
	padding: 4px 8px;
}

.ompq-close:hover {
	color: var(--ompq-ink);
}

.ompq-modal__body {
	padding: 24px 28px 32px;
}

/* ---------- Labels & hints ---------- */
.ompq-label {
	font-weight: 600;
	margin: 20px 0 8px;
}

.ompq-label__hint {
	font-weight: 400;
	color: var(--ompq-muted);
	font-size: 0.9em;
}

.ompq-hint {
	color: var(--ompq-muted);
	font-size: 0.82rem;
	margin: 6px 0 0;
}

/* ---------- Colors ---------- */
.ompq-colors__list {
	display: flex;
	gap: 10px;
}

.ompq-swatch {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 2px solid transparent;
	background-color: #e5e7eb;
	background-size: cover;
	background-position: center;
	cursor: pointer;
	padding: 0;
	transition: border-color 0.15s, transform 0.15s;
}

.ompq-swatch:hover {
	transform: scale(1.06);
}

.ompq-swatch.is-active {
	border-color: var(--ompq-navy);
	box-shadow: 0 0 0 2px #fff inset;
}

/* ---------- Views ---------- */
.ompq-views {
	display: flex;
	gap: 8px;
	margin: 18px 0 12px;
}

.ompq-view {
	border: 1px solid var(--ompq-border);
	background: var(--ompq-bg-soft);
	color: var(--ompq-ink);
	border-radius: 8px;
	padding: 8px 18px;
	font: inherit;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.ompq-view.is-active {
	background: var(--ompq-navy);
	border-color: var(--ompq-navy);
	color: #fff;
}

/* ---------- Stage ---------- */
.ompq-stage {
	position: relative;
	border: 1px solid var(--ompq-border);
	border-radius: var(--ompq-radius);
	background: #fff;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	touch-action: none;
}

.ompq-stage__mockup {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	pointer-events: none;
	user-select: none;
}

.ompq-stage__overlay {
	position: absolute;
	cursor: grab;
	outline: 1.5px dashed rgba(16, 24, 40, 0.5);
	outline-offset: 2px;
}

.ompq-stage__overlay:active {
	cursor: grabbing;
}

.ompq-stage__overlay img {
	width: 100%;
	height: 100%;
	display: block;
	pointer-events: none;
	user-select: none;
	-webkit-user-drag: none;
}

.ompq-stage__handle {
	position: absolute;
	right: -8px;
	bottom: -8px;
	width: 16px;
	height: 16px;
	background: var(--ompq-navy);
	border: 2px solid #fff;
	border-radius: 50%;
	cursor: nwse-resize;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.ompq-stage-actions {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-top: 14px;
}

/* ---------- Buttons ---------- */
.ompq-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font: inherit;
	font-weight: 600;
	border: none;
	border-radius: 8px;
	padding: 11px 20px;
	cursor: pointer;
	transition: background 0.15s;
}

.ompq-btn--dark {
	background: var(--ompq-navy);
	color: #fff;
}

.ompq-btn--dark:hover {
	background: #1e293b;
	color: #fff;
}

.ompq-btn--ghost {
	background: var(--ompq-bg-soft);
	color: var(--ompq-ink);
	border: 1px solid var(--ompq-border);
}

.ompq-submit {
	margin-top: 24px;
	padding: 14px 28px;
}

.ompq-btn[disabled] {
	opacity: 0.6;
	cursor: wait;
}

/* ---------- Fields ---------- */
.ompq-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 20px;
	margin-top: 20px;
}

.ompq-field label {
	display: block;
	font-weight: 500;
	font-size: 0.9rem;
	margin-bottom: 6px;
}

.ompq-req {
	color: #C2410C;
}

.ompq-field input,
.ompq-field textarea {
	width: 100%;
	border: 1px solid var(--ompq-border);
	border-radius: 8px;
	padding: 11px 14px;
	font: inherit;
	color: var(--ompq-ink);
	background: #fff;
}

.ompq-field input:focus,
.ompq-field textarea:focus {
	outline: none;
	border-color: var(--ompq-navy);
	box-shadow: 0 0 0 3px rgba(16, 24, 40, 0.08);
}

.ompq-field--full {
	grid-column: 1 / -1;
	margin-top: 12px;
}

/* ---------- Min qty note & sizes ---------- */
.ompq-minqty-note {
	background: #FFFBEB;
	border: 1px solid #FDE68A;
	color: #92400E;
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 0.88rem;
	margin-bottom: 14px;
}

.ompq-sizes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
	gap: 10px;
}

.ompq-size label {
	display: block;
	text-align: center;
	font-weight: 600;
	font-size: 0.85rem;
	margin-bottom: 6px;
	color: var(--ompq-muted);
}

.ompq-size input {
	width: 100%;
	border: 1px solid var(--ompq-border);
	border-radius: 8px;
	padding: 10px 8px;
	text-align: center;
	font: inherit;
}

.ompq-size input:focus {
	outline: none;
	border-color: var(--ompq-navy);
}

.ompq-total {
	margin: 12px 0 0;
	font-size: 0.95rem;
}

/* ---------- Dropzone ---------- */
.ompq-dropzone {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	border: 1.5px dashed var(--ompq-border);
	border-radius: var(--ompq-radius);
	background: var(--ompq-bg-soft);
	padding: 30px 20px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}

.ompq-dropzone:hover,
.ompq-dropzone.is-over {
	border-color: var(--ompq-navy);
	background: #fff;
}

.ompq-dropzone__icon {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #E2E8F0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	margin-bottom: 4px;
}

.ompq-filelist {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
	font-size: 0.9rem;
}

.ompq-filelist li {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	border-bottom: 1px solid var(--ompq-border);
}

.ompq-filelist__remove {
	background: none;
	border: none;
	color: #B91C1C;
	font-size: 1.1rem;
	cursor: pointer;
	padding: 0 6px;
}

/* ---------- Alert & success ---------- */
.ompq-alert {
	background: #FEF2F2;
	color: #B91C1C;
	border: 1px solid #FECACA;
	border-radius: 8px;
	padding: 12px 16px;
	margin: 18px 0 0;
	font-size: 0.9rem;
}

.ompq-success {
	text-align: center;
	padding: 56px 20px;
	font-size: 1.05rem;
}

.ompq-success__icon {
	width: 68px;
	height: 68px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: #16A34A;
	color: #fff;
	font-size: 1.8rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Honeypot */
.ompq-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
	.ompq-overlay {
		padding: 0;
	}

	.ompq-modal {
		border-radius: 0;
		min-height: 100vh;
	}

	.ompq-fields {
		grid-template-columns: 1fr;
	}

	.ompq-sizes {
		grid-template-columns: repeat(4, 1fr);
	}
}
