/* ==========================================================================
   Corner Popup
   ========================================================================== */

/* Overlay — mobile lightbox backdrop */
.corner-popup-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	z-index: 9998;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.corner-popup-overlay.is-visible {
	opacity: 1;
	pointer-events: auto;
}

/* Popup base */
.corner-popup {
	position: fixed;
	z-index: 9999;
	background-color: #fff;
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
	overflow: hidden;
	display: flex;
	flex-direction: column;

	/* Desktop defaults */
	bottom: 24px;
	right: 24px;
	width: 400px;
	max-width: calc(100vw - 48px);
	border-radius: 0;

	/* Hidden below viewport */
	transform: translateY(calc(100% + 32px));
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.corner-popup.is-visible {
	transform: translateY(0);
}

/* Slide back down on close */
.corner-popup.is-closing {
	transform: translateY(calc(100% + 32px));
}

/* Close button */
.corner-popup__close {
	position: absolute;
	top: 8px;
	right: 10px;
	background: none;
	border: none;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	color: #000;
	padding: 4px 6px;
	z-index: 1;
	opacity: 0.7;
	transition: opacity 0.2s ease;
}

.corner-popup__close:hover {
	opacity: 1;
	color: #000;
}

/* Content area */
.corner-popup__content {
	padding: 28px 24px 16px;
	flex: 1;
}

.corner-popup__content > *:first-child {
	margin-top: 0;
}

.corner-popup__content > *:last-child {
	margin-bottom: 0;
}

/* Button */
.corner-popup__button.button.button-orange-arrows {
	font-size: 17px;
    padding: 18px 26px 15px 21px;
    position: relative;
	border-right: 0;
	outline: 0;
	color: #fff;
	border-radius: 0;
    background-color: #EE6148;
	border: 2px solid #EE6148;
	display: block;
    font-family: "Overpass", sans-serif;
	font-weight: 700;
    line-height: 1.1;
    margin: 0 auto 20px;
	text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: .3s all;
    white-space: break-spaces;
}

.corner-popup__button.button.button-orange-arrows:before {
	background: linear-gradient(180deg, #EE6148 0%, #EE6148 27%, rgba(69, 108, 121, 0) 27%, rgba(69, 108, 121, 0) 77%, #EE6148 77%, #EE6148 100%);
	bottom: 0;
    content: "";
    display: block;
    position: absolute;
    right: 0;
    top: 0;
	width: 3px;
	transition: .4s all;
}
.corner-popup__button.button.button-orange-arrows:after{
	background: url(../svg/wht-arrows-2.svg);
	content: "";
    display: block;
    height: 0.9205882353em;
    margin-top: -0.4602941176em;
    position: absolute;
    right: -0.9123529412em;
    top: 50%;
    transition: .3s all;
    width: 1.8247058824em;
}
.corner-popup__button.button.button-orange-arrows:hover{
	box-shadow: none;
}
.corner-popup__button.button.button-orange-arrows:hover:after{
	right: -1.6482352941em;
}

/* ==========================================================================
   Mobile — lightbox mode (≤ 767px)
   ========================================================================== */

@media (max-width: 767px) {
	.corner-popup {
		/* Centre vertically with fixed side margins */
		bottom: auto;
		right: 20px;
		left: 20px;
		top: 50%;
		width: auto;
		max-width: 85%;
		min-width: 0 !important; /* override inline style set by ACF */
		transform: translateY(-50%) scale(0.92);
		opacity: 0;
		transition:
			transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
			opacity 0.35s ease;
		pointer-events: none;
	}

	.corner-popup.is-visible {
		transform: translateY(-50%) scale(1);
		opacity: 1;
		pointer-events: auto;
	}

	.corner-popup.is-closing {
		transform: translateY(-50%) scale(0.92);
		opacity: 0;
		pointer-events: none;
	}

	/* Pin close button to top-right regardless of theme overrides */
	#corner-popup .corner-popup__close {
		position: absolute !important;
		top: 8px !important;
		right: 10px !important;
		left: auto !important;
		transform: none !important;
		margin: 0 !important;
		width:auto !important;
	}

	/* Button: shrink to content width and centre */
	.corner-popup__button.button.button-orange-arrows {
		display: block;
		width: fit-content;
		max-width: 75%;
		margin-left: auto;
		margin-right: auto;
	}

	.corner-popup-overlay {
		display: block;
	}
}
