/**
 * TCD Zoom Text — frontend styles
 * Version: 1.0.2
 * Author: The Company Dev — https://thecompanydev.com/
 */

/* Full-viewport host keeps Elementor classes without collapsing % padding. */
.tcd-zoom-style-host {
	position: fixed !important;
	inset: 0 !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: visible !important;
	border: 0 !important;
	background: transparent !important;
	pointer-events: none !important;
	z-index: 99999;
	transform: none !important;
	filter: none !important;
	perspective: none !important;
	contain: none !important;
}

.tcd-zoom-style-host > .tcd-zoom-portal {
	pointer-events: none;
}

.tcd-zoom-style-host > .tcd-zoom-portal.is-open {
	pointer-events: auto;
}

.tcd-zoom-grid {
	display: grid;
	width: 100%;
	box-sizing: border-box;
	position: relative;
}

.tcd-zoom-grid.tcd-equal-height .tcd-zoom-card,
.tcd-zoom-grid.tcd-equal-height .tcd-zoom-card__inner {
	height: 100%;
}

.tcd-zoom-card {
	position: relative;
	outline: none;
	cursor: pointer;
	transition-property: transform, box-shadow, z-index;
	transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
	z-index: 1;
}

.tcd-zoom-card__inner {
	position: relative;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	height: 100%;
	transition-property: background-color, border-color, box-shadow, transform;
	transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.tcd-zoom-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	line-height: 1;
}

.tcd-zoom-card__icon svg {
	display: block;
}

.tcd-zoom-card__title {
	margin: 0;
	line-height: 1.25;
	font-weight: 600;
}

.tcd-zoom-card__text {
	margin: 0;
	line-height: 1.65;
}

.tcd-zoom-grid.tcd-has-clamp .tcd-zoom-card:not(.is-zoomed) .tcd-zoom-card__text {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--tcd-line-clamp, 4);
	overflow: hidden;
}

.tcd-zoom-card__link {
	position: absolute;
	inset: 0;
	z-index: 2;
	text-indent: -9999px;
	overflow: hidden;
}

/* Scale mode */
.tcd-zoom-card.tcd-mode-scale.is-zoomed {
	z-index: 20;
}

.tcd-zoom-card.tcd-mode-scale.is-zoomed .tcd-zoom-card__inner {
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

/* Expand mode */
.tcd-zoom-card.tcd-mode-expand {
	overflow: hidden;
}

.tcd-zoom-card.tcd-mode-expand .tcd-zoom-card__text {
	transition: max-height 0.35s ease, opacity 0.35s ease;
}

.tcd-zoom-card.tcd-mode-expand.is-zoomed {
	z-index: 15;
}

.tcd-zoom-card.tcd-mode-expand.is-zoomed .tcd-zoom-card__inner {
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
	transform: translateY(-4px);
}

/* Popup portal */
.tcd-zoom-portal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition-property: opacity, visibility;
	transition-timing-function: ease;
}

.tcd-zoom-portal.is-open {
	pointer-events: auto;
	opacity: 1;
	visibility: visible;
}

.tcd-zoom-portal[hidden] {
	display: none !important;
}

.tcd-zoom-portal.is-open[hidden] {
	display: flex !important;
}

.tcd-zoom-overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 16, 32, 0.72);
	cursor: pointer;
}

.tcd-zoom-overlay[hidden] {
	display: none;
}

.tcd-zoom-popup {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 560px;
	max-height: min(90vh, 900px);
	overflow: auto;
	box-sizing: border-box;
	padding: 48px 44px;
	background: #1a2744;
	color: #d8dee8;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
	transform: translateY(16px) scale(0.96);
	opacity: 0;
	transition-property: transform, opacity;
	transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.tcd-zoom-portal.is-open .tcd-zoom-popup {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.tcd-zoom-popup__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.08);
	color: #c5cedd;
	font-size: 25px;
	font-weight: 300;
	line-height: 1;
	cursor: pointer;
	pointer-events: auto;
	-webkit-appearance: none;
	appearance: none;
}

.tcd-zoom-popup__close span {
	display: block;
	line-height: 1;
	pointer-events: none;
}

.tcd-zoom-popup__close:hover,
.tcd-zoom-popup__close:focus {
	color: #fff;
	outline: none;
}

.tcd-zoom-popup__content .tcd-zoom-card__title {
	margin-bottom: 18px;
	color: #8fa4c0;
}

.tcd-zoom-popup__content .tcd-zoom-card__text {
	-webkit-line-clamp: unset !important;
	display: block !important;
	overflow: visible !important;
	color: #d8dee8;
}

.tcd-zoom-popup__content .tcd-zoom-card__icon {
	margin-bottom: 16px;
	color: #a8b4c8;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* Focus visibility */
.tcd-zoom-card:focus-visible .tcd-zoom-card__inner {
	outline: 2px solid rgba(143, 164, 192, 0.9);
	outline-offset: 2px;
}

body.tcd-zoom-open {
	overflow: hidden;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
	.tcd-zoom-card,
	.tcd-zoom-card__inner,
	.tcd-zoom-overlay,
	.tcd-zoom-popup,
	.tcd-zoom-portal {
		transition: none !important;
	}
}
