/**
 * تاپ‌بار و بلوک استعلام قیمت
 */

:root {
	--kowsh-topbar-h: 46px;
}

body {
	padding-top: var(--kowsh-topbar-h);
}

.kowsh-header {
	top: var(--kowsh-topbar-h);
}

.kowsh-topbar {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	z-index: 10050;
	width: 100%;
	padding-right: env(safe-area-inset-right, 0);
	padding-left: env(safe-area-inset-left, 0);
	overflow: hidden;
	background: var(--kowsh-color-cream, #fff1e2);
	color: var(--kowsh-color-barberry, #9e0b0f);
	box-shadow: 0 1px 0 rgba(158, 11, 15, 0.12);
	box-sizing: border-box;
}

body.admin-bar .kowsh-topbar {
	top: 32px;
}

body.admin-bar .kowsh-header {
	top: calc(var(--kowsh-topbar-h) + 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar .kowsh-topbar {
		top: 46px;
	}

	body.admin-bar .kowsh-header {
		top: calc(var(--kowsh-topbar-h) + 46px);
	}
}

.kowsh-topbar__inner {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: 10px 14px;
	width: 100%;
	max-width: 1340px;
	min-width: 0;
	margin: 0 auto;
	padding: 8px 16px;
	box-sizing: border-box;
}

.kowsh-topbar__mark {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(158, 11, 15, 0.1);
	color: #9e0b0f;
}

.kowsh-topbar__mark svg {
	width: 15px;
	height: 15px;
}

.kowsh-topbar__pulse {
	position: absolute;
	inset: -3px;
	border-radius: 50%;
	border: 1px solid rgba(158, 11, 15, 0.28);
	animation: kowsh-topbar-pulse 2.2s ease-out infinite;
}

.kowsh-topbar__text {
	margin: 0;
	min-width: 0;
	flex: 1 1 auto;
	max-width: 42rem;
	color: #9e0b0f;
	font-size: 0.86rem;
	font-weight: 700;
	line-height: 1.55;
	text-align: center;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.kowsh-topbar__text-short {
	display: none;
}

.kowsh-topbar__phone {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-height: 30px;
	padding: 0 12px;
	border: 1px solid rgba(158, 11, 15, 0.22);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.55);
	color: #9e0b0f !important;
	font-size: 0.86rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	white-space: nowrap;
	text-decoration: none !important;
}

.kowsh-topbar__phone:hover,
.kowsh-topbar__phone:focus-visible {
	background: #9e0b0f;
	border-color: #9e0b0f;
	color: #fff1e2 !important;
}

.kowsh-inquiry {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	margin: 10px 0 16px;
	padding: 12px 14px;
	border: 1px solid rgba(158, 11, 15, 0.14);
	border-radius: 12px;
	background: #fff1e2;
	color: #9e0b0f !important;
	text-decoration: none !important;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.kowsh-inquiry:hover,
.kowsh-inquiry:focus-visible {
	color: #9e0b0f !important;
	border-color: rgba(158, 11, 15, 0.32);
	background: #ffe8d1;
}

.kowsh-inquiry__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(158, 11, 15, 0.1);
	color: #9e0b0f;
}

.kowsh-inquiry__icon svg {
	width: 18px;
	height: 18px;
}

.kowsh-inquiry__copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	flex: 1 1 auto;
}

.kowsh-inquiry__copy strong {
	font-size: 0.9rem;
	font-weight: 800;
	color: #9e0b0f;
}

.kowsh-inquiry__copy em {
	font-size: 0.75rem;
	font-style: normal;
	font-weight: 600;
	line-height: 1.6;
	color: #9e0b0f;
	opacity: 0.78;
}

.kowsh-inquiry__num {
	flex: 0 0 auto;
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.62);
	color: #9e0b0f;
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

@keyframes kowsh-topbar-pulse {
	0% {
		transform: scale(0.92);
		opacity: 0.7;
	}
	70% {
		transform: scale(1.25);
		opacity: 0;
	}
	100% {
		transform: scale(1.25);
		opacity: 0;
	}
}

@media (max-width: 991px) {
	:root {
		--kowsh-topbar-h: 72px;
	}

	.kowsh-topbar__inner {
		flex-wrap: wrap;
		justify-content: center;
		gap: 6px 10px;
		padding: 8px 16px;
	}

	.kowsh-topbar__mark {
		display: none;
	}

	.kowsh-topbar__text {
		flex: 1 1 100%;
		width: 100%;
		max-width: none;
		font-size: 0.8rem;
	}

	.kowsh-topbar__phone {
		min-height: 32px;
		padding: 0 12px;
		font-size: 0.8rem;
	}

	.kowsh-inquiry {
		flex-wrap: wrap;
		gap: 10px;
		padding: 12px;
	}

	.kowsh-inquiry__icon {
		width: 36px;
		height: 36px;
		flex-basis: 36px;
	}

	.kowsh-inquiry__copy {
		flex: 1 1 calc(100% - 50px);
	}

	.kowsh-inquiry__num {
		width: 100%;
		text-align: center;
	}
}

@media (max-width: 640px) {
	:root {
		--kowsh-topbar-h: 48px;
	}

	.kowsh-topbar__inner {
		flex-wrap: nowrap;
		justify-content: space-between;
		gap: 8px;
		padding: 7px 12px;
	}

	.kowsh-topbar__text {
		flex: 1 1 auto;
		font-size: 0.78rem;
		line-height: 1.4;
		text-align: right;
	}

	.kowsh-topbar__text-full {
		display: none;
	}

	.kowsh-topbar__text-short {
		display: inline;
	}

	.kowsh-topbar__phone {
		min-height: 34px;
		padding: 0 12px;
		font-size: 0.78rem;
	}
}

@media (max-width: 360px) {
	.kowsh-topbar__inner {
		padding: 6px 10px;
		gap: 6px;
	}

	.kowsh-topbar__text {
		font-size: 0.72rem;
	}

	.kowsh-topbar__phone {
		min-height: 32px;
		padding: 0 10px;
		font-size: 0.74rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kowsh-topbar__pulse {
		animation: none;
	}
}
