/**
 * Product size guide — single product page
 */

.jwt-psg {
	--jwt-psg-title: #222222;
	--jwt-psg-header-bg: #f7f7f7;
	--jwt-psg-header-text: #222222;
	--jwt-psg-body-text: #333333;
	--jwt-psg-size-bg: #fafafa;
	--jwt-psg-row-alt: #ffffff;
	--jwt-psg-table-bg: #ffffff;
	--jwt-psg-border: #e5e5e5;
	--jwt-psg-note: #666666;

	margin: 16px 0 8px;
	direction: rtl;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.jwt-psg *,
.jwt-psg *::before,
.jwt-psg *::after {
	box-sizing: border-box;
}

.jwt-psg__heading {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px;
}

.jwt-psg__icon {
	width: 28px;
	height: 28px;
	object-fit: contain;
	flex: 0 0 auto;
	display: block;
}

.jwt-psg__title {
	font-size: 15px;
	font-weight: 800;
	margin: 0;
	color: var(--jwt-psg-title);
	line-height: 1.5;
}

.jwt-psg__unit {
	font-weight: 500;
	color: var(--jwt-psg-note);
	font-size: 13px;
}

.jwt-psg__table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--jwt-psg-border);
	border-radius: 10px;
	background: var(--jwt-psg-table-bg);
	max-width: 100%;
}

.jwt-psg__table {
	width: 100%;
	min-width: 280px;
	border-collapse: collapse;
	margin: 0;
	font-size: 13px;
	color: var(--jwt-psg-body-text);
	background: var(--jwt-psg-table-bg);
}

.jwt-psg__table th,
.jwt-psg__table td {
	padding: 10px 12px;
	text-align: center;
	border-bottom: 1px solid var(--jwt-psg-border);
	white-space: nowrap;
	vertical-align: middle;
}

.jwt-psg__table thead th {
	background: var(--jwt-psg-header-bg);
	font-weight: 700;
	color: var(--jwt-psg-header-text);
}

.jwt-psg__table tbody th,
.jwt-psg__table .jwt-psg__col-size {
	font-weight: 700;
	background: var(--jwt-psg-size-bg);
	text-align: center;
	color: var(--jwt-psg-body-text);
}

/* Sticky first column helps when the table scrolls horizontally on narrow screens */
.jwt-psg__table thead th.jwt-psg__col-size,
.jwt-psg__table tbody th.jwt-psg__col-size {
	position: sticky;
	right: 0;
	z-index: 2;
	box-shadow: -4px 0 8px rgba(0, 0, 0, 0.04);
}

.jwt-psg__table thead th.jwt-psg__col-size {
	z-index: 3;
}

.jwt-psg__table tbody tr:nth-child(even) td {
	background: var(--jwt-psg-row-alt);
}

.jwt-psg__table tbody tr:nth-child(even) th {
	background: var(--jwt-psg-size-bg);
}

.jwt-psg__table tbody tr:last-child th,
.jwt-psg__table tbody tr:last-child td {
	border-bottom: 0;
}

.jwt-psg__note {
	margin: 8px 0 0;
	font-size: 12px;
	color: var(--jwt-psg-note);
	line-height: 1.7;
}

@media (max-width: 767px) {
	.jwt-psg {
		margin: 12px 0 6px;
	}

	.jwt-psg__heading {
		gap: 8px;
		margin-bottom: 8px;
	}

	.jwt-psg__icon {
		width: 24px;
		height: 24px;
	}

	.jwt-psg__title {
		font-size: 14px;
	}

	.jwt-psg__unit {
		font-size: 12px;
	}

	.jwt-psg__table {
		font-size: 12px;
		min-width: 420px;
	}

	.jwt-psg__table th,
	.jwt-psg__table td {
		padding: 8px 10px;
		min-height: 40px;
	}

	.jwt-psg__note {
		font-size: 11.5px;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.jwt-psg__table {
		font-size: 12.5px;
	}

	.jwt-psg__table th,
	.jwt-psg__table td {
		padding: 9px 10px;
	}
}
