/* Turkiz Floating Buttons + Campaign Popup
   Based on upnext.dev/turkiz/2027 mockup
*/

.turkiz-floats,
.turkiz-popup {
	--turkiz-teal: #279A97;
	--turkiz-teal-dark: #1F7F7C;
	--turkiz-ink: #111;
	--turkiz-gray: #f1f1f1;
	--turkiz-radius: 22px;
	--turkiz-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Floating buttons (.floats) ---------- */
.turkiz-floats {
	position: fixed;
	bottom: 24px;
	left: 20px;
	z-index: 99990;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.turkiz-floats a {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--turkiz-teal);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
	transition: transform 0.25s, background-color 0.25s;
	text-decoration: none;
	line-height: 0;
}

.turkiz-floats a:hover,
.turkiz-floats a:focus-visible {
	transform: scale(1.06);
	background: var(--turkiz-teal-dark);
	color: #fff;
	outline: none;
}

.turkiz-i-flip {
	transform: scaleX(-1);
}

@media (max-width: 1199px) {
	.turkiz-floats {
		bottom: 18px;
		left: 16px;
		gap: 10px;
	}

	.turkiz-floats a {
		width: 50px;
		height: 50px;
	}
}

@media (max-width: 767px) {
	.turkiz-floats {
		bottom: 14px;
		left: 12px;
	}

	.turkiz-floats a {
		width: 46px;
		height: 46px;
	}
}

/* ---------- Campaign popup (#popup-image) ---------- */
.turkiz-popup[hidden] {
	display: none !important;
}

.turkiz-popup:not([hidden]) {
	display: block;
}

.turkiz-popup__overlay {
	position: fixed;
	inset: 0;
	z-index: 99998;
	background: rgba(0, 0, 0, 0.42);
	animation: turkiz-fade-in 0.3s ease both;
	cursor: pointer;
}

.turkiz-popup__modal {
	position: fixed;
	z-index: 99999;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(560px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	overflow: hidden;
	padding: 0;
	background: transparent;
	border-radius: var(--turkiz-radius);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
	animation: turkiz-pop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.turkiz-popup__link {
	display: block;
	line-height: 0;
}

.turkiz-popup__modal img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: var(--turkiz-radius);
}

/* Close (X) button.
   Selectors are intentionally more specific than the theme's global
   `button` / `[type=button]` rules (Hello Elementor paints them pink with
   padding/border), so the popup looks the same on every theme. */
.turkiz-popup .turkiz-popup__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	box-sizing: border-box;
	width: 40px;
	height: 40px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--turkiz-gray);
	color: var(--turkiz-ink);
	font-family: inherit;
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
	text-transform: none;
	text-align: center;
	white-space: nowrap;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 0.2s, color 0.2s;
}

/* Focus (the script focuses the button on open) must NOT look like hover,
   and must beat the theme's `[type=button]:focus` pink background. */
.turkiz-popup .turkiz-popup__close:focus:not(:hover) {
	background: var(--turkiz-gray);
	color: var(--turkiz-ink);
	border: 0;
	box-shadow: none;
	outline: none;
}

.turkiz-popup .turkiz-popup__close:focus-visible:not(:hover) {
	outline: 2px solid var(--turkiz-teal);
	outline-offset: 2px;
}

/* Hover: black background, white X */
.turkiz-popup .turkiz-popup__close:hover,
.turkiz-popup .turkiz-popup__close:active {
	background: var(--turkiz-ink);
	color: #fff;
	border: 0;
	box-shadow: none;
	outline: none;
}

body.turkiz-has-modal {
	overflow: hidden;
}

@keyframes turkiz-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes turkiz-pop {
	from {
		opacity: 0;
		transform: translate(-50%, -46%) scale(0.96);
	}
	to {
		opacity: 1;
		transform: translate(-50%, -50%);
	}
}

@media (max-width: 767px) {
	.turkiz-popup__modal {
		width: min(560px, calc(100vw - 24px));
		max-height: calc(100vh - 24px);
	}

	.turkiz-popup .turkiz-popup__close {
		top: 10px;
		right: 10px;
		width: 36px;
		height: 36px;
		font-size: 20px;
	}
}
