.yaghoot-search-wrapper{
	--yaghoot-search-speed: 0.45s;
	position:relative;
	display:inline-block;
}

/* ریست دفاعی مشابه سایر المان‌های یاقوت */
.elementor-widget-yaghoot-mobile-search,
.elementor-widget-yaghoot-mobile-search .elementor-widget-container{
	background:transparent !important;
	box-shadow:none !important;
	border:none !important;
	padding:0 !important;
}

.yaghoot-search-trigger{
	display:inline-flex !important;
	align-items:center;
	justify-content:center;
	background:none;
	border:none;
	padding:4px;
	cursor:pointer;
	line-height:0;
}
.yaghoot-search-trigger svg{
	width:24px;
	height:24px;
	stroke:#414245;
	transition:stroke .2s ease, transform .2s ease;
}
.yaghoot-search-trigger:hover svg{ transform:scale(1.06); }
.yaghoot-search-trigger.is-active svg{ transform:scale(0.94); }

/* ---------- پنل ثابت بالای صفحه (حالت پیش‌فرض موبایل) ---------- */
.yaghoot-search-panel{
	position:fixed;
	top:0;
	left:0;
	right:0;
	z-index:100000;
	background:#ffffff;
	box-shadow:0 8px 30px rgba(0,0,0,.12);
	transform:translateY(-110%);
	opacity:0;
	visibility:hidden;
	transition:transform var(--yaghoot-search-speed) cubic-bezier(.16,.84,.32,1),
				opacity var(--yaghoot-search-speed) ease,
				visibility 0s linear var(--yaghoot-search-speed);
	padding:16px;
	direction:rtl;
}
.yaghoot-search-panel.is-open{
	transform:translateY(0);
	opacity:1;
	visibility:visible;
	transition:transform var(--yaghoot-search-speed) cubic-bezier(.16,.84,.32,1),
				opacity var(--yaghoot-search-speed) ease;
}

/* ---------- حالت دوم: درست زیر آیکون (نه کل صفحه) ---------- */
.yaghoot-search-wrapper[data-panel-position="absolute"] .yaghoot-search-panel{
	position:absolute;
	top:calc(100% + 8px);
	left:auto;
	right:0;
	width:min(320px, 92vw);
	border-radius:14px;
	transform:translateY(-12px);
}
.yaghoot-search-wrapper[data-panel-position="absolute"] .yaghoot-search-panel.is-open{
	transform:translateY(0);
}

.yaghoot-search-form{
	display:flex;
	align-items:center;
	gap:10px;
	max-width:680px;
	margin:0 auto;
	border-bottom:2px solid #e4e4e7;
	padding-bottom:6px;
	transition:border-color .2s ease;
}
.yaghoot-search-form-icon{
	display:inline-flex;
	align-items:center;
	color:#9a9a9f;
	flex-shrink:0;
}
.yaghoot-search-form-icon svg{ width:18px; height:18px; }

.yaghoot-search-input{
	flex:1;
	min-width:0;
	border:none;
	outline:none;
	background:none;
	font-size:15px;
	padding:8px 2px;
	color:#1d1d1f;
}
.yaghoot-search-input::placeholder{ color:#a8a8ad; }

.yaghoot-search-submit{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	background:none;
	border:none;
	cursor:pointer;
	padding:4px;
	flex-shrink:0;
}
.yaghoot-search-submit svg{ width:20px; height:20px; color:#414245; transition:color .2s ease; }
.yaghoot-search-submit:hover svg{ color:#f9d220; }

.yaghoot-search-close{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	background:none;
	border:none;
	cursor:pointer;
	padding:4px;
	color:#9a9a9f;
	flex-shrink:0;
	transition:color .2s ease, transform .2s ease;
}
.yaghoot-search-close svg{ width:18px; height:18px; }
.yaghoot-search-close:hover{ color:#1d1d1f; transform:rotate(90deg); }

@media (max-width:480px){
	.yaghoot-search-panel{ padding:14px 16px; }
	.yaghoot-search-input{ font-size:14px; }
}
