/* Custom CF7 Popup.
   Gradient colors come from --ccp-c1 / --ccp-c2, set per popup by the plugin. */

.ccp-popup-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.ccp-popup-overlay.active {
	display: flex;
}

.ccp-popup-box {
	position: relative;
	width: 100%;
	max-width: 480px;
	padding: 40px 30px;
	border-radius: 12px;
	color: #ffffff;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	background: linear-gradient(135deg, var(--ccp-c1, #DA9E2E), var(--ccp-c2, #014B92));
}

/* Hide the scrollbar (content can still scroll on very short screens) */
.ccp-popup-box {
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.ccp-popup-box::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.ccp-popup-inner {
	display: flex;
	flex-direction: column;
}

.ccp-popup-header {
	margin-bottom: 20px;
}

.ccp-popup-heading {
	margin: 0 0 10px;
	color: #ffffff;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
}

.ccp-popup-description {
	margin: 0;
	color: rgba(255, 255, 255, 0.9);
	font-size: 15px;
	line-height: 1.5;
}

.ccp-popup-close {
	position: absolute;
	top: 8px;
	right: 12px;
	font-size: 28px;
	line-height: 1;
	background: none;
	border: none;
	color: #ffffff;
	cursor: pointer;
	padding: 4px 8px;
	z-index: 3;
}

.ccp-popup-close:hover {
	opacity: 0.7;
}

/* Form fields */
.ccp-popup-form-wrap .wpcf7-form-control {
	border-radius: 6px;
	border: none;
	padding: 12px;
	width: 100%;
	margin-bottom: 14px;
	box-sizing: border-box;
	font-size: 15px;
}

.ccp-popup-form-wrap textarea.wpcf7-form-control {
	min-height: 90px;
	resize: vertical;
}

.ccp-popup-form-wrap input[type="submit"] {
	background: var(--ccp-c2, #014B92);
	color: #ffffff;
	border: none;
	padding: 12px 26px;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 600;
	font-size: 15px;
}

/* Use our own loader instead of CF7's tiny spinner */
.ccp-popup-form-wrap .wpcf7-spinner {
	display: none !important;
}

.ccp-popup-form-wrap .wpcf7-not-valid-tip {
	color: #fff3cd;
	font-size: 13px;
}

/* CF7's response box: hidden on success/validation (we show our own message
   and inline tips), but still visible for mail failure / spam so errors are never silent. */
.ccp-popup-form-wrap .wpcf7-response-output {
	margin: 10px 0 0;
	padding: 10px 12px;
	border: 1px solid #ffffff;
	border-radius: 6px;
	color: #ffffff;
	font-size: 14px;
}

.ccp-popup-form-wrap .wpcf7-form.sent .wpcf7-response-output,
.ccp-popup-form-wrap .wpcf7-form.invalid .wpcf7-response-output {
	display: none !important;
}

/* Success message */
.ccp-popup-success {
	display: none;
	margin-top: 15px;
	background: rgba(255, 255, 255, 0.15);
	border: 1px solid #ffffff;
	padding: 16px;
	border-radius: 6px;
	text-align: center;
	font-size: 15px;
}

.ccp-popup-success.active {
	display: block;
}

.ccp-popup-form-wrap.ccp-hidden {
	display: none;
}

/* Loader */
.ccp-popup-loader {
	display: none;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.35);
	align-items: center;
	justify-content: center;
	z-index: 2;
	border-radius: 12px;
}

.ccp-popup-loader.active {
	display: flex;
}

.ccp-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid rgba(255, 255, 255, 0.35);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: ccp-spin 0.8s linear infinite;
}

@keyframes ccp-spin {
	to {
		transform: rotate(360deg);
	}
}
