/**
 * Styles for Elementor Search Overlay Widget
 */

.sf-search-trigger-container {
	width: 100%;
}

.sf-search-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.3s ease;
	box-sizing: border-box;
}

.sf-search-trigger-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.sf-search-trigger-icon svg {
	width: 1em;
	height: 1em;
	display: block;
}

/* Fullscreen Overlay Style */
.sf-search-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	clip-path: circle(0px at var(--reveal-x, 50%) var(--reveal-y, 50%));
	transition: clip-path 0.8s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.4s ease, visibility 0.8s;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	background-color: #0b192f;
}

.sf-search-overlay.is-active {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
	clip-path: circle(150vmax at var(--reveal-x, 50%) var(--reveal-y, 50%));
}

/* Ambient Glowing Background Blobs */
.sf-search-blobs {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	z-index: -1;
	pointer-events: none;
}

.sf-search-blob {
	position: absolute;
	border-radius: 50%;
	filter: blur(120px);
	opacity: 0.5;
	mix-blend-mode: screen;
	animation: sf-blob-float 25s infinite alternate ease-in-out;
}

.sf-search-blob.blob-1 {
	width: 450px;
	height: 450px;
	top: -5%;
	left: 15%;
	background-color: rgba(59, 130, 246, 0.15);
	animation-duration: 25s;
}

.sf-search-blob.blob-2 {
	width: 550px;
	height: 550px;
	bottom: -5%;
	right: 15%;
	background-color: rgba(168, 85, 247, 0.15);
	animation-duration: 35s;
	animation-delay: -7s;
}

@keyframes sf-blob-float {
	0% {
		transform: translate(0, 0) scale(1);
	}
	50% {
		transform: translate(80px, 100px) scale(1.25);
	}
	100% {
		transform: translate(-50px, -70px) scale(0.9);
	}
}

/* Glassmorphism Option */
.sf-search-overlay-glass {
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* Close Button */
.sf-search-close,
.sf-search-close:focus,
.sf-search-close:active,
.sf-search-close:hover {
	position: absolute;
	top: 40px;
	right: 40px;
	background: transparent !important;
	background-color: transparent !important;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	cursor: pointer;
	padding: 12px;
	z-index: 100;
	color: #a8b2d1;
	transition: all 0.3s ease;
}

.sf-search-close svg {
	display: block;
	width: 28px;
	height: 28px;
	transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.sf-search-close:hover {
	color: #64ffda;
}

.sf-search-close:hover svg {
	transform: rotate(90deg) scale(1.1);
}

/* Search Content Container */
.sf-search-container {
	width: 100%;
	max-width: 800px;
	padding: 40px 24px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	z-index: 10;
	opacity: 0;
	transform: translateY(40px);
	transition: opacity 0.5s ease 0.4s, transform 0.5s cubic-bezier(0.25, 1, 0.5, 1) 0.4s;
}

.sf-search-overlay.is-active .sf-search-container {
	opacity: 1;
	transform: translateY(0);
}

.sf-search-input-wrapper {
	position: relative;
	border-bottom: 2px solid rgba(255, 255, 255, 0.1);
	padding-bottom: 12px;
	display: flex;
	align-items: center;
	gap: 15px;
}

.sf-search-input,
.sf-search-input:focus,
.sf-search-input:active {
	flex-grow: 1;
	background-color: rgba(255, 255, 255, 0.05); /* User customizable via Elementor */
	border: 0 !important;
	border-style: none !important;
	outline: none !important;
	box-shadow: none !important;
	font-size: 48px; /* Increased font size */
	font-weight: 500;
	padding: 12px 20px; /* Supporting background padding */
	margin: 0;
	color: #ffffff;
	line-height: 1.2;
	transition: all 0.3s ease;
	-webkit-appearance: none;
	appearance: none;
}

.sf-search-input::placeholder {
	color: #8892b0;
	opacity: 0.8;
}

.sf-search-input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.sf-search-submit-btn,
.sf-search-submit-btn:focus,
.sf-search-submit-btn:active,
.sf-search-submit-btn:hover {
	background: transparent !important;
	background-color: transparent !important;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	cursor: pointer;
	padding: 10px;
	color: #a8b2d1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	flex-shrink: 0;
}

.sf-search-submit-btn:hover {
	color: #64ffda;
	transform: scale(1.1);
}

.sf-search-submit-btn svg {
	width: 32px;
	height: 32px;
	display: block;
}

.sf-search-input-line {
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 100%;
	height: 2px;
	background-color: #64ffda;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.sf-search-input:focus + .sf-search-input-line {
	transform: scaleX(1);
}

/* Toggle Bottom Border Line helper classes */
.sf-search-input-wrapper.no-bottom-line {
	border-bottom: none !important;
}

.sf-search-input-wrapper.no-bottom-line .sf-search-input-line {
	display: none !important;
}

/* Search Results Area */
.sf-search-results-wrapper {
	flex-grow: 1;
	overflow-y: auto;
	max-height: 55vh;
	padding-right: 12px;
	margin-right: -12px;
}

/* Custom Scrollbar */
.sf-search-results-wrapper::-webkit-scrollbar {
	width: 6px;
}

.sf-search-results-wrapper::-webkit-scrollbar-track {
	background: transparent;
}

.sf-search-results-wrapper::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.08);
	border-radius: 10px;
}

.sf-search-results-wrapper::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.18);
}

.sf-search-results-status {
	font-size: 13px;
	color: #8892b0;
	margin-bottom: 12px;
	font-style: italic;
	min-height: 18px;
	letter-spacing: 0.5px;
}

.sf-search-results {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

/* Autocomplete Suggestion Card style */
.sf-search-result-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 20px;
	border-radius: 6px;
	background-color: transparent;
	border: 1px solid transparent;
	text-decoration: none !important;
	color: #8892b0;
	transition: all 0.2s ease;
	transform: translateY(10px);
	opacity: 0;
	box-sizing: border-box;
}

.sf-search-result-item:hover,
.sf-search-result-item.is-selected {
	background-color: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.08);
	color: #64ffda;
	transform: translateX(4px);
}

.sf-search-result-content {
	flex-grow: 1;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 15px;
}

.sf-search-result-title {
	font-size: 20px;
	font-weight: 500;
	color: #ffffff;
	margin: 0;
	transition: color 0.2s ease;
	line-height: 1.2;
}

.sf-search-result-item:hover .sf-search-result-title,
.sf-search-result-item.is-selected .sf-search-result-title {
	color: #64ffda;
}

.sf-search-result-meta {
	font-size: 11px;
	color: #64ffda;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 600;
	flex-shrink: 0;
	opacity: 0.8;
}

/* Staggered entry animation helper classes */
.sf-search-result-item.animate-in {
	opacity: 1;
	transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.sf-search-input {
		font-size: 32px; /* Increased mobile size */
	}
	.sf-search-submit-btn svg {
		width: 24px;
		height: 24px;
	}
	.sf-search-close,
	.sf-search-close:focus,
	.sf-search-close:active,
	.sf-search-close:hover {
		top: 20px;
		right: 20px;
		padding: 8px;
	}
	.sf-search-close svg {
		width: 24px;
		height: 24px;
	}
	.sf-search-container {
		padding: 80px 16px 20px 16px;
		max-height: 95vh;
	}
	.sf-search-result-item {
		padding: 12px 16px;
	}
	.sf-search-result-title {
		font-size: 16px;
	}
	.sf-search-result-meta {
		font-size: 10px;
	}
}

body.sf-search-overlay-open {
	overflow: hidden;
}
