/* SuitUp – 3D Head Measuring Guide
   Everything is scoped under .suhg. The site theme styles buttons and headings
   (hover/focus colors, margins, uppercase fonts), so interactive states and key
   spacing use !important on purpose to keep the guide readable. */

/* Wrapper: lets the viewer adapt to the width of the description column */
.suhg-wrap { container-type: inline-size; width: 100%; clear: both; margin: 40px 0 8px; }

.suhg {
	--suhg-h: 640px;
	--suhg-bg: #ffffff;
	--suhg-ink: #14171c;
	--suhg-muted: #5c6470;
	--suhg-line: #e3e6eb;
	--suhg-soft: #f4f6f8;
	--suhg-stage: radial-gradient(120% 90% at 50% 35%, #2b313b 0%, #15181d 70%);
	box-sizing: border-box;
	display: grid;
	grid-template-columns: minmax(0, 60fr) minmax(0, 40fr); /* 3D view 60% · text panel 40% */
	align-items: stretch;
	gap: 0;
	width: 100%;
	max-width: none;
	margin: 0 auto;
	border: 1px solid var(--suhg-line);
	border-radius: 16px;
	overflow: hidden;
	background: var(--suhg-bg);
	color: var(--suhg-ink);
	font: 400 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.suhg *, .suhg *::before, .suhg *::after { box-sizing: border-box; }

/* 3D stage ---------------------------------------------------------- */
/* Desktop: the stage stretches to the height of the text panel, so the panel never scrolls. */
.suhg__stage {
	position: relative;
	min-height: var(--suhg-h);
	background: var(--suhg-stage);
	overflow: hidden;
}
.suhg__canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.suhg__canvas:active { cursor: grabbing; }
.suhg__labels { position: absolute; inset: 0; pointer-events: none; }
.suhg__badge, .suhg__hint, .suhg__loading {
	position: absolute; z-index: 2; pointer-events: none;
	font-size: 12px; color: #e8ebf0;
}
.suhg__hint { bottom: 12px; left: 50%; transform: translateX(-50%); opacity: .7; white-space: nowrap; }
.suhg__loading { inset: 0; display: grid; place-items: center; font-size: 14px; }
.suhg__error { margin: 0; padding: 24px; color: #e8ebf0; }

.suhg-tag {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 3px 9px 3px 3px; border-radius: 999px;
	background: rgba(14, 16, 20, .82); color: #fff;
	border: 1px solid var(--c);
	font: 600 12px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	white-space: nowrap; backdrop-filter: blur(4px);
}
.suhg-tag span {
	display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
	background: var(--c); color: #111; font-size: 11px;
}

/* Panel ---------------------------------------------------------------- */
.suhg__panel {
	display: flex; flex-direction: column; gap: 16px;
	padding: 22px; border-left: 1px solid var(--suhg-line);
	min-width: 0;
}
.suhg .suhg__eyebrow { margin: 0 0 2px !important; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--suhg-muted); }
.suhg .suhg__title { margin: 0 !important; font-size: 22px; line-height: 1.2; font-weight: 700; color: var(--suhg-ink); }

/* Button reset (themes often style <button>) */
:where(.suhg) button {
	all: unset; box-sizing: border-box; cursor: pointer;
	font: inherit; color: inherit; -webkit-tap-highlight-color: transparent;
}
.suhg button:focus-visible { outline: 2px solid #2f8fff !important; outline-offset: 2px; }

/* Tabs — equal-size pills on every screen */
.suhg__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.suhg .suhg__tab,
.suhg .suhg__tab:hover,
.suhg .suhg__tab:focus,
.suhg .suhg__tab:active {
	display: flex !important; align-items: center; gap: 10px;
	width: 100%; min-width: 0; min-height: 54px;
	padding: 10px !important; border-radius: 10px !important;
	border: 1px solid var(--suhg-line) !important;
	background: var(--suhg-soft) !important;
	color: var(--suhg-ink) !important;
	box-shadow: none !important;
	text-transform: none !important; letter-spacing: normal !important;
	transition: border-color .15s, background .15s, box-shadow .15s;
}
.suhg .suhg__tab:hover { border-color: var(--c, #9aa1ab) !important; }
.suhg .suhg__tab[aria-pressed="true"],
.suhg .suhg__tab[aria-pressed="true"]:hover,
.suhg .suhg__tab[aria-pressed="true"]:focus,
.suhg .suhg__tab[aria-pressed="true"]:active {
	background: #fff !important;
	border-color: var(--c, var(--suhg-ink)) !important;
	box-shadow: 0 0 0 1px var(--c, var(--suhg-ink)) inset !important;
	color: var(--suhg-ink) !important;
}
.suhg__tabtxt { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.suhg .suhg__tabtxt strong { font-size: 14px; line-height: 1.2; font-weight: 700; color: var(--suhg-ink) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suhg .suhg__tabtxt small { font-size: 11.5px; line-height: 1.3; color: var(--suhg-muted) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suhg .suhg__tab--all,
.suhg .suhg__tab--all:hover,
.suhg .suhg__tab--all:focus,
.suhg .suhg__tab--all:active { grid-column: 1 / -1; justify-content: center; font-weight: 600; font-size: 14px; min-height: 40px; padding: 8px !important; }

.suhg .suhg__num {
	flex: none; display: grid !important; place-items: center;
	width: 26px; height: 26px; margin: 0 !important; border-radius: 50%;
	background: var(--c); color: #111 !important; font-weight: 700; font-size: 13px; line-height: 1;
}

/* Step details */
.suhg__info { flex: 1; }
.suhg .suhg__infohead { display: flex; align-items: center; gap: 12px; margin: 0 0 12px !important; }
.suhg .suhg__infohead > div { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; }
.suhg .suhg__h3 { margin: 0 !important; padding: 0 !important; font-size: 17px; font-weight: 700; line-height: 1.2 !important; color: var(--suhg-ink); }
.suhg .suhg__view { display: block; margin: 0 !important; font-size: 12.5px; line-height: 1.3; color: var(--suhg-muted); }
.suhg .suhg__steps { margin: 0 !important; padding-left: 20px !important; }
.suhg .suhg__steps li { margin: 0 0 6px !important; list-style: decimal !important; }
.suhg .suhg__note { margin: 0 !important; font-size: 13.5px; color: var(--suhg-muted); }
.suhg .suhg__summary { list-style: none !important; margin: 10px 0 12px !important; padding: 0 !important; display: grid; gap: 10px; }
.suhg .suhg__summary li { display: flex; align-items: center; gap: 10px; margin: 0 !important; list-style: none !important; }
.suhg__summary div { display: flex; flex-direction: column; }
.suhg__summary small { color: var(--suhg-muted); font-size: 12px; }

/* Size finder ----------------------------------------------------------- */
.suhg .suhg__form { margin: 0 !important; padding: 14px; border-radius: 12px; background: var(--suhg-soft); display: grid; gap: 10px; }
.suhg .suhg__form-title { margin: 0 !important; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--suhg-ink); }
.suhg .suhg__form-title span { font-weight: 600; color: var(--suhg-muted); text-transform: none; letter-spacing: normal; }
.suhg .suhg__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.suhg .suhg__field {
	margin: 0 !important; padding: 8px 10px 6px; border-radius: 10px;
	background: #fff; border: 1px solid var(--suhg-line);
	display: grid; gap: 5px; min-width: 0;
	transition: border-color .15s, box-shadow .15s;
}
.suhg .suhg__field.is-active { border-color: var(--c); box-shadow: 0 0 0 1px var(--c) inset; }
.suhg .suhg__num--sm { width: 18px !important; height: 18px !important; font-size: 11px !important; margin-right: 6px !important; display: inline-grid !important; vertical-align: -3px; }
.suhg .suhg__field-label { display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 !important; font-size: 13px; font-weight: 700; color: var(--suhg-ink) !important; text-transform: none !important; letter-spacing: normal !important; }
.suhg .suhg__input-wrap { display: flex; align-items: stretch; width: 100%; }
.suhg .suhg__input,
.suhg .suhg__input:hover,
.suhg .suhg__input:focus {
	flex: 1; min-width: 0; width: 100%; height: 40px !important; margin: 0 !important;
	padding: 0 12px !important; border: 1px solid #c9ced6 !important; border-right: 0 !important;
	border-radius: 8px 0 0 8px !important; background: #fff !important; color: var(--suhg-ink) !important;
	font: 600 16px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important; box-shadow: none !important;
	outline: none;
}
.suhg .suhg__input:focus { border-color: var(--c) !important; box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 30%, transparent) !important; }
.suhg .suhg__input[aria-invalid="true"] { border-color: #d93025 !important; }
.suhg .suhg__unit {
	display: grid; place-items: center; padding: 0 10px; height: 40px;
	border: 1px solid #c9ced6; border-radius: 0 8px 8px 0; background: #eceff3;
	font-size: 14px; font-weight: 600; color: var(--suhg-muted);
}
.suhg .suhg__fit { display: block; min-height: 1.4em; margin: 0 !important; font-size: 12px; line-height: 1.4; color: var(--suhg-muted); }
.suhg .suhg__fit strong { color: var(--suhg-ink); }

.suhg .suhg__result { margin: 0 !important; }
.suhg .suhg__result-empty { margin: 0 !important; padding: 12px 14px; border-radius: 10px; border: 1px dashed #c9ced6; font-size: 13px; color: var(--suhg-muted); }
.suhg .suhg__rec {
	display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px;
	padding: 14px 16px; border-radius: 12px; background: var(--suhg-ink); color: #fff;
}
.suhg .suhg__rec-label { flex-basis: 100%; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #b8bec8; }
.suhg .suhg__rec-size { font-size: 22px; font-weight: 800; line-height: 1.15; color: #fff; }
.suhg .suhg__pick,
.suhg .suhg__pick:hover,
.suhg .suhg__pick:focus,
.suhg .suhg__pick:active {
	margin-left: auto; padding: 8px 14px !important; border-radius: 8px !important;
	background: #ff4d2e !important; color: #fff !important; border: 0 !important; box-shadow: none !important;
	font-size: 13.5px !important; font-weight: 700; text-transform: none !important; letter-spacing: normal !important;
}
.suhg .suhg__pick:hover { filter: brightness(1.08); }
.suhg .suhg__warn { margin: 8px 0 0 !important; padding: 8px 12px; border-radius: 8px; background: #fff4e5; color: #8a4b00; font-size: 12.5px; }
.suhg .suhg__basis { margin: 6px 0 0 !important; font-size: 12px; color: var(--suhg-muted); }

/* Progress (shown until all 4 measurements are entered) */
.suhg .suhg__progress { padding: 12px 14px; border-radius: 10px; border: 1px dashed #c9ced6; display: grid; gap: 8px; }
.suhg .suhg__progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; color: var(--suhg-muted); }
.suhg .suhg__progress-head strong { color: var(--suhg-ink); font-size: 14px; }
.suhg .suhg__bar { height: 6px; border-radius: 999px; background: #e6e9ee; overflow: hidden; }
.suhg .suhg__bar span { display: block; height: 100%; border-radius: inherit; background: #1fbf63; transition: width .25s; }
.suhg .suhg__missing { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--suhg-muted); }
.suhg .suhg__chip,
.suhg .suhg__chip:hover,
.suhg .suhg__chip:focus,
.suhg .suhg__chip:active {
	padding: 3px 10px !important; border-radius: 999px !important; border: 1px solid var(--c) !important;
	background: #fff !important; color: var(--suhg-ink) !important; box-shadow: none !important;
	font-size: 12px !important; font-weight: 600; line-height: 1.5; text-transform: none !important; letter-spacing: normal !important;
}
.suhg .suhg__chip:hover { background: var(--suhg-soft) !important; }
/* Tabs: check mark once that measurement is entered */
.suhg .suhg__tab[data-done]::after {
	content: "✓"; margin-left: auto; flex: none; display: grid; place-items: center;
	width: 20px; height: 20px; border-radius: 50%; background: #1fbf63; color: #fff; font-size: 12px; font-weight: 700;
}

/* Tool buttons */
.suhg__tools { display: flex; gap: 8px; }
.suhg .suhg__tool,
.suhg .suhg__tool:hover,
.suhg .suhg__tool:focus,
.suhg .suhg__tool:active {
	flex: 1; text-align: center; padding: 9px 10px !important; border-radius: 8px !important;
	border: 1px solid var(--suhg-line) !important; background: #fff !important; color: var(--suhg-ink) !important;
	box-shadow: none !important; text-transform: none !important;
	font-size: 13.5px; font-weight: 600;
}
.suhg .suhg__tool:hover { background: var(--suhg-soft) !important; }
.suhg .suhg__tool[aria-pressed="true"],
.suhg .suhg__tool[aria-pressed="true"]:hover,
.suhg .suhg__tool[aria-pressed="true"]:focus { background: var(--suhg-ink) !important; color: #fff !important; border-color: var(--suhg-ink) !important; }

/* Responsive ------------------------------------------------------------ */
@container (max-width: 860px) {
	.suhg { grid-template-columns: 1fr; border-radius: 12px; }
	.suhg__stage { min-height: 0; height: min(var(--suhg-h), 70vh); }
	.suhg__panel { border-left: 0; border-top: 1px solid var(--suhg-line); padding: 16px; }
}
@container (max-width: 420px) {
	.suhg__hint { font-size: 11px; }
	.suhg .suhg__tab, .suhg .suhg__tab:hover, .suhg .suhg__tab:focus, .suhg .suhg__tab:active { gap: 8px; padding: 8px !important; }
	.suhg .suhg__tabtxt strong { font-size: 13px; }
	.suhg .suhg__tabtxt small { font-size: 11px; }
	.suhg .suhg__form { padding: 12px; }
	.suhg .suhg__fields { gap: 8px; }
	.suhg .suhg__field { padding: 8px 8px 6px; }
	.suhg .suhg__field-label { font-size: 12px !important; }
	.suhg .suhg__num--sm { margin-right: 4px !important; }
}
