/* ==========================================================================
   SIZE CHART — Modal, Table, Body Diagram, Unit Toggle
   ========================================================================== */

/* ── Trigger Link (near Size selector) ── */
.sc-trigger-wrap {
	margin: 4px 0 2px;
}

.sc-trigger-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 0;
	background: none;
	border: none;
	color: #2e7d32;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	text-decoration: none;
	transition: color 0.2s ease;
}

.sc-trigger-btn:hover {
	color: #1b5e20;
	text-decoration: underline;
}

.sc-trigger-icon {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
}


/* ==========================================================================
   MODAL OVERLAY
   ========================================================================== */
.sc-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	opacity: 0;
	transition: opacity 0.35s ease;
	padding: 20px;
}

.sc-overlay.is-open {
	display: flex;
	opacity: 1;
}

/* Opening animation */
.sc-overlay.is-animating {
	display: flex;
}


/* ==========================================================================
   MODAL CONTAINER
   ========================================================================== */
.sc-modal {
	width: 100%;
	max-width: 920px;
	max-height: 90vh;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: translateY(30px) scale(0.96);
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.sc-overlay.is-open .sc-modal {
	transform: translateY(0) scale(1);
}


/* ── Header ── */
.sc-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 28px;
	border-bottom: 1px solid #eee;
	background: linear-gradient(135deg, #f8faf8 0%, #fff 100%);
}

.sc-modal__title-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
}

.sc-modal__title-icon {
	width: 28px;
	height: 28px;
	color: #2e7d32;
}

.sc-modal__header h2 {
	font-size: 20px;
	font-weight: 800;
	color: #1a1a1a;
	margin: 0;
	letter-spacing: -0.3px;
}

.sc-modal__close {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: #f5f5f5;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	padding: 0;
}

.sc-modal__close:hover {
	background: #e8e8e8;
	transform: rotate(90deg);
}

.sc-modal__close svg {
	width: 18px;
	height: 18px;
	color: #666;
}


/* ── Tabs ── */
.sc-tabs {
	display: flex;
	gap: 4px;
	padding: 12px 28px;
	overflow-x: auto;
	background: #fafbfa;
	border-bottom: 1px solid #eee;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.sc-tabs::-webkit-scrollbar {
	display: none;
}

.sc-tab {
	padding: 8px 16px;
	border: 1px solid #e0e0e0;
	border-radius: 50px;
	background: #fff;
	color: #555;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	transition: all 0.25s ease;
	font-family: inherit;
}

.sc-tab:hover {
	border-color: #2e7d32;
	color: #2e7d32;
	background: #e8f5e9;
}

.sc-tab.is-active {
	background: #2e7d32;
	color: #fff;
	border-color: #2e7d32;
	box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}


/* ── Modal Body (scrollable) ── */
.sc-modal__body {
	flex: 1;
	overflow-y: auto;
	padding: 24px 28px 32px;
	scroll-behavior: smooth;
}


/* ==========================================================================
   UNIT TOGGLE
   ========================================================================== */
.sc-unit-toggle {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin-bottom: 20px;
}

.sc-unit-label {
	font-size: 11px;
	font-weight: 600;
	color: #999;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.sc-unit-switcher {
	display: flex;
	position: relative;
	background: #f0f0f0;
	border-radius: 50px;
	padding: 2px;
}

.sc-unit-btn,
.sc-unit-switcher button,
.sc-unit-switcher button.sc-unit-btn {
	margin: 0px;
	position: relative;
	z-index: 2;
	padding: 4px 14px;
	border: none !important;
	border-radius: 50px !important;
	background: transparent;
	background-color: transparent;
	background-image: none !important;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: #888;
	cursor: pointer;
	transition: color 0.3s ease;
	font-family: inherit;
	line-height: 1.4;
	outline: none !important;
	box-shadow: none !important;
	text-shadow: none !important;
	text-transform: uppercase;
}

.sc-unit-btn:hover,
.sc-unit-btn:focus,
.sc-unit-btn:active,
.sc-unit-switcher button:hover,
.sc-unit-switcher button:focus,
.sc-unit-switcher button:active {
	background: #2e7d32 !important;
	background-color: #2e7d32 !important;
	background-image: none !important;
	box-shadow: none !important;
	border: none !important;
	outline: none !important;
}

.sc-unit-btn:hover:not(.is-active) {
	color: #1a1a1a !important;
}

.sc-unit-btn.is-active {
	color: #fff !important;
	background: #2e7d32 !important;
	background-color: #2e7d32 !important;
}

.sc-unit-slider {
	display: none;
}


/* ==========================================================================
   CHART PANELS
   ========================================================================== */
.sc-panel {
	display: none;
	animation: scFadeIn 0.3s ease;
}

.sc-panel.is-active {
	display: block;
}

@keyframes scFadeIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.sc-panel__layout {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 28px;
	align-items: start;
}


/* ==========================================================================
   BODY DIAGRAM (SVG)
   ========================================================================== */
.sc-diagram {
	position: sticky;
	top: 0;
}

.sc-body-svg {
	width: 100%;
	height: auto;
	max-height: 320px;
}

.sc-body-outline {
	transition: fill 0.3s ease;
}

.sc-measure-line * {
	transition: opacity 0.35s ease;
}

.sc-measure-line.is-highlighted * {
	opacity: 1 !important;
}

.sc-measure-line.is-highlighted line {
	stroke-dasharray: none;
	stroke-width: 2.5;
}

.sc-measure-line.is-highlighted circle {
	r: 4;
}

.sc-measure-line.is-highlighted text {
	font-size: 12px;
	font-weight: 700;
}


/* ==========================================================================
   SIZE TABLE
   ========================================================================== */
.sc-table-wrap {
	overflow-x: auto;
}

.sc-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 14px;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid #e0e0e0;
}

.sc-table thead th {
	background: linear-gradient(135deg, #2e7d32, #388e3c);
	color: #fff;
	font-weight: 700;
	font-size: 13px;
	padding: 14px 16px;
	text-align: center;
	letter-spacing: 0.3px;
	white-space: nowrap;
	position: relative;
}

.sc-table thead th.sc-table__size-col {
	background: linear-gradient(135deg, #1b5e20, #2e7d32);
	text-align: left;
	min-width: 60px;
}

.sc-table thead th.is-highlighted {
	background: linear-gradient(135deg, #1565c0, #1976d2) !important;
	box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.3);
}

.sc-table tbody td {
	padding: 12px 16px;
	text-align: center;
	border-bottom: 1px solid #f0f0f0;
	color: #444;
	font-weight: 500;
	transition: all 0.2s ease;
}

.sc-table tbody tr:last-child td {
	border-bottom: none;
}

.sc-table tbody tr:hover {
	background: #f8faf8;
}

.sc-table tbody tr:hover td {
	color: #1a1a1a;
}

.sc-table__size-cell {
	font-weight: 700 !important;
	color: #2e7d32 !important;
	text-align: left !important;
	background: #f8faf8;
}

/* Column highlight */
.sc-table td.is-col-highlighted,
.sc-table th.is-col-highlighted {
	background: rgba(46, 125, 50, 0.08) !important;
}


/* ==========================================================================
   HOW TO MEASURE GUIDE
   ========================================================================== */
.sc-measure-guide {
	margin-top: 32px;
	padding-top: 28px;
	border-top: 1px solid #eee;
}

.sc-measure-guide__title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 17px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 20px;
}

.sc-measure-guide__title svg {
	color: #2e7d32;
}

.sc-measure-guide__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.sc-measure-guide__item {
	background: #f8faf8;
	border-radius: 12px;
	padding: 20px;
	border: 1px solid #e8f0e8;
	transition: all 0.3s ease;
	cursor: default;
}

.sc-measure-guide__item:hover {
	border-color: #2e7d32;
	box-shadow: 0 4px 16px rgba(46, 125, 50, 0.1);
	transform: translateY(-2px);
}

.sc-measure-guide__icon {
	width: 44px;
	height: 44px;
	background: #e8f5e9;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 12px;
	color: #2e7d32;
}

.sc-measure-guide__item h4 {
	font-size: 14px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 6px;
}

.sc-measure-guide__item p {
	font-size: 12px;
	line-height: 1.6;
	color: #666;
	margin: 0;
}


/* ==========================================================================
   FIT TIP BAR
   ========================================================================== */
.sc-fit-tip {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-top: 24px;
	padding: 16px 20px;
	background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
	border-radius: 12px;
	border-left: 4px solid #2e7d32;
}

.sc-fit-tip svg {
	flex-shrink: 0;
	color: #2e7d32;
	margin-top: 2px;
}

.sc-fit-tip p {
	font-size: 13px;
	line-height: 1.6;
	color: #444;
	margin: 0;
}

.sc-fit-tip strong {
	color: #1a1a1a;
}


/* ==========================================================================
   RESPONSIVE — Tablet
   ========================================================================== */
@media (max-width: 768px) {
	.sc-overlay {
		padding: 10px;
		align-items: flex-end;
	}

	.sc-modal {
		max-height: 92vh;
		border-radius: 16px 16px 0 0;
		max-width: 100%;
	}

	.sc-modal__header {
		padding: 16px 20px;
	}

	.sc-modal__header h2 {
		font-size: 17px;
	}

	.sc-tabs {
		padding: 10px 20px;
	}

	.sc-modal__body {
		padding: 20px;
	}

	.sc-panel__layout {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.sc-diagram {
		position: relative;
		max-width: 180px;
		margin: 0 auto;
	}

	.sc-measure-guide__grid {
		grid-template-columns: 1fr 1fr;
	}
}


/* ==========================================================================
   RESPONSIVE — Mobile
   ========================================================================== */
@media (max-width: 480px) {
	.sc-overlay {
		padding: 0;
	}

	.sc-modal {
		max-height: 100vh;
		border-radius: 0;
		height: 100vh;
	}

	.sc-modal__header {
		padding: 14px 16px;
	}

	.sc-tabs {
		padding: 8px 16px;
		gap: 6px;
	}

	.sc-tab {
		padding: 6px 12px;
		font-size: 11px;
	}

	.sc-modal__body {
		padding: 16px;
	}

	.sc-table {
		font-size: 12px;
	}

	.sc-table thead th {
		padding: 10px 8px;
		font-size: 11px;
	}

	.sc-table tbody td {
		padding: 10px 8px;
	}

	.sc-measure-guide__grid {
		grid-template-columns: 1fr;
	}

	.sc-measure-guide__item {
		padding: 16px;
	}

	.sc-diagram {
		max-width: 140px;
	}
}


/* ==========================================================================
   PRODUCT TAB — "Sizing & Fit" inline content
   ========================================================================== */
.sc-tab-content {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.sc-tab-unit-toggle {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin-bottom: 20px;
}

.sc-chart-section {
	margin-bottom: 28px;
}

.sc-chart-section:last-of-type {
	margin-bottom: 0;
}

.sc-chart-title {
	font-size: 14px;
	font-weight: 700;
	color: #2e7d32;
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid #e8f5e9;
	display: flex;
	align-items: center;
	gap: 6px;
}

.sc-chart-title::before {
	content: '';
	display: inline-block;
	width: 4px;
	height: 16px;
	background: #2e7d32;
}

.sc-chart-guide-image {
	margin-top: 20px;
	text-align: center;
}

.sc-chart-guide-image img {
	max-width: 100%;
	width: auto;
	max-height: 420px;
	border-radius: 10px;
	border: 1px solid #e8f0e8;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sc-chart-guide-image img:hover {
	transform: scale(1.02);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

@media (max-width: 767px) {
	.sc-chart-guide-image img {
		max-height: 300px;
	}
}

.sc-tab-measure-guide {
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid #eee;
}

.sc-tab-measure-guide h3 {
	font-size: 15px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 16px;
}

.sc-measure-guide__wrapper {
	display: flex;
	gap: 32px;
	align-items: flex-start;
}

.sc-measure-guide__image {
	flex: 0 0 45%;
	max-width: 450px;
}

.sc-measure-guide__image img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 8px;
	border: 1px solid #f0f0f0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.sc-measure-guide__grid {
	flex: 1;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.has-guide-image .sc-measure-guide__grid {
	grid-template-columns: repeat(2, 1fr);
	/* 2 cols if side by side with image */
}

.sc-tab-guide-item {
	background: #f8faf8;
	padding: 16px;
	border-radius: 8px;
	border: 1px solid #e8f0e8;
}

.sc-tab-guide-item h4 {
	font-size: 12px;
	font-weight: 700;
	color: #2e7d32;
	margin: 0 0 4px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.sc-tab-guide-item h4::before {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	background: #2e7d32;
	border-radius: 50%;
}

.sc-tab-guide-item p {
	font-size: 11px;
	line-height: 1.5;
	color: #666;
	margin: 0;
}

@media (max-width: 991px) {
	.has-guide-image .sc-measure-guide__grid {
		grid-template-columns: 1fr;
		/* Stack text items internally */
	}
}

@media (max-width: 767px) {
	.sc-measure-guide__wrapper {
		flex-direction: column;
		gap: 20px;
	}

	.sc-measure-guide__image {
		flex: none;
		max-width: 100%;
	}

	.sc-measure-guide__grid,
	.has-guide-image .sc-measure-guide__grid {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   HELP CENTER — Size Chart Panel Styles
   ========================================================================== */
.hc-sc-container {
	max-width: 900px;
	margin: 0 auto;
}

/* Product type selector in Help Center */
.hc-sc-selector {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 28px;
	justify-content: center;
}

.hc-sc-selector-btn {
	padding: 8px 18px;
	border: 1.5px solid #e0e0e0;
	border-radius: 50px;
	background: #fff;
	color: #555;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.25s ease;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.hc-sc-selector-btn:hover {
	border-color: #2e7d32;
	color: #2e7d32;
	background: #e8f5e9;
}

.hc-sc-selector-btn.is-active {
	background: #2e7d32;
	color: #fff;
	border-color: #2e7d32;
	box-shadow: 0 2px 8px rgba(46, 125, 50, 0.25);
}

/* Table within Help Center */
.hc-sc-chart-panel {
	display: none;
	animation: scFadeIn 0.3s ease;
}

.hc-sc-chart-panel.is-active {
	display: block;
}

.hc-sc-chart-panel .sc-panel__layout {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 24px;
	align-items: start;
}

.hc-sc-chart-panel .sc-table {
	margin-bottom: 24px;
}

/* Help Center How To Measure — reuse styles */
.hc-sc-measure-guide {
	margin-top: 32px;
}

/* Help Center measure guide image+text layout */
.sc-measure-guide.has-guide-image .sc-measure-guide__wrapper {
	display: flex;
	gap: 32px;
	align-items: flex-start;
}

.sc-measure-guide.has-guide-image .sc-measure-guide__image {
	flex: 0 0 45%;
	max-width: 400px;
}

.sc-measure-guide.has-guide-image .sc-measure-guide__image img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 12px;
	border: 1px solid #e8f0e8;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sc-measure-guide.has-guide-image .sc-measure-guide__image img:hover {
	transform: scale(1.02);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

#hc-sc-guide-img {
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.sc-measure-guide.has-guide-image .sc-measure-guide__grid {
	flex: 1;
	grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 991px) {
	.sc-measure-guide.has-guide-image .sc-measure-guide__image {
		flex: 0 0 40%;
		max-width: 320px;
	}

	.sc-measure-guide.has-guide-image .sc-measure-guide__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767px) {
	.sc-measure-guide.has-guide-image .sc-measure-guide__wrapper {
		flex-direction: column;
		gap: 20px;
	}

	.sc-measure-guide.has-guide-image .sc-measure-guide__image {
		flex: none;
		max-width: 100%;
	}

	.sc-measure-guide.has-guide-image .sc-measure-guide__image img {
		max-width: 350px;
		margin: 0 auto;
	}

	.sc-measure-guide.has-guide-image .sc-measure-guide__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.sc-measure-guide.has-guide-image .sc-measure-guide__image img {
		max-width: 280px;
		border-radius: 8px;
	}
}

@media (max-width: 768px) {
	.hc-sc-chart-panel .sc-panel__layout {
		grid-template-columns: 1fr;
	}

	.hc-sc-selector {
		justify-content: center;
		flex-wrap: wrap;
		gap: 6px;
	}

	.hc-sc-selector-btn {
		padding: 6px 14px;
		font-size: 11px;
	}
}

@media (max-width: 480px) {
	.hc-sc-selector-btn {
		padding: 0px 5px;
		font-size: 10px;
		margin: 0px;
	}
}