/**
 * Image & Text Stroke Frontend Styles
 *
 * @package Templines_Image_Text_Stroke
 * @since 1.0.0
 */

/* ================================
   Main Container
   ================================ */
.tits-wrapper {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.tits-container {
	position: relative;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

/* ================================
   Filled Text (Back Layer - Z-index: 1)
   ================================ */
.tits-text-filled {
	position: absolute;
	z-index: 1;
	margin: 0;
	padding: 0;
	line-height: 1;
	white-space: nowrap;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	will-change: transform;
}

/* ================================
   Image (Middle Layer - Z-index: 2)
   ================================ */
.tits-image {
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	will-change: transform;
}

.tits-image img {
	display: block;
	height: auto;
	object-fit: contain;
}

/* ================================
   Outlined Text (Front Layer - Z-index: 3)
   ================================ */
.tits-text-outlined {
	position: absolute;
	z-index: 3;
	margin: 0;
	padding: 0;
	line-height: 1;
	white-space: nowrap;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	will-change: transform;
	/* Text stroke effect - using !important to prevent typography controls from overriding */
	color: transparent !important;
	-webkit-text-fill-color: transparent !important;
	-webkit-text-stroke-width: 2px;
	-webkit-text-stroke-color: #ffffff;
}

/* ================================
   Motion Effects Active States
   ================================ */
.tits-wrapper[data-image-parallax="true"] .tits-image,
.tits-wrapper[data-image-rotation="true"] .tits-image,
.tits-wrapper[data-text-motion="true"] .tits-text-filled,
.tits-wrapper[data-text-motion="true"] .tits-text-outlined {
	transition: transform 0.1s ease-out;
}

/* ================================
   Accessibility
   ================================ */
@media (prefers-reduced-motion: reduce) {
	.tits-image,
	.tits-text-filled,
	.tits-text-outlined {
		will-change: auto !important;
		transform: translate(-50%, -50%) !important;
		animation: none !important;
		transition: none !important;
	}
	
	.tits-image img {
		animation: none !important;
		transition: none !important;
	}
	
	/* Disable motion effects when reduced motion is preferred */
	.tits-wrapper[data-image-parallax="true"] .tits-image,
	.tits-wrapper[data-image-rotation="true"] .tits-image,
	.tits-wrapper[data-text-motion="true"] .tits-text-filled,
	.tits-wrapper[data-text-motion="true"] .tits-text-outlined {
		transition: none !important;
	}
}

/* ================================
   Responsive Adjustments
   ================================ */
@media (max-width: 1024px) {
	.tits-text-filled,
	.tits-text-outlined {
		white-space: normal;
		text-align: center;
		word-wrap: break-word;
	}
}

@media (max-width: 768px) {
	.tits-container {
		min-height: 50vh !important;
	}
}

@media (max-width: 480px) {
	.tits-container {
		min-height: 40vh !important;
	}
	
	.tits-text-outlined {
		-webkit-text-stroke-width: 1px;
	}
}
