/*
 * makerzoid-brand / attribute-descriptions
 * 1) Опис терміна під значенням у фільтрах Blocksy (span.ct-filter-description).
 * 2) Картки шорткода [wcadf_attributes] (раніше .wcadf-attribute-card* у плагіні WCADF).
 * Розміри й пропорції — з assets/css/frontend.css WCADF 1.0.0; кольори — токени.
 */

/* --- Фільтри Blocksy: опис після назви з переносом, лічильник праворуч (як у WCADF) --- */
.ct-filter-widget .ct-filter-item-inner > a:has(.ct-filter-description) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
}

.ct-filter-widget .ct-filter-description {
	margin: 0;
	font-size: 0.92em;
	line-height: 1.45;
	color: var(--mz-text);
	opacity: 0.78;
}

.ct-filter-widget .ct-filter-item-inner > a:has(.ct-filter-description) .ct-filter-count {
	margin-inline-start: auto;
}

/* --- Картки шорткода --- */
.mz-attr-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px 14px;
	align-items: stretch;
	width: 100%;
	margin: 0;
	white-space: normal;
	font: inherit;
	color: inherit;
}

/* Шорткод на джерелі стоїть у блоці «Preformatted» (Content Block): прибираємо вигляд <pre>. */
.wp-block-preformatted:has(> .mz-attr-cards),
pre:has(> .mz-attr-cards) {
	padding: 0;
	overflow: visible;
	border: 0;
	background: transparent;
	white-space: normal;
	font: inherit;
	color: inherit;
}

.mz-attr-cards__section-title {
	grid-column: 1 / -1;
	margin: 6px 0 -2px;
	font-size: 0.86rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.7;
}

.mz-attr-card {
	display: flex;
	align-items: center;
	gap: 10px;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	padding: 8px 12px;
	border: 1px solid var(--mz-border);
	border-radius: var(--mz-radius-btn);
	background: var(--mz-white);
}

.mz-attr-card__icon {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
}

.mz-attr-card__icon-image {
	display: block;
	width: auto;
	max-width: 24px;
	height: auto;
	max-height: 24px;
}

.mz-attr-card__icon-placeholder {
	display: none;
}

.mz-attr-card__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.mz-attr-card__attribute,
.mz-attr-card__title {
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.mz-attr-card__attribute {
	line-height: 1.15;
	opacity: 0.62;
}

.mz-attr-card__title {
	color: var(--mz-heading);
}

.mz-attr-card__description {
	font-size: 0.64rem;
	line-height: 1.3;
	color: var(--mz-text);
	opacity: 0.75;
	overflow-wrap: anywhere;
}

@media (max-width: 480px) {
	.mz-attr-cards {
		gap: 8px;
	}

	.mz-attr-card {
		gap: 7px;
		padding: 7px 8px;
	}

	.mz-attr-card__icon {
		width: 20px;
		height: 20px;
	}

	.mz-attr-card__icon-image {
		max-width: 20px;
		max-height: 20px;
	}

	.mz-attr-card__attribute {
		font-size: 0.62rem;
	}

	.mz-attr-card__description {
		font-size: 0.68rem;
		line-height: 1.25;
	}
}
