/* HandStand tower configurator */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

.ths-tower-wrap {
	font-family: 'Poppins', sans-serif;
}

.ths-tower-wrap {
	--ths-tower-height: min(72vh, 720px);
	margin: 0 auto 2rem;
	max-width: 1400px;
}

.ths-tower-layout {
	display: grid;
	grid-template-columns: 1fr min(340px, 36vw);
	gap: 1.25rem;
	align-items: start;
}

@media (max-width: 960px) {
	.ths-tower-layout {
		grid-template-columns: 1fr;
	}
}

.ths-tower-canvas-col {
	min-width: 0;
}

.ths-tower-canvas-shell {
	position: relative;
	width: 100%;
	height: var(--ths-tower-height);
	background: linear-gradient(180deg, #3f3f46 0%, #27272a 100%);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.ths-tower-canvas {
	display: block;
	width: 100%;
	height: 100%;
	outline: none;
}

.ths-tower-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(24, 24, 27, 0.75);
	color: #fafafa;
	font-size: 0.95rem;
	pointer-events: none;
}

.ths-tower-hint {
	margin: 10px 0 0;
	font-size: 0.8125rem;
	color: #71717a;
}

.ths-tower-reset-camera {
	margin: 8px 0 0;
	padding: 6px 12px;
	font-size: 0.8125rem;
	color: #fafafa;
	background: #27272a;
	border: 1px solid #52525b;
	border-radius: 6px;
	cursor: pointer;
}

.ths-tower-reset-camera:hover {
	background: #3f3f46;
	border-color: #71717a;
}

.ths-tower-reset-camera:focus-visible {
	outline: 2px solid #d4af37;
	outline-offset: 2px;
}

.ths-tower-note {
	margin: 8px 0 0;
	font-size: 0.75rem;
	color: #a1a1aa;
	line-height: 1.45;
}

.ths-tower-controls {
	background: #18181b;
	color: #fafafa;
	border-radius: 12px;
	padding: 1.1rem 1rem 1.25rem;
	border: 1px solid #3f3f46;
	max-height: min(var(--ths-tower-height), 90vh);
	overflow-y: auto;
}

.ths-tower-controls-title {
	margin: 0 0 14px;
	font-size: 1rem;
	font-weight: 600;
	color: #d4af37;
	letter-spacing: 0.02em;
}

.ths-tower-section {
	margin-bottom: 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid #3f3f46;
}

.ths-tower-section:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.ths-tower-action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 10px;
	padding: 9px 12px;
	font-size: 0.82rem;
	font-weight: 600;
	border-radius: 10px;
	border: 1px solid #52525b;
	background: #27272a;
	color: #fafafa;
	cursor: pointer;
	user-select: none;
	transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.ths-tower-action-btn:hover {
	background: #303036;
	border-color: #6b7280;
}

.ths-tower-action-btn:active {
	transform: translateY(1px);
}

.ths-tower-action-btn:focus-visible {
	outline: 2px solid rgba(212, 175, 55, 0.85);
	outline-offset: 2px;
}

.ths-tower-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #d4af37;
	margin-bottom: 8px;
}

.ths-tower-quick {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ths-tower-preset {
	flex: 1 1 45%;
	padding: 8px 10px;
	font-size: 0.78rem;
	border-radius: 8px;
	border: 1px solid #52525b;
	background: #27272a;
	color: #e4e4e7;
	cursor: pointer;
	text-transform: uppercase;
	transition: background 0.15s, border-color 0.15s;
}

.ths-tower-preset:hover {
	background: #3f3f46;
	border-color: #d4af37;
	color: #fafafa;
}

.ths-tower-preset-custom {
	flex: 1 1 100%;
	border-style: dashed;
}

/* Full-width tower STL — same zinc tone as “Quick layout” presets (2nd UI reference). */
.ths-tower-tower-top {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	font-size: 0.78rem;
	border-radius: 8px;
	border: 1px solid #52525b;
	background: #27272a;
	color: #e4e4e7;
	cursor: pointer;
	text-align: center;
	text-transform: uppercase;
	transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.ths-tower-tower-top:hover {
	background: #3f3f46;
	border-color: #d4af37;
	color: #fafafa;
}

.ths-tower-mixed-stl-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 0;
}

.ths-tower-label.ths-tower-mixed-front {
	margin-top: 12px;
	margin-bottom: 6px;
}

.ths-tower-label.ths-tower-mixed-right {
	margin-top: 14px;
	margin-bottom: 8px;
}

.ths-tower-label.ths-tower-mixed-left {
	margin-top: 14px;
	margin-bottom: 8px;
}

/* Row under tower+top: same navy/slate as former mixed-preset grid buttons. */
.ths-tower-mixed-stl-buttons .ths-tower-tower-top {
	flex: 1 1 calc(50% - 4px);
	min-width: min(100%, 140px);
	min-height: 3.35rem;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	line-height: 1.2;
	padding: 10px 10px;
	box-sizing: border-box;
	width: auto;
	border: 1px solid #52525b;
	background: #1e2939;
	color: #e4e4e7;
}

.ths-tower-mixed-stl-buttons .ths-tower-tower-top:hover {
	background: #334155;
	border-color: #38bdf8;
	color: #fafafa;
}

.ths-tower-mixed-stl-toggle[aria-pressed='true'] {
	border-color: #38bdf8;
	box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
	background: #334155;
	color: #fafafa;
}

.ths-tower-mixed-stl-toggle:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.ths-tower-mixed-stl-toggle--empty {
	font-variant-numeric: tabular-nums;
}

.ths-tower-preset-mixed {
	flex: 1 1 45%;
	padding: 8px 10px;
	font-size: 0.78rem;
	border-radius: 8px;
	border: 1px solid #52525b;
	background: #1e2939;
	color: #e4e4e7;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}

.ths-tower-preset-mixed:hover {
	background: #334155;
	border-color: #38bdf8;
	color: #fafafa;
}

/* Light select + options so native dropdown lists are readable (avoid white-on-white). */
.ths-tower-controls select.ths-tower-zone {
	width: 100%;
	max-width: 100%;
	margin-top: 0.35rem;
	padding: 0.5rem 0.65rem;
	font-size: 0.9rem;
	border-radius: 8px;
	border: 1px solid #71717a;
	background-color: #ffffff !important;
	color: #18181b !important;
	color-scheme: light;
}

.ths-tower-controls select.ths-tower-zone {
	margin-top: 0;
	padding: 10px 12px;
}

.ths-tower-controls select.ths-tower-zone option {
	background-color: #ffffff;
	color: #18181b;
}

.ths-tower-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.875rem;
	cursor: pointer;
	color: #e4e4e7;
}

.ths-tower-toggle input {
	width: 18px;
	height: 18px;
	accent-color: #14b8a6;
}

.ths-tower-help {
	margin: 8px 0 0;
	font-size: 0.75rem;
	color: #a1a1aa;
	line-height: 1.4;
}

.ths-tower-shelves {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ths-tower-shelf {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.8125rem;
	color: #e4e4e7;
	cursor: pointer;
}

.ths-tower-shelf input {
	accent-color: #14b8a6;
}

.ths-tower-mixed-colors,
.ths-tower-quick-colors {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ths-tower-mixed-colors-intro,
.ths-tower-quick-colors .ths-tower-help {
	margin-bottom: 10px;
}


.ths-tower-waste-btn[aria-pressed='true'],
.ths-tower-waste-btn.is-active {
	background: #14b8a6;
	border-color: #14b8a6;
	color: #ffffff;
	box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.4);
}

.ths-tower-waste-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.ths-tower-waste-block[hidden] {
	display: none !important;
}

.ths-tower-waste-block .ths-tower-help {
	margin-top: 8px;
	margin-bottom: 0;
}

.ths-tower-color-row--accessories {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
	font-size: 0.8125rem;
	color: #d4d4d8;
}

.ths-tower-color-row__label {
	flex-shrink: 0;
}

.ths-tower-mixed-attachment-color-swatches {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	flex-wrap: nowrap;
}

.ths-tower-mixed-attachment-color {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ths-tower-mixed-attachment-color:hover:not(:disabled) {
	border-color: rgba(255, 255, 255, 0.35);
}

.ths-tower-mixed-attachment-color.is-selected,
.ths-tower-mixed-attachment-color[aria-pressed='true'] {
	border-color: #eab308;
	box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.35);
}

.ths-tower-mixed-attachment-color:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.ths-tower-mixed-attachment-color__dot {
	display: block;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.25);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.ths-tower-quick-color-swatches {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
}

.ths-tower-quick-color {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 8px 6px;
	border: 2px solid transparent;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.04);
	color: #d4d4d8;
	font-size: 0.6875rem;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.ths-tower-quick-color:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.08);
}

.ths-tower-quick-color.is-selected,
.ths-tower-quick-color[aria-pressed='true'] {
	border-color: #eab308;
	background: rgba(234, 179, 8, 0.08);
}

.ths-tower-quick-color:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.ths-tower-quick-color__box {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	border-radius: 6px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.ths-tower-quick-color__label {
	text-align: center;
}

.ths-tower-mixed-colors .ths-tower-help {
	margin-bottom: 10px;
}

.ths-tower-colors input[type='color']:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.ths-tower-colors .ths-tower-color-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 0.8125rem;
	margin-bottom: 8px;
	color: #d4d4d8;
}

.ths-tower-colors input[type='color'] {
	width: 44px;
	height: 32px;
	padding: 0;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	background: transparent;
}
