/**
 * CTG opt-in modal — Deliverable 3.
 * Lightweight, brand-styled. No page-builder dependency.
 */

.ctg-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 1rem;
}

.ctg-modal-overlay.is-open {
	display: flex;
}

.ctg-modal {
	background: #ffffff;
	max-width: 540px;
	width: 100%;
	border-radius: 8px;
	padding: 2.5rem 2rem 2rem;
	position: relative;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	max-height: 90vh;
	overflow-y: auto;
	font-family: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
}

.ctg-modal__heading {
	color: #1b4332;
	font-family: "Outfit", -apple-system, sans-serif;
	font-weight: 700;
	font-size: 1.5rem;
	margin: 0 0 0.5rem;
	line-height: 1.25;
}

.ctg-modal__subheading {
	color: #4a5568;
	font-size: 1rem;
	margin: 0 0 1.5rem;
	line-height: 1.5;
}

.ctg-modal__close {
	position: absolute;
	top: 0.75rem;
	right: 0.9rem;
	background: none;
	border: none;
	font-size: 1.75rem;
	line-height: 1;
	color: #808080;
	cursor: pointer;
	padding: 0.25rem;
}

.ctg-modal__close:hover {
	color: #1b4332;
}

/* Style the CF7 submit button to brand gold, full width */
.ctg-modal .wpcf7-submit,
.ctg-modal input[type="submit"] {
	background: #E4C76C;
	color: #1b4332;
	font-family: "Outfit", sans-serif;
	font-weight: 600;
	border: none;
	border-radius: 4px;
	padding: 0.85rem 1.5rem;
	width: 100%;
	cursor: pointer;
	font-size: 1rem;
	margin-top: 0.5rem;
	transition: background 0.2s ease;
}

.ctg-modal .wpcf7-submit:hover,
.ctg-modal input[type="submit"]:hover {
	background: #d4b65a;
}

/* Brand the CF7 form fields */
.ctg-modal .wpcf7 input:not([type="submit"]),
.ctg-modal .wpcf7 select,
.ctg-modal .wpcf7 textarea {
	width: 100%;
	border: 1px solid #e2e8e4;
	border-radius: 4px;
	padding: 0.65rem 0.85rem;
	font-family: "Outfit", sans-serif;
	margin-bottom: 0.85rem;
	box-sizing: border-box;
}

.ctg-modal .wpcf7 input:focus,
.ctg-modal .wpcf7 select:focus,
.ctg-modal .wpcf7 textarea:focus {
	border-color: #52ab99;
	outline: none;
	box-shadow: 0 0 0 3px rgba(82, 171, 153, 0.15);
}

/* Placeholder note shown until a real CF7 form is inserted */
.ctg-modal__formslot:empty::before,
.ctg-modal__formslot .ctg-form-placeholder {
	display: block;
	border: 2px dashed #c9a227;
	border-radius: 6px;
	padding: 1.25rem;
	color: #808080;
	font-size: 0.9rem;
	text-align: center;
}
