.ccp-enabled {
	cursor: pointer;
}

html.ccp-modal-open {
	overflow: hidden;
}

.ccp-modal-root {
	position: fixed;
	inset: 0;
	/* Below Elementor Pro popup (~99999999) so inquiry forms appear on top. */
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
}

/* Fallback when Elementor popup opens while our modal is still in DOM */
body.elementor-popup-modal-open .ccp-modal-root,
html.elementor-popup-modal-open .ccp-modal-root {
	z-index: 1 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.ccp-modal-root[hidden] {
	display: none !important;
}

.ccp-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 0;
}

.ccp-modal {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 48px);
	overflow: auto;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
	padding: 32px 28px 28px;
	box-sizing: border-box;
}

.ccp-modal-close,
.ccp-lightbox-close {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	box-sizing: border-box;
	cursor: pointer;
	border: none;
}

.ccp-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 10;
	width: 36px;
	height: 36px;
	background: #fff;
	color: #333;
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.ccp-modal-close:hover {
	background: #f5f5f5;
}

.ccp-close-icon {
	position: relative;
	display: block;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

.ccp-close-icon::before,
.ccp-close-icon::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 2px;
	margin-top: -1px;
	margin-left: -7px;
	background-color: currentColor;
	border-radius: 1px;
}

.ccp-close-icon::before {
	transform: rotate(45deg);
}

.ccp-close-icon::after {
	transform: rotate(-45deg);
}

.ccp-modal-title {
	margin: 0 0 16px;
	padding-right: 40px;
	font-size: 1.5rem;
	line-height: 1.3;
}

.ccp-modal-title[hidden] {
	display: none;
}

.ccp-modal-gallery-wrap {
	margin-bottom: 16px;
}

.ccp-modal-gallery-wrap[hidden] {
	display: none;
}

.ccp-modal-gallery {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
}

.ccp-gallery-item {
	display: block;
	width: 100%;
	padding: 0;
	border: none;
	background: none;
	cursor: pointer;
	border-radius: 6px;
	overflow: hidden;
	aspect-ratio: 1;
}

.ccp-gallery-item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.2s ease;
}

.ccp-gallery-item:hover img {
	transform: scale(1.05);
}

.ccp-modal-content {
	font-size: 1rem;
	line-height: 1.6;
	color: #444;
}

.ccp-modal-content[hidden] {
	display: none;
}

.ccp-modal-content p:first-child {
	margin-top: 0;
}

.ccp-modal-content p:last-child {
	margin-bottom: 0;
}

.ccp-modal-actions {
	margin-top: 20px;
}

.ccp-modal-actions[hidden] {
	display: none;
}

.ccp-modal-button {
	display: inline-block;
	padding: 12px 24px;
	background: #1a5c3e;
	color: #fff !important;
	text-decoration: none !important;
	border-radius: 6px;
	font-weight: 600;
	transition: background 0.2s ease;
}

.ccp-modal-button:hover {
	background: #144a32;
	color: #fff !important;
}

/* Lightbox */
.ccp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
	background: rgba(0, 0, 0, 0.9);
}

.ccp-lightbox[hidden] {
	display: none !important;
}

.ccp-lightbox-viewer {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: min(96vw, 1200px);
	max-height: 90vh;
}

.ccp-lightbox-stage {
	display: flex;
	align-items: center;
	justify-content: center;
}

.ccp-lightbox-image {
	display: block;
	max-width: min(96vw, 1200px);
	max-height: 90vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
}

.ccp-lightbox-prev,
.ccp-lightbox-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 4;
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.ccp-lightbox-prev {
	left: 10px;
}

.ccp-lightbox-next {
	right: 10px;
}

.ccp-lightbox-prev:hover,
.ccp-lightbox-next:hover {
	background: rgba(255, 255, 255, 0.3);
}

.ccp-lightbox-prev[hidden],
.ccp-lightbox-next[hidden] {
	display: none !important;
}

.ccp-lightbox-counter {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	padding: 6px 14px;
	border-radius: 20px;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	font-size: 14px;
	line-height: 1;
}

.ccp-lightbox-counter[hidden] {
	display: none !important;
}

.ccp-lightbox-close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 2;
	width: 44px;
	height: 44px;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	border-radius: 50%;
}

.ccp-lightbox-close:hover {
	background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 480px) {
	.ccp-modal-gallery {
		grid-template-columns: repeat(2, 1fr);
	}
}
