/* ---------------------------------------------------------------
 * Custom Properties
 * ------------------------------------------------------------- */

:root {
	--wpst-fe-border-color: #e0e0e0;
	--wpst-fe-bg-header: #f7f7f7;
	--wpst-fe-bg-stripe: #fafafa;
	--wpst-fe-bg-hover: #f0f0f0;
}

/* ---------------------------------------------------------------
 * Size Table — Frontend
 * ------------------------------------------------------------- */

.wpst-size-table-wrap {
	margin: 0;
	padding: 0;
}

.wpst-description {
	margin-bottom: 16px;
	font-size: 14px;
	line-height: 1.6;
}

.wpst-size-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 20px;
	font-size: 14px;
}

.wpst-size-table thead th {
	background-color: var(--wpst-fe-bg-header);
	font-weight: 600;
	text-align: left;
	padding: 10px 12px;
	border: 1px solid var(--wpst-fe-border-color);
}

.wpst-size-table tbody td {
	padding: 8px 12px;
	border: 1px solid var(--wpst-fe-border-color);
	text-align: left;
}

.wpst-size-table tbody td:first-child {
	font-weight: 600;
	white-space: nowrap;
}

.wpst-size-table tbody tr:nth-child(even) {
	background-color: var(--wpst-fe-bg-stripe);
}

.wpst-size-table tbody tr:hover {
	background-color: var(--wpst-fe-bg-hover);
}

.wpst-measurement-image {
	margin-top: 20px;
}

.wpst-measurement-image img {
	max-width: 100%;
	height: auto;
	display: block;
}

.wpst-measurement-image--cropped {
	overflow: hidden;
}

/* ---------------------------------------------------------------
 * Layout: side by side
 * ------------------------------------------------------------- */

.wpst-layout-side_by_side {
	display: flex;
	gap: 24px;
	align-items: flex-start;
}

.wpst-layout-side_by_side .wpst-size-table {
	flex: 1;
	margin-bottom: 0;
}

.wpst-layout-side_by_side .wpst-measurement-image {
	flex: 0 0 300px;
	margin-top: 0;
}

/* ---------------------------------------------------------------
 * Layout: image above
 * ------------------------------------------------------------- */

.wpst-layout-image_above .wpst-measurement-image {
	margin-top: 0;
	margin-bottom: 20px;
}

.wpst-layout-image_above .wpst-size-table {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------- */

@media (max-width: 600px) {
	.wpst-size-table {
		font-size: 12px;
	}

	.wpst-size-table thead th,
	.wpst-size-table tbody td {
		padding: 6px 8px;
	}

	.wpst-layout-side_by_side {
		flex-direction: column;
	}

	.wpst-layout-side_by_side .wpst-measurement-image {
		flex: none;
	}
}
