/* ==========================================================================
   PriceVeil front-end: hidden-price label, quote button, request form.
   Theme-friendly: inherits the theme's fonts/colors, adds refined structure.
   Accent is a CSS variable so merchants can retheme with one rule.
   ========================================================================== */

.qg-quote-wrap,
.qg-quote-form {
	--qg-accent: #5a3bd0;
	--qg-accent-2: #7b56ee;
	--qg-line: rgba(0, 0, 0, 0.12);
	--qg-radius: 10px;
}

.qg-price-hidden {
	display: inline-block;
	font-weight: 600;
	opacity: 0.85;
	letter-spacing: 0.01em;
}

.qg-quote-wrap {
	margin: 1.1em 0;
}

/* ---- trigger button ---- */

.qg-quote-toggle {
	cursor: pointer;
}

/* ---- modal ---- */

body.qg-modal-open {
	overflow: hidden;
}

.qg-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.qg-modal[hidden] {
	display: none;
}

.qg-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 14, 40, 0.55);
	animation: qg-fade 0.16s ease;
}

.qg-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	box-sizing: border-box;
	background: #fff;
	color: #1d2327;
	border-top: 4px solid var(--qg-accent);
	border-radius: 16px;
	box-shadow: 0 30px 80px -20px rgba(20, 14, 40, 0.5);
	padding: clamp(20px, 4vw, 34px);
	animation: qg-modal-in 0.2s ease;
}

@keyframes qg-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes qg-modal-in {
	from { opacity: 0; transform: translateY(10px) scale(0.98); }
	to { opacity: 1; transform: none; }
}

.qg-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	font-size: 26px;
	line-height: 1;
	color: #6a6480;
	cursor: pointer;
	border-radius: 8px;
}

.qg-modal__close:hover,
.qg-modal__close:focus {
	background: rgba(0, 0, 0, 0.06);
	color: #1d2327;
}

.qg-modal__title {
	margin: 0 0 2px;
	font-size: 1.4em;
	line-height: 1.2;
	padding-right: 2em;
}

.qg-modal__sub {
	margin: 0 0 18px;
	color: #6a6480;
	font-size: 0.95em;
}

/* ---- field grid ---- */

.qg-fieldgrid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 16px;
}

.qg-quote-form .qg-field {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
}

.qg-field--full {
	grid-column: 1 / -1;
}

.qg-quote-form label {
	font-weight: 600;
	font-size: 0.9em;
	letter-spacing: 0.01em;
}

.qg-quote-form input[type="text"],
.qg-quote-form input[type="email"],
.qg-quote-form input[type="tel"],
.qg-quote-form input[type="number"],
.qg-quote-form textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid var(--qg-line);
	border-radius: 8px;
	padding: 0.6em 0.8em;
	background: #fff;
	font-size: 1em;
	transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.qg-quote-form input:focus,
.qg-quote-form textarea:focus {
	outline: none;
	border-color: var(--qg-accent);
	box-shadow: 0 0 0 3px rgba(90, 59, 208, 0.15);
}

@media (max-width: 480px) {
	.qg-fieldgrid {
		grid-template-columns: 1fr;
	}
}

.qg-quote-form .qg-actions {
	margin: 1.1em 0 0;
}

.qg-quote-submit {
	width: 100%;
	padding: 0.85em 1.5em !important;
	border-radius: 8px !important;
	font-weight: 700 !important;
	letter-spacing: 0.02em;
	transition: transform 0.1s ease, filter 0.1s ease;
}

.qg-quote-submit:hover:not(:disabled) {
	transform: translateY(-1px);
	filter: brightness(1.05);
}

.qg-quote-submit:disabled {
	opacity: 0.6;
	cursor: wait;
}

/* ---- feedback ---- */

.qg-feedback {
	margin: 0.9em 0 0;
	font-weight: 600;
}

.qg-feedback:empty {
	display: none;
}

.qg-feedback.qg-feedback--error {
	color: #b32d2e;
	padding: 0.8em 1em;
	border-radius: 8px;
	background: rgba(179, 45, 46, 0.08);
	border: 1px solid rgba(179, 45, 46, 0.25);
}

.qg-feedback.qg-feedback--success {
	color: #00753e;
	padding: 1em 1.1em 1em 2.6em;
	border-radius: 8px;
	background: rgba(0, 117, 62, 0.07);
	border: 1px solid rgba(0, 117, 62, 0.25);
	position: relative;
}

.qg-feedback.qg-feedback--success::before {
	content: "\2713";
	position: absolute;
	left: 1em;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.15em;
	font-weight: 800;
}

/* ---- honeypot: off-screen for humans, present for bots ---- */

.qg-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.qg-modal__dialog,
	.qg-modal__backdrop {
		animation: none;
	}

	.qg-quote-submit,
	.qg-quote-form input,
	.qg-quote-form textarea {
		transition: none;
	}
}
