/**
 * پیام ناموجود / استعلام قیمت تماس با دفتر مرکزی
 *
 * سلکتورهای طولانی + !important عمدی: تم Storefront معمولاً .stock را پررنگ استایل می‌کند و زودتر لود شده.
 *
 * @package Arsin_Storefront_Customizer
 */

/* قیمت صفر/خالی — فیلتر PHP خالی می‌کند؛ این پشتیبان برای DOM باقی‌مانده است */
.single-product .summary .price:empty,
.single-product .woocommerce-variation-price:empty,
.single-product .woocommerce-variation-price .price:empty {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.single-product .woocommerce .asc-quote-contact-stock-wrapper,
.woocommerce.single-product .asc-quote-contact-stock-wrapper,
.woocommerce-page.single-product .woocommerce .asc-quote-contact-stock-wrapper,
.post-type-archive-product .woocommerce .asc-quote-contact-stock-wrapper,
.tax-product_cat .woocommerce .asc-quote-contact-stock-wrapper,
.tax-product_tag .woocommerce .asc-quote-contact-stock-wrapper,
.archive.woocommerce .asc-quote-contact-stock-wrapper,
.woocommerce .asc-quote-contact-stock-wrapper {
	box-sizing: border-box;
	background-color: #f9f9f9 !important;
}

.single-product .woocommerce .asc-quote-contact-stock-wrapper,
.woocommerce.single-product .asc-quote-contact-stock-wrapper {
	margin: 0.45rem 0 0.6rem ;
	padding: 0.45rem 0.55rem ;
}

/* جعبهٔ تم روی خود p.stock است؛ بیرونی را نشان می‌دهیم، داخل شفاف */
.woocommerce .asc-quote-contact-stock-wrapper p.stock.asc-quote-contact-stock {
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	box-shadow: none !important;
	background: transparent none !important;
	background-color: transparent !important;
	clear: none;
}

.asc-quote-contact-stock {
	line-height: 1.65;
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.single-product .asc-quote-contact-stock {
	gap: 0.35rem;
	line-height: 1.4;
}

.asc-quote-contact-text {
	display: block;
	font-weight: 500;
	margin: 0;
}

.asc-quote-contact-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
}

.asc-quote-contact-phone {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	word-break: break-all;
}

@keyframes asc-quote-phone-blink {
	0%,
	100% {
		opacity: 1;
		transform: scale(1);
	}

	50% {
		opacity: 0.25;
		transform: scale(1.12);
	}
}

.asc-quote-contact-tel-icon {
	display: inline-block;
	flex-shrink: 0;
	font-size: 1.125rem;
	line-height: 1;
	margin-inline-end: 0.5rem;
	animation: asc-quote-phone-blink 1.15s ease-in-out infinite;
}

.asc-quote-contact-tel-icon.asc-ms-icon {
	color: currentColor;
}

.asc-quote-contact-tel-icon:not(.asc-ms-icon) {
	width: 1.125rem;
	height: 1.125rem;
	background-color: currentColor;
	-webkit-mask-image: url("../icons/phone-call-outline.svg");
	mask-image: url("../icons/phone-call-outline.svg");
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

a.asc-quote-contact-tel.asc-quote-contact-visible-mobile-only,
a.asc-quote-contact-tel-desktop.asc-quote-contact-tel-desktop {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	min-height: 2.75rem;
	padding: 0.5rem 1.125rem;
	font-weight: 600;
	width: auto;
	max-width: 100%;
	text-decoration: none;
}

button.asc-quote-contact-related-btn {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	min-height: 2.75rem;
	padding: 0.5rem 1.125rem;
	font-weight: 600;
	font-family: var(--asc-font-family, inherit);
	font-size: inherit;
	width: auto;
	max-width: 100%;
	margin: 0;
	line-height: 1.3;
	cursor: pointer;
	white-space: normal;
	text-decoration: none;
}

a.asc-quote-contact-tel-desktop .asc-quote-contact-phone {
	font-weight: inherit;
	word-break: normal;
}

/* حذف آیکن / deco از ::before یا ::after (Storefront از ::before برای stock استفاده می‌کند) */
.woocommerce .asc-quote-contact-stock-wrapper .stock.asc-quote-contact-stock::before,
.woocommerce .asc-quote-contact-stock-wrapper .stock.asc-quote-contact-stock::after,
.woocommerce .asc-quote-contact-stock-wrapper p.stock.out-of-stock::before,
.woocommerce .asc-quote-contact-stock-wrapper p.stock.out-of-stock::after,
.woocommerce .asc-quote-contact-stock-wrapper p.stock.available::before,
.woocommerce .asc-quote-contact-stock-wrapper p.stock.available::after {
	content: none !important;
	display: none !important;
	width: 0 !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;
	box-shadow: none !important;
	border: none !important;
	position: static !important;
}

@media (max-width: 768px) {
	.single-product .woocommerce .asc-quote-contact-stock-wrapper,
	.woocommerce.single-product .asc-quote-contact-stock-wrapper {
		margin: unset !important;
		padding: unset !important;
		background: unset !important;
		background-color: unset !important;
	}

	.asc-quote-contact-visible-desktop-only {
		display: none !important;
	}

	.single-product a.asc-quote-contact-tel.asc-quote-contact-visible-mobile-only,
	.single-product button.asc-quote-contact-related-btn {
		flex: 1 1 0;
		min-width: 0;
		width: auto !important;
		font-size: 0.72rem;
		padding: 0.4rem 0.45rem;
		min-height: 2rem;
		line-height: 1.25;
	}

	.single-product .asc-quote-contact-actions {
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: stretch;
		gap: 0.35rem;
		width: 100%;
	}

	.single-product .asc-quote-contact-text {
		font-size: 0.72rem;
		line-height: 1.35;
	}
}

@media (min-width: 769px) {
	.asc-quote-contact-visible-mobile-only {
		display: none !important;
	}

	.asc-quote-contact-stock.asc-quote-contact-stock {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
	}

	.asc-quote-contact-text {
		flex: 1 1 100%;
	}

	.single-product .asc-quote-contact-text {
		font-size: 0.875rem;
		line-height: 1.4;
	}

	.single-product .asc-quote-contact-actions {
		flex: 1 1 100%;
		flex-wrap: nowrap;
		align-items: stretch;
		gap: 0.5rem 0.75rem;
	}

	.single-product a.asc-quote-contact-tel-desktop,
	.single-product button.asc-quote-contact-related-btn {
		flex: 1 1 0;
		min-width: 0;
		font-size: 0.85rem;
		padding: 0.45rem 0.85rem;
		min-height: 2.25rem;
		line-height: 1.3;
		white-space: nowrap;
	}

	.single-product .related.products.asc-related-products-carousel {
		scroll-margin-bottom: 24px;
	}
}
