/**
 * Модалка с таблицей размеров.
 *
 * Палитра как в теме: #2b2b2a — текст, #efefef — фон блоков,
 * #7f7f7f — второстепенное.
 */

.size-chart[hidden] {
	display: none;
}

.size-chart {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.size-chart__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(43, 43, 42, 0.55);
}

.size-chart__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 620px;
	max-height: 90vh;
	border-radius: 16px;
	background: #fff;
	color: #2b2b2a;
	overflow: hidden;
}

.size-chart__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	border-bottom: 1px solid #e4e4e4;
}

.size-chart__title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
}

.size-chart__close {
	display: flex;
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: #2b2b2a;
	cursor: pointer;
}

.size-chart__close:hover {
	background: #efefef;
}

/* Своё кольцо фокуса: браузерное синее выбивается из палитры. */
.size-chart__close:focus-visible {
	outline: 2px solid #2b2b2a;
	outline-offset: 2px;
}

.size-chart__close:focus:not(:focus-visible) {
	outline: none;
}

.size-chart__close svg {
	width: 22px;
	height: 22px;
}

.size-chart__body {
	padding: 20px 24px 24px;
	overflow-y: auto;
}

/* Шесть размеров в строке на узком экране не помещаются — таблица
   прокручивается сама, а не ломает модалку. */
.size-chart__scroll {
	overflow-x: auto;
}

.size-chart__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	white-space: nowrap;
}

.size-chart__table th,
.size-chart__table td {
	padding: 10px 12px;
	border: 1px solid #e4e4e4;
	text-align: center;
}

.size-chart__table thead th {
	background: #efefef;
	font-weight: 600;
}

.size-chart__table tbody th {
	text-align: left;
	font-weight: 400;
	color: #7f7f7f;
}

.size-chart__ru {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	font-weight: 400;
	color: #7f7f7f;
}

.size-chart__note {
	margin: 16px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: #7f7f7f;
}

.size-chart__figure {
	margin: 20px 0 0;
}

.size-chart__image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px;
}

.size-chart__more {
	margin: 16px 0 0;
	font-size: 14px;
}

.size-chart__more a {
	color: #2b2b2a;
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media (max-width: 600px) {
	.size-chart {
		padding: 0;
		align-items: flex-end;
	}

	.size-chart__dialog {
		max-width: none;
		max-height: 92vh;
		border-radius: 16px 16px 0 0;
	}

	.size-chart__head {
		padding: 16px 18px;
	}

	.size-chart__body {
		padding: 16px 18px 24px;
	}

	.size-chart__table {
		font-size: 14px;
	}

	.size-chart__table th,
	.size-chart__table td {
		padding: 8px 6px;
	}
}
