/**
 * BRK Product Coatings — Frontend Styles
 */

/* ===== Страница товара ===== */

.brk-coating-selector {
    margin-top: 25px;
}

.brk-coating-selector__label {
	font-size: 20px;
	color: #333;
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.brk-coating-selector__selected {
	font-weight: 400;
	color: #666;
}

.brk-coating-selector__swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.brk-coating-swatch {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid #ddd;
	cursor: pointer;
	transition: border-color 0.2s ease, transform 0.2s ease;
	padding: 0;
	position: relative;
	outline: none;
}

.brk-coating-swatch:hover {
	border-color: #999;
	transform: scale(1.08);
}

.brk-coating-swatch--active {
	border-color: #000;
	border-width: 3px;
}

/* Tooltip */
.brk-coating-swatch::before {
	content: attr(title);
	position: absolute;
	bottom: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%);
	background: #333;
	color: #fff;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.brk-coating-swatch:hover::before {
	opacity: 1;
}

/* ===== Каталог товаров ===== */

.brk-coating-catalog {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 6px;
	justify-content: center;
}

.brk-coating-catalog__item {
	display: inline-block;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 1px solid #ddd;
	position: relative;
}

/* Tooltip каталога */
.brk-coating-catalog__item::before {
	content: attr(title);
	position: absolute;
	bottom: calc(100% + 4px);
	left: 50%;
	transform: translateX(-50%);
	background: #333;
	color: #fff;
	padding: 3px 6px;
	border-radius: 3px;
	font-size: 11px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	z-index: 10;
}

.brk-coating-catalog__item:hover::before {
	opacity: 1;
}

/* ===== Адаптивность ===== */

@media screen and (max-width: 768px) {
	.brk-coating-selector {
        display: flex;
        align-items: center;
        flex-direction: column;
	}

	.brk-coating-selector__label {
		font-size: 20px;
	}

	.brk-coating-catalog__item {
		width: 20px;
		height: 20px;
	}
}

@media screen and (max-width: 480px) {

	.brk-coating-selector__swatches {
		gap: 8px;
	}
}
