.shadow-tool-page{
	max-width: 72em;
	color: #122033;
}

.shadow-tool{
	display: grid;
	gap: 1em;
	color: #122033;
}

.shadow-tool h2,
.shadow-tool h3,
.shadow-tool p,
.shadow-tool span,
.shadow-tool strong,
.shadow-tool label{
	color: inherit;
}

.shadow-tool__toolbar{
	display: flex;
	flex-wrap: wrap;
	gap: 0.55em;
	align-items: center;
}

.shadow-tool__button{
	appearance: none;
	border: solid 1px rgba(96, 125, 159, 0.34);
	border-radius: 0.45em;
	background: #f7fafc;
	color: #14324a;
	padding: 0.55em 0.8em;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}

.shadow-tool__button:hover,
.shadow-tool__button:focus{
	border-color: #2563eb;
	background: #eff6ff;
	color: #0f3f8f;
}

.shadow-tool__button--primary{
	background: #2563eb;
	border-color: #2563eb;
	color: #ffffff;
}

.shadow-tool__button--primary:hover,
.shadow-tool__button--primary:focus{
	background: #1d4ed8;
	color: #ffffff;
}

.shadow-tool__layout{
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1em;
	align-items: stretch;
}

.shadow-tool__panel{
	display: grid;
	grid-template-rows: auto 1fr;
	border: solid 1px rgba(96, 125, 159, 0.28);
	border-radius: 0.6em;
	overflow: hidden;
	background: #ffffff;
}

.shadow-tool__panel-header{
	display: flex;
	justify-content: space-between;
	gap: 1em;
	align-items: center;
	padding: 0.65em 0.8em;
	background: #eef5ff;
	border-bottom: solid 1px rgba(96, 125, 159, 0.22);
	color: #123963;
	font-weight: 700;
}

.shadow-tool__panel-header h2,
.shadow-tool__panel-header h3{
	margin: 0;
	font-size: 1em;
	line-height: 1.2;
}

.shadow-tool__meta{
	color: #64748b;
	font-size: 0.84em;
	font-weight: 500;
}

.shadow-tool__form{
	display: grid;
	gap: 0.55em;
	padding: 0.65em;
}

.shadow-tool__form label{
	display: grid;
	gap: 0.22em;
	font-weight: 700;
}

.shadow-color-control__inputs{
	display: grid;
	grid-template-columns: 3.5em minmax(0, 1fr);
	gap: 0.45em;
	align-items: center;
}

.shadow-number-control{
	display: grid;
	grid-template-columns: minmax(8em, 1fr) 4.2em 2.2em;
	gap: 0.4em;
	align-items: center;
}

.shadow-number-control--plain{
	grid-template-columns: minmax(8em, 1fr) 4.2em;
}

.shadow-number-control--plain strong{
	display: none;
}

.shadow-tool__form input{
	width: 100%;
	border: solid 1px rgba(96, 125, 159, 0.32);
	border-radius: 0.45em;
	background: #fbfdff;
	color: #122033;
	padding: 0.42em 0.55em;
}

.shadow-tool__form input[type="range"]{
	padding: 0;
}

.shadow-tool__form input[type="color"]{
	min-height: 2.35em;
	padding: 0.2em;
}

.shadow-tool__form input[type="number"]{
	min-height: 2.2em;
	text-align: left;
	padding-inline: 0.55em 0.25em;
}

.shadow-tool__form input[aria-invalid="true"]{
	border-color: #dc2626;
	box-shadow: 0 0 0 0.16em rgba(220, 38, 38, 0.16);
}

.shadow-tool__form .shadow-tool__check{
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	gap: 0.5em;
	border: solid 1px rgba(96, 125, 159, 0.22);
	border-radius: 0.45em;
	background: #f8fafc;
	padding: 0.45em 0.55em;
}

.shadow-tool__form .shadow-tool__check input{
	width: auto;
	margin: 0;
	flex: 0 0 auto;
}

.shadow-tool__preview{
	display: grid;
	place-items: center;
	align-content: center;
	gap: 1.5em;
	min-height: 24em;
	padding: 2em;
	background: #f8fafc;
}

.shadow-tool__text-sample{
	display: block;
	color: #122033;
	font-size: 2em;
	font-weight: 900;
	line-height: 1.1;
	text-align: center;
}

.shadow-tool__sample{
	display: grid;
	place-items: center;
	align-content: center;
	gap: 0.35em;
	width: min(18em, 82%);
	aspect-ratio: 1.5;
	border: solid 1px rgba(96, 125, 159, 0.2);
	border-radius: 0.9em;
	background: #ffffff;
	color: #122033;
	text-align: center;
}

.shadow-tool__sample strong{
	font-size: 1.35em;
}

.shadow-tool__sample span{
	color: #64748b;
	font-weight: 700;
}

.shadow-presets{
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75em;
	padding: 0.85em;
}

.shadow-preset{
	display: grid;
	gap: 0.6em;
	border: solid 1px rgba(96, 125, 159, 0.24);
	border-radius: 0.55em;
	background: #f8fafc;
	color: #122033;
	padding: 0.8em;
	text-align: left;
	cursor: pointer;
}

.shadow-preset:hover,
.shadow-preset:focus{
	border-color: #2563eb;
	background: #eff6ff;
}

.shadow-preset__sample{
	display: grid;
	place-items: center;
	min-height: 7.2em;
	padding: 1.35em;
	border: solid 1px rgba(96, 125, 159, 0.18);
	border-radius: 0.5em;
	background: linear-gradient(90deg, #f8fafc 0%, #f8fafc 49%, #111827 51%, #111827 100%);
	overflow: hidden;
}

.shadow-preset__sample::before{
	content: "";
	display: block;
	width: min(12em, 86%);
	height: 3.2em;
	border: solid 1px rgba(15, 23, 42, 0.08);
	border-radius: 0.45em;
	background: #ffffff;
	box-shadow: var(--preset-shadow, none);
}

.shadow-preset strong{
	color: #122033;
	font-size: 0.95em;
}

.shadow-preset span{
	color: #64748b;
	font-size: 0.82em;
}

.shadow-tool__output{
	margin: 0;
	padding: 1em;
	min-height: 8em;
	overflow: auto;
	background: #111827;
	color: #d1d5db;
	font: 0.92em/1.55 Consolas, "Courier New", monospace;
}

.shadow-tool__output code{
	background: transparent;
	color: inherit;
	border: 0;
	padding: 0;
	white-space: pre;
}

.shadow-tool__status{
	display: flex;
	flex-wrap: wrap;
	gap: 0.65em;
	align-items: center;
	min-height: 2.8em;
	padding: 0.7em 0.85em;
	border: solid 1px rgba(96, 125, 159, 0.28);
	border-radius: 0.55em;
	background: #f8fafc;
	color: #475569;
}

.shadow-tool__status.is-valid{
	border-color: rgba(22, 163, 74, 0.35);
	background: #f0fdf4;
	color: #166534;
}

.shadow-tool__status.is-invalid{
	border-color: rgba(220, 38, 38, 0.38);
	background: #fef2f2;
	color: #991b1b;
}

.shadow-tool__status strong{
	color: inherit;
}

.dark .shadow-tool-page,
.dark .shadow-tool{
	color: #e5e7eb;
}

.dark .shadow-tool__button{
	background: #1f2937;
	border-color: rgba(148, 163, 184, 0.28);
	color: #e5e7eb;
}

.dark .shadow-tool__button:hover,
.dark .shadow-tool__button:focus{
	background: #172554;
	border-color: #60a5fa;
	color: #ffffff;
}

.dark .shadow-tool__button--primary{
	background: #2563eb;
	border-color: #60a5fa;
	color: #ffffff;
}

.dark .shadow-tool__panel,
.dark .shadow-preset{
	background: #111827;
	border-color: rgba(148, 163, 184, 0.22);
	color: #e5e7eb;
}

.dark .shadow-tool__panel-header{
	background: #1f2937;
	border-bottom-color: rgba(148, 163, 184, 0.2);
	color: #dbeafe;
}

.dark .shadow-tool__form input,
.dark .shadow-tool__check{
	background: #0f172a;
	border-color: rgba(148, 163, 184, 0.28);
	color: #e5e7eb;
}

.dark .shadow-tool__meta,
.dark .shadow-tool__sample span,
.dark .shadow-preset span{
	color: rgba(229, 231, 235, 0.68);
}

.dark .shadow-tool__preview{
	background: #0f172a;
}

.dark .shadow-tool__sample,
.dark .shadow-preset__sample{
	border-color: rgba(148, 163, 184, 0.24);
	color: #ffffff;
}

.dark .shadow-tool__text-sample{
	color: #ffffff;
}

.dark .shadow-preset__sample{
	background: linear-gradient(90deg, #f8fafc 0%, #f8fafc 49%, #0b1220 51%, #0b1220 100%);
}

.dark .shadow-preset strong{
	color: #e5e7eb;
}

.dark .shadow-tool__output{
	background: #0b1220;
	color: #d1d5db;
}

.dark .shadow-tool__status{
	background: #111827;
	border-color: rgba(148, 163, 184, 0.22);
	color: #d1d5db;
}

.dark .shadow-tool__status.is-valid{
	background: #052e16;
	color: #bbf7d0;
}

.dark .shadow-tool__status.is-invalid{
	background: #450a0a;
	color: #fecaca;
}

@media (max-width: 900px){
	.shadow-tool__layout,
	.shadow-presets{
		grid-template-columns: 1fr;
	}

	.shadow-tool__preview{
		min-height: 18em;
	}

	.shadow-number-control{
		grid-template-columns: minmax(0, 1fr) 4em 2em;
	}

	.shadow-number-control--plain{
		grid-template-columns: minmax(0, 1fr) 4em;
	}
}
