/* Color Screen Tool - frontend styles (v1.2.0, whitescreen.dev-style) */

.cst-wrap {
	max-width: 900px;
	margin: 0 auto;
	text-align: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
	color: #1d1d1f;
}

.cst-wrap *,
.cst-wrap *::before,
.cst-wrap *::after {
	box-sizing: border-box;
}

/* Colored surface */
.cst-screen {
	position: relative;
	width: 100%;
	min-height: 160px;
	border-radius: 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.15s ease;
}

.cst-screen:focus-visible {
	outline: 3px solid #006ce0;
	outline-offset: 3px;
}

.cst-hint {
	pointer-events: none;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.01em;
	padding: 9px 18px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.42);
	color: #fff;
	opacity: 0.9;
}

/* True fullscreen */
.cst-screen:fullscreen,
.cst-screen:-webkit-full-screen {
	border-radius: 0;
	width: 100vw;
	height: 100vh;
	cursor: none;
}

.cst-screen:fullscreen .cst-hint,
.cst-screen.cst-is-fs .cst-hint {
	display: none;
}

/* Faux fullscreen fallback */
.cst-screen.cst-is-fs {
	position: fixed;
	inset: 0;
	width: 100vw !important;
	height: 100vh !important;
	border-radius: 0;
	z-index: 999999;
}

/* Exit button */
.cst-exit {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.4);
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s ease;
	padding: 0;
}

.cst-screen:fullscreen .cst-exit,
.cst-screen.cst-is-fs .cst-exit {
	display: flex;
	opacity: 0.5;
}

.cst-screen:fullscreen:hover .cst-exit,
.cst-screen.cst-is-fs:hover .cst-exit,
.cst-exit:focus {
	opacity: 1;
}

/* Controls: stacked and centered, like whitescreen.dev */
.cst-controls {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	padding: 22px 4px 4px;
}

.cst-title {
	font-size: 30px;
	font-weight: 700;
	margin: 0;
	color: inherit;
}

.cst-swatches {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.cst-swatch {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 2px solid rgba(128, 128, 128, 0.3);
	cursor: pointer;
	padding: 0;
	transition: transform 0.1s ease;
}

.cst-swatch:hover,
.cst-swatch:focus-visible {
	transform: scale(1.15);
	outline: none;
}

.cst-picker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.cst-picker input[type="color"] {
	width: 38px;
	height: 32px;
	border: 1px solid rgba(128, 128, 128, 0.4);
	border-radius: 8px;
	padding: 0;
	cursor: pointer;
	background: none;
}

/* Resolution list - clean centered row of text options */
.cst-res {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 22px;
}

.cst-res-btn {
	font-size: 15px;
	font-weight: 600;
	padding: 4px 2px;
	border: none;
	background: none;
	color: #6b6b70;
	cursor: pointer;
	position: relative;
	transition: color 0.12s ease;
}

.cst-res-btn:hover {
	color: #1d1d1f;
}

.cst-res-btn.is-active {
	color: #006ce0;
}

.cst-res-btn.is-active::before {
	content: "\2022";
	margin-right: 6px;
	color: #006ce0;
}

.cst-custom-size {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: #6b6b70;
}

.cst-custom-size input {
	width: 92px;
	padding: 9px 10px;
	border: 1px solid rgba(128, 128, 128, 0.35);
	border-radius: 8px;
	font-size: 14px;
	text-align: center;
	background: transparent;
	color: inherit;
}

.cst-custom-size .cst-unit {
	color: #9a9aa0;
}

.cst-download {
	font-size: 16px;
	font-weight: 700;
	padding: 13px 46px;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	color: #fff;
	background: #006ce0;
	transition: background 0.12s ease, transform 0.08s ease;
}

.cst-download:hover {
	background: #0059b8;
}

.cst-download:active {
	transform: scale(0.98);
}

/* Secondary fullscreen link, understated like the reference */
.cst-go-fs {
	font-size: 14px;
	font-weight: 600;
	padding: 4px 8px;
	border: none;
	background: none;
	color: #6b6b70;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.cst-go-fs:hover {
	color: #1d1d1f;
}

@media (max-width: 600px) {
	.cst-title { font-size: 24px; }
	.cst-download { width: 100%; }
}

/* Active swatch indicator */
.cst-swatch.is-active {
	border-color: #006ce0;
	box-shadow: 0 0 0 3px rgba(0, 108, 224, 0.35);
}
a.cst-swatch {
	display: inline-block;
	text-decoration: none;
}

/* Hub grid ([color_screens]) */
.cst-hub {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 14px;
	max-width: 900px;
	margin: 0 auto;
}
.cst-hub-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border: 1px solid rgba(128, 128, 128, 0.25);
	border-radius: 12px;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.12s ease, transform 0.08s ease;
}
.cst-hub-item:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
	transform: translateY(-1px);
}
.cst-hub-swatch {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.15);
	flex: 0 0 auto;
}
.cst-hub-label {
	font-size: 15px;
	font-weight: 600;
}
