/**
 * «پیروی المان‌های ووکامرس از هویت بصری» › «جدول ویژگی‌های محصول» (Hafez_Woo_Identity).
 *
 * WooCommerce's product attributes table (product tab, Elementor and
 * JetWooBuilder «اطلاعات بیشتر» widgets) inside .hafez-pa, which carries the
 * --hafez-dp-* of «استایل عمومی صفحات اختصاصی» (light inline, dark from
 * Hafez_Dark_Pages). The selectors are one step above
 * woocommerce.css (.woocommerce table.shop_attributes …).
 */

.hafez-pa {
	--hafez-pa-line: color-mix(in srgb, var(--hafez-dp-box-border-color, #e6dfda) 75%, transparent);
	--hafez-pa-tint: color-mix(in srgb, var(--hafez-dp-primary-bg, #f15a24) 6%, var(--hafez-dp-box-bg, #ffffff));
	margin: 0 0 1.618em;
}

.hafez-pa table.shop_attributes.woocommerce-product-attributes {
	width: 100%;
	margin: 0;
	border: var(--hafez-dp-box-border-width, 1px) var(--hafez-dp-box-border-style, solid) var(--hafez-dp-box-border-color, #e6dfda);
	border-collapse: separate;
	border-spacing: 0;
	border-radius: var(--hafez-dp-radius-box, 14px);
	overflow: hidden;
	background: var(--hafez-dp-box-bg, #ffffff);
	color: var(--hafez-dp-label, #1c1917);
	font-size: 0.95em;
	line-height: 1.7;
}

.hafez-pa .shop_attributes.woocommerce-product-attributes tr > th,
.hafez-pa .shop_attributes.woocommerce-product-attributes tr > td,
.hafez-pa .shop_attributes.woocommerce-product-attributes tr:nth-child(2n) > th,
.hafez-pa .shop_attributes.woocommerce-product-attributes tr:nth-child(2n) > td {
	margin: 0;
	padding: 13px 18px;
	border: 0;
	border-bottom: 1px solid var(--hafez-pa-line);
	font-style: normal;
	line-height: 1.7;
	text-align: start;
	vertical-align: middle;
	transition: background-color 0.15s ease;
}

/* Label: the soft brand tint, a small dot in the brand colour, the help colour. */
.hafez-pa .shop_attributes.woocommerce-product-attributes tr > th,
.hafez-pa .shop_attributes.woocommerce-product-attributes tr:nth-child(2n) > th {
	width: 34%;
	background: var(--hafez-pa-tint);
	color: var(--hafez-dp-help, #6e6560);
	font-weight: 500;
	white-space: nowrap;
}

.hafez-pa .shop_attributes.woocommerce-product-attributes th::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-inline-end: 10px;
	border-radius: 50%;
	background: var(--hafez-dp-primary-bg, #f15a24);
	vertical-align: middle;
}

/* Value: the heading colour, not WooCommerce's italic. */
.hafez-pa .shop_attributes.woocommerce-product-attributes tr > td,
.hafez-pa .shop_attributes.woocommerce-product-attributes tr:nth-child(2n) > td {
	background: var(--hafez-dp-box-bg, #ffffff);
	color: var(--hafez-dp-label, #1c1917);
	font-weight: 600;
}

.hafez-pa .shop_attributes.woocommerce-product-attributes td p {
	margin: 0;
	padding: 0;
}

.hafez-pa .shop_attributes.woocommerce-product-attributes td a {
	color: var(--hafez-dp-primary-ink, var(--hafez-dp-primary-bg, #f15a24));
	text-decoration: none;
	border-bottom: 1px solid currentColor;
}

.hafez-pa .shop_attributes.woocommerce-product-attributes tr:last-child > th,
.hafez-pa .shop_attributes.woocommerce-product-attributes tr:last-child > td {
	border-bottom: 0;
}

@media (hover: hover) {
	.hafez-pa .shop_attributes.woocommerce-product-attributes tr:hover > th {
		background: color-mix(in srgb, var(--hafez-dp-primary-bg, #f15a24) 11%, var(--hafez-dp-box-bg, #ffffff));
	}

	.hafez-pa .shop_attributes.woocommerce-product-attributes tr:hover > td {
		background: color-mix(in srgb, var(--hafez-dp-primary-bg, #f15a24) 4%, var(--hafez-dp-box-bg, #ffffff));
	}
}

/* Phones: each label above its value. */
@media (max-width: 600px) {
	.hafez-pa .shop_attributes.woocommerce-product-attributes,
	.hafez-pa .shop_attributes.woocommerce-product-attributes tbody,
	.hafez-pa .shop_attributes.woocommerce-product-attributes tr {
		display: block;
		width: 100%;
	}

	.hafez-pa .shop_attributes.woocommerce-product-attributes tr {
		border-bottom: 1px solid var(--hafez-pa-line);
	}

	.hafez-pa .shop_attributes.woocommerce-product-attributes tr:last-child {
		border-bottom: 0;
	}

	.hafez-pa .shop_attributes.woocommerce-product-attributes tr > th,
	.hafez-pa .shop_attributes.woocommerce-product-attributes tr > td,
	.hafez-pa .shop_attributes.woocommerce-product-attributes tr:nth-child(2n) > th,
	.hafez-pa .shop_attributes.woocommerce-product-attributes tr:nth-child(2n) > td {
		display: block;
		width: auto;
		border-bottom: 0;
		white-space: normal;
	}

	.hafez-pa .shop_attributes.woocommerce-product-attributes tr > th,
	.hafez-pa .shop_attributes.woocommerce-product-attributes tr:nth-child(2n) > th {
		padding-bottom: 4px;
		font-size: 0.9em;
	}

	.hafez-pa .shop_attributes.woocommerce-product-attributes tr > td,
	.hafez-pa .shop_attributes.woocommerce-product-attributes tr:nth-child(2n) > td {
		padding-top: 4px;
		background: var(--hafez-pa-tint);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hafez-pa .shop_attributes.woocommerce-product-attributes tr > * {
		transition: none;
	}
}
