/**
 * TechByte Popups - front end styles.
 */

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

.tbp-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	background: rgba(20, 20, 20, 0.45);
	-webkit-backdrop-filter: blur(var(--tbp-blur, 6px));
	backdrop-filter: blur(var(--tbp-blur, 6px));
	opacity: 0;
	transition: opacity 0.28s ease;
	overflow-y: auto;
	overscroll-behavior: contain;
	box-sizing: border-box;
}

.tbp-overlay.is-visible {
	opacity: 1;
}

.tbp-overlay *,
.tbp-overlay *::before,
.tbp-overlay *::after {
	box-sizing: border-box;
}

.tbp-popup {
	position: relative;
	width: 100%;
	max-width: 520px;
	margin: auto;
	padding: 14px;
	border-radius: var(--tbp-radius, 20px);
	background: var(--tbp-bg, #c2114c);
	color: var(--tbp-text, #ffffff);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	text-align: center;
	transform: translateY(18px) scale(0.98);
	transition: transform 0.3s ease;
}

.tbp-overlay.is-visible .tbp-popup {
	transform: translateY(0) scale(1);
}

/* Close button */

.tbp-close {
	position: absolute;
	top: 24px;
	right: 24px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.5);
	color: #ffffff;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.tbp-close:hover,
.tbp-close:focus-visible {
	background: rgba(0, 0, 0, 0.72);
	transform: scale(1.06);
}

.tbp-close svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
}

/* Media */

.tbp-media {
	overflow: hidden;
	border-radius: max(0px, calc(var(--tbp-radius, 20px) - 8px));
	line-height: 0;
}

.tbp-media img,
.tbp-media .tbp-image {
	display: block;
	width: 100%;
	height: auto;
	max-height: 360px;
	object-fit: cover;
}

/* Content */

.tbp-content {
	padding: 30px 26px 32px;
}

.tbp-title {
	margin: 0 0 18px;
	padding: 0;
	color: inherit;
	font-size: clamp(32px, 7vw, 52px);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.01em;
	word-break: break-word;
}

.tbp-subtext {
	margin: 0;
	font-size: clamp(15px, 3.4vw, 20px);
	font-weight: 400;
	line-height: 1.3;
}

.tbp-subtext p {
	margin: 0 0 10px;
	color: inherit;
}

.tbp-subtext p:last-child {
	margin-bottom: 0;
}

.tbp-button {
	display: inline-block;
	max-width: 100%;
	margin-top: 26px;
	padding: 14px 32px;
	border-radius: var(--tbp-btn-radius, 999px);
	background: var(--tbp-btn-bg, #ffb400);
	color: var(--tbp-btn-text, #111111);
	font-size: clamp(15px, 2.2vw, 17px);
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.01em;
	text-align: center;
	text-decoration: none;
	box-shadow: none;
	transition: filter 0.2s ease, transform 0.2s ease;
}

.tbp-button:hover,
.tbp-button:focus-visible {
	color: var(--tbp-btn-text, #111111);
	text-decoration: none;
	filter: brightness(0.94);
	transform: translateY(-1px);
}

.tbp-overlay :focus-visible {
	outline: 3px solid rgba(255, 255, 255, 0.85);
	outline-offset: 3px;
}

/* Scroll lock on the page behind the popup */

body.tbp-popup-open {
	overflow: hidden;
}

/* Small screens */

@media (max-width: 480px) {
	.tbp-overlay {
		padding: 12px;
	}

	.tbp-popup {
		padding: 10px;
	}

	.tbp-content {
		padding: 22px 16px 24px;
	}

	.tbp-close {
		top: 18px;
		right: 18px;
		width: 38px;
		height: 38px;
	}

	.tbp-media img,
	.tbp-media .tbp-image {
		max-height: 230px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tbp-overlay,
	.tbp-popup,
	.tbp-close,
	.tbp-button {
		transition: none;
	}
}
