/* =========================================================
   Site Popup — Frontend Styles
   ========================================================= */

.cc-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.cc-popup-overlay[hidden] {
	display: none;
}

/* Animate the modal in when overlay is visible */
.cc-popup-overlay:not([hidden]) .cc-popup-modal {
	animation: ccPopupFadeIn 0.25s ease forwards;
}

@keyframes ccPopupFadeIn {
	from {
		opacity: 0;
		transform: translateY(-12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.cc-popup-modal {
	position: relative;
	display: flex;
	flex-direction: row;
	background: #fff;
	max-width: 800px;
	width: 100%;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
	overflow: hidden;
}

/* Close button */
.cc-popup-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 10;
	width: 32px;
	height: 32px;
	background: transparent;
	border: none;
	color: rgba(0, 0, 0, 0.45);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: color 0.15s ease;
}

.cc-popup-close:hover,
.cc-popup-close:focus {
	color: rgba(0, 0, 0, 0.75);
	outline: none;
}

/* Left image panel */
.cc-popup-image {
	flex: 0 0 45%;
	max-width: 45%;
	min-height: 280px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* Right content panel */
.cc-popup-content {
	flex: 1;
	padding: 57px 48px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	box-sizing: border-box;
}

.cc-popup-title {
	margin: 0 0 16px;
	font-size: 1.7em;
	line-height: 1.2;
}

.cc-popup-body {
	margin: 0 0 24px;
	line-height: 1.6;
}

/* CTA button — primary orange, matches theme button tokens */
.cc-popup-cta.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	padding: var(--spacing-xs, 8px) var(--spacing-lg, 32px);
	min-height: 48px;
	background-color: var(--color-orange-primary, #E55D25);
	color: var(--color-white, #fff);
	font-family: var(--font-primary, sans-serif);
	font-size: var(--text-body-base, 16px);
	font-weight: var(--font-weight-medium, 500);
	line-height: var(--line-height-snug, 1.3);
	text-decoration: none;
	border: none;
	border-radius: 0;
	cursor: pointer;
	transition: background-color 0.2s ease-in-out;
}

.cc-popup-cta.button:hover {
	background-color: #B74A1E;
	color: var(--color-white, #fff);
}

.cc-popup-cta.button:active {
	background-color: #9A3F19;
}

.cc-popup-cta.button:focus-visible {
	outline: 2px solid var(--color-blue-primary, #1B4F8A);
	outline-offset: 2px;
}

/* =========================================================
   Responsive — stack vertically on small screens
   ========================================================= */
@media (max-width: 600px) {
	.cc-popup-modal {
		flex-direction: column;
		max-height: 90vh;
		overflow-y: auto;
	}

	.cc-popup-image {
		flex: 0 0 auto;
		max-width: 100%;
		min-height: unset;
		aspect-ratio: 1;
	}

	.cc-popup-content {
		padding: 28px 24px;
	}
}
