/* Label row: Size on the right, icon on the far left (RTL). */
.variations .bt-variation-label,
.variations td.label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.35rem 0.5rem;
	width: 100%;
}

.variations .bt-variation-label label,
.variations td.label label {
	margin: 0;
}

/* Trigger button — ruler icon */
.athba-size-guide-trigger,
.athba-size-guide-row .athba-size-guide-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	margin: 0;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 50%;
	background: transparent;
	color: var(--global-palette3, #333);
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
	flex-shrink: 0;
}

.athba-size-guide-trigger:hover,
.athba-size-guide-trigger:focus {
	color: var(--global-palette1, #8b7355);
	border-color: var(--global-palette1, #8b7355);
	background: rgba(139, 115, 85, 0.08);
	outline: none;
}

.athba-size-guide-trigger:focus-visible {
	box-shadow: 0 0 0 2px rgba(139, 115, 85, 0.35);
}

.athba-size-guide-icon {
	display: block;
}

.athba-size-guide-row {
	display: flex;
	justify-content: flex-start;
	width: 100%;
	margin-top: 0.25rem;
}

/* Modal */
.athba-size-guide-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.athba-size-guide-modal.is-open {
	display: block;
}

.athba-size-guide-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	animation: athba-sg-fade-in 0.25s ease;
}

.athba-size-guide-dialog {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100%;
	padding: 1.5rem 1rem;
	pointer-events: none;
}

.athba-size-guide-content {
	position: relative;
	width: 100%;
	max-width: 720px;
	max-height: 90vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: var(--global-palette9, #fff);
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
	pointer-events: auto;
	animation: athba-sg-slide-up 0.3s ease;
}

.athba-size-guide-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var(--global-palette7, #e8e8e8);
	background: var(--global-palette8, #f5f5f5);
}

.athba-size-guide-title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--global-palette3, #222);
	line-height: 1.3;
}

.athba-size-guide-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: var(--global-palette4, #666);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.athba-size-guide-close:hover,
.athba-size-guide-close:focus {
	background: rgba(0, 0, 0, 0.06);
	color: var(--global-palette3, #222);
	outline: none;
}

.athba-size-guide-body {
	padding: 1.25rem;
	overflow-x: auto;
	overflow-y: auto;
}

/* Table */
.athba-size-guide-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
	text-align: center;
	direction: rtl;
}

.athba-size-guide-table th,
.athba-size-guide-table td {
	padding: 0.75rem 0.65rem;
	border: 1px solid var(--global-palette7, #e0e0e0);
}

.athba-size-guide-table thead th {
	background: var(--global-palette1, #8b7355);
	color: var(--global-palette9, #fff);
	font-weight: 600;
	white-space: nowrap;
}

.athba-size-guide-table tbody tr:nth-child(even) {
	background: var(--global-palette8, #f9f9f9);
}

.athba-size-guide-table tbody tr:hover {
	background: rgba(139, 115, 85, 0.06);
}

.athba-size-guide-table tbody td:first-child {
	font-weight: 600;
	color: var(--global-palette3, #333);
}

body.athba-size-guide-open {
	overflow: hidden;
}

@keyframes athba-sg-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes athba-sg-slide-up {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 640px) {
	.athba-size-guide-dialog {
		padding: 0.75rem 0.5rem;
		align-items: flex-end;
	}

	.athba-size-guide-content {
		max-height: 92vh;
		border-radius: 12px 12px 0 0;
	}

	.athba-size-guide-table {
		font-size: 0.8rem;
	}

	.athba-size-guide-table th,
	.athba-size-guide-table td {
		padding: 0.5rem 0.35rem;
	}
}
