/* ============================================================
   Grownparts Quote Modal
   Quote modal + right-edge floating tab
   Brand: pink #CC3366 / ink #111A24 / body 18px
   ============================================================ */

/* ---------- 1. Overlay and container ---------- */
.gpqm-overlay {
	position: fixed;
	inset: 0;
	z-index: 999990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	box-sizing: border-box;
}
.gpqm-overlay[hidden] { display: none; }

.gpqm-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 14, 19, .62);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	opacity: 0;
	transition: opacity .22s ease;
}
.gpqm-overlay.on .gpqm-backdrop { opacity: 1; }

.gpqm-dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 720px;
	max-height: min(92vh, 980px);
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 24px 64px rgba(10, 14, 19, .34), 0 2px 8px rgba(10, 14, 19, .18);
	opacity: 0;
	transform: translateY(14px) scale(.985);
	transition: opacity .24s ease, transform .24s cubic-bezier(.2, .8, .3, 1);
	overflow: hidden;
}
.gpqm-overlay.on .gpqm-dialog { opacity: 1; transform: none; }

/* ---------- 2. Close button ---------- */
.gpqm-x {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	color: #fff;
	background: rgba(255, 255, 255, .14);
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 50%;
	cursor: pointer;
	transition: background .15s, transform .1s;
}
.gpqm-x:hover { background: rgba(255, 255, 255, .26); }
.gpqm-x:active { transform: scale(.94); }
.gpqm-x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- 3. Header (dark, brand-aligned) ---------- */
.gpqm-head {
	flex: 0 0 auto;
	padding: 26px 30px 22px;
	color: #fff;
	background: #111A24;
	background-image: linear-gradient(135deg, #111A24 0%, #16202C 58%, #1D2A38 100%);
	border-bottom: 3px solid #CC3366;
}
.gpqm-kicker {
	margin: 0 0 7px;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #CC3366;
}
.gpqm-title {
	margin: 0 0 9px;
	padding-right: 42px;
	font-size: clamp(20px, 2.4vw, 25px);
	line-height: 1.28;
	font-weight: 700;
	color: #fff;
	letter-spacing: -.005em;
}
.gpqm-sub {
	margin: 0;
	font-size: 15.5px;
	line-height: 1.65;
	color: #cbd5e1;
	max-width: 560px;
}
.gpqm-ctx {
	margin: 14px 0 0;
	padding: 9px 13px;
	font-size: 14.5px;
	line-height: 1.5;
	color: #dbeafe;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 4px;
}
.gpqm-ctx[hidden] { display: none; }
.gpqm-ctx b { color: #fff; font-weight: 600; }

/* ---------- 4. Form body (scrollable) ---------- */
.gpqm-body {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 24px 30px 8px;
	background: #fff;
}

/* Reuse the /contact/ page .gc-cf7-wrap look so both forms match exactly */
.gpqm-body .wpcf7 { margin: 0; }
.gpqm-body .gc-2col { display: block; }
.gpqm-body .gc-2col > p {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 18px;
	margin: 0 0 18px;
	align-items: start;
}
.gpqm-body .gc-2col > p > label { margin-bottom: 0; }
.gpqm-body .gc-2col br { display: none; }
.gpqm-body label {
	display: block;
	margin-bottom: 7px;
	font-size: 15px;
	font-weight: 600;
	color: #1f2937;
	letter-spacing: .01em;
}
.gpqm-body .req { color: #CC3366; margin-left: 3px; }
.gpqm-body input[type=text],
.gpqm-body input[type=email],
.gpqm-body input[type=tel],
.gpqm-body select,
.gpqm-body textarea {
	width: 100%;
	font-family: inherit;
	font-size: 17px;
	line-height: 1.5;
	color: #1f2937;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	padding: 10px 12px;
	transition: border-color .15s, box-shadow .15s;
}
.gpqm-body input:focus,
.gpqm-body select:focus,
.gpqm-body textarea:focus {
	outline: none;
	border-color: #CC3366;
	box-shadow: 0 0 0 3px rgba(204, 51, 102, .12);
}
.gpqm-body textarea { min-height: 104px; resize: vertical; }
.gpqm-body .wpcf7-form-control-wrap { display: block; }
.gpqm-body br { display: none; }
.gpqm-body .wpcf7-form > p { margin: 0 0 18px; }
.gpqm-body .wpcf7-form > p:last-of-type { margin-bottom: 0; }
.gpqm-body .wpcf7-not-valid-tip { margin-top: 6px; font-size: 14.5px; color: #dc2626; }
.gpqm-body .wpcf7-not-valid { border-color: #dc2626; background: #fef2f2; }
.gpqm-body input[type=submit] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 14px 26px;
	font-family: inherit;
	font-size: 18px;
	font-weight: 600;
	color: #fff;
	background: #CC3366;
	border: 0;
	border-radius: 4px;
	cursor: pointer;
	transition: background .15s;
}
.gpqm-body input[type=submit]:hover { background: #b82a58; }
.gpqm-body .wpcf7-response-output {
	margin: 18px 0 0 !important;
	padding: 14px 16px !important;
	border-radius: 4px !important;
	font-size: 16.5px;
	line-height: 1.65;
	border-left: 4px solid #64748b;
	background: #f1f5f9;
	color: #334155;
}
.gpqm-body .wpcf7-response-output.wpcf7-mail-sent-ok {
	border-left-color: #16a34a;
	background: #f0fdf4;
	color: #14532d;
	font-weight: 600;
}
.gpqm-body .wpcf7-response-output.wpcf7-validation-errors {
	border-left-color: #dc2626;
	background: #fef2f2;
	color: #7f1d1d;
}
.gpqm-body .wpcf7-spinner { margin: 0 0 0 12px; }
.gpqm-body .gc-consent {
	display: flex !important;
	gap: 10px;
	align-items: flex-start;
	font-weight: 400 !important;
	font-size: 15px !important;
	line-height: 1.6;
	color: #4b5563;
}
.gpqm-body .gc-consent input[type=checkbox] {
	margin-top: 3px;
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	accent-color: #CC3366;
}
.gpqm-body .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
/* Hidden fields (source URL / product) take no space */
.gpqm-body input[type=hidden] { display: none !important; }

/* ---------- 5. Footer ---------- */
.gpqm-foot {
	flex: 0 0 auto;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	align-items: center;
	justify-content: space-between;
	padding: 14px 30px 18px;
	font-size: 14.5px;
	color: #6b7280;
	background: #f8fafc;
	border-top: 1px solid #e5e7eb;
}
.gpqm-foot a { color: #CC3366; text-decoration: none; font-weight: 600; }
.gpqm-foot a:hover { text-decoration: underline; }

/* ---------- 6. Right-edge vertical floating tab ---------- */
.gpqm-tab {
	position: fixed;
	top: 50%;
	right: 0;
	z-index: 999980;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 15px 13px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .02em;
	color: #fff;
	background: #CC3366;
	border: 0;
	border-radius: 6px 0 0 6px;
	box-shadow: -2px 2px 12px rgba(10, 14, 19, .24);
	cursor: pointer;
	/* vertical text */
	writing-mode: vertical-rl;
	text-orientation: mixed;
	transition: background .15s, padding-right .15s;
}
.gpqm-tab:hover { background: #b82a58; padding-right: 17px; }
.gpqm-tab:focus-visible { outline: 2px solid #111A24; outline-offset: 2px; }
.gpqm-tab svg { transform: rotate(90deg); flex: 0 0 auto; }
.gpqm-tab span { writing-mode: vertical-rl; }

/* lock scroll while the modal is open */
html.gpqm-lock, body.gpqm-lock { overflow: hidden !important; }

/* ---------- 7. Responsive ---------- */
@media (max-width: 991px) {
	.gpqm-overlay { padding: 16px 12px; }
	.gpqm-dialog { max-height: 94vh; }
	.gpqm-head { padding: 22px 22px 18px; }
	.gpqm-body { padding: 20px 22px 6px; }
	.gpqm-foot { padding: 12px 22px 16px; }
	.gpqm-tab { font-size: 14px; padding: 13px 11px; }
}

@media (max-width: 640px) {
	.gpqm-overlay { padding: 10px; align-items: flex-end; }
	.gpqm-dialog {
		max-width: 100%;
		max-height: 90vh;
		border-radius: 8px 8px 6px 6px;
	}
	.gpqm-body .gc-2col > p { grid-template-columns: 1fr; gap: 0; }
	.gpqm-body .gc-2col > p > label { margin-bottom: 14px; }
	.gpqm-head { padding: 20px 18px 16px; }
	.gpqm-title { padding-right: 40px; }
	.gpqm-body { padding: 18px 18px 4px; }
	.gpqm-body input[type=text],
	.gpqm-body input[type=email],
	.gpqm-body input[type=tel],
	.gpqm-body select,
	.gpqm-body textarea { font-size: 16px; }
	.gpqm-foot { padding: 12px 18px 14px; font-size: 13.5px; }
	/* Mobile: bottom horizontal pill so it does not cover content */
	.gpqm-tab {
		top: auto;
		bottom: 0;
		left: 0;
		right: 0;
		transform: none;
		writing-mode: horizontal-tb;
		border-radius: 6px 6px 0 0;
		justify-content: center;
		padding: 11px 14px;
		box-shadow: 0 -2px 12px rgba(10, 14, 19, .22);
	}
	.gpqm-tab:hover { padding-right: 14px; }
	.gpqm-tab svg { transform: none; }
	.gpqm-tab span { writing-mode: horizontal-tb; }
}
