/*
 * Gradient Shadow Generator ([gradient_shadow]). Loaded after tools.css; the
 * code boxes reuse its .gg-output styles. The glow on the demo element comes
 * from the live <style> tool-sh.js writes.
 */

.sh-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }

.sh-stage { position: sticky; top: 96px; padding: 22px; border-radius: 28px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); transition: background .2s; }
.sh-stage[data-bg="light"] { background: #F4F4F7; }
.sh-stage[data-bg="dark"] { background: #0C0C11; }
.sh-demo { display: flex; align-items: center; justify-content: center; min-height: 380px; }
.sh-stage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding-top: 14px; border-top: 1px solid rgba(127, 127, 127, .18); }
.sh-stage[data-bg="dark"] .sh-check { color: #EDEDF2; }

/* Demo elements: they carry their own background, the glow sits behind */
.sh-el-card { display: flex; flex-direction: column; gap: 4px; width: 280px; padding: 24px 26px; background: #fff; color: #111; }
.sh-el-card strong { font-size: 18px; }
.sh-el-card span { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.sh-el-card p { margin: 8px 0 0 !important; font-size: 14px; color: #55555F !important; line-height: 1.5; }
.sh-stage[data-bg="dark"] .sh-el-card { background: #15151D; color: #EDEDF2; }
.sh-stage[data-bg="dark"] .sh-el-card p { color: #B9B9C6 !important; }
.sh-el-image { width: 300px; aspect-ratio: 4 / 3; background: linear-gradient(160deg, #1E293B, #334155 45%, #F59E0B 46%, #FDE68A 60%, #64748B 61%, #0F172A); }
.sh-el-button { display: inline-flex; align-items: center; padding: 15px 30px; background: #111; color: #fff; font-size: 16px; font-weight: 700; }
.sh-stage[data-bg="dark"] .sh-el-button { background: #fff; color: #111; }

.sh-side { display: grid; gap: 14px; }
.sh-card { background: #fff; border: 1px solid #F0F0F0; border-radius: 24px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0, 0, 0, .04); }
.sh-card-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6E6E78; margin-bottom: 12px; }
.sh-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: #F4F4F7; }
.sh-seg button { padding: 8px 4px !important; border: 0 !important; border-radius: 999px !important; background: transparent !important; font-size: 13px !important; font-weight: 600 !important; color: #45454F !important; cursor: pointer; box-shadow: none !important; }
.sh-seg button[aria-pressed="true"] { background: #fff !important; color: #111 !important; box-shadow: 0 1px 3px rgba(0, 0, 0, .1) !important; }

.sh-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.sh-row input[type="color"] { width: 40px !important; height: 40px !important; padding: 0 !important; border: 0 !important; border-radius: 12px !important; background: none !important; cursor: pointer; flex-shrink: 0; }
.sh-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.sh-row input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.sh-row input[type="text"] { flex: 1; min-width: 90px; font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace; text-transform: uppercase; }
#sh-add[hidden] { display: none !important; }

.sh-slider { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.sh-slider label { min-width: 64px; font-size: 13px; font-weight: 600; color: #333; }
.sh-slider input { flex: 1; }
.sh-slider span { min-width: 46px; text-align: right; font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace; font-size: 13px; color: #55555F; }
.sh-check { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; font-weight: 600; color: #333; cursor: pointer; }
.sh-stage-bar .sh-check { margin-top: 0; }
.sh-check input { width: 16px; height: 16px; margin: 0; accent-color: #7B5CFF; }

.sh-btn {
	display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px !important; margin: 0 !important;
	border: 1px solid #E2E2E8 !important; border-radius: 999px !important; background: #fff !important; color: #222 !important;
	font-size: 13px !important; font-weight: 600 !important; cursor: pointer; box-shadow: none !important;
}
.sh-btn:hover { border-color: #111 !important; }
.sh-btn .tg-i { width: 15px; height: 15px; }
.sh-remove { width: 30px; height: 30px; padding: 0 !important; justify-content: center; }

.sh-outputs { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-bottom: 24px; }

@media (max-width: 860px) {
	.sh-layout, .sh-outputs { grid-template-columns: 1fr; }
	.sh-stage { position: static; }
	.sh-demo { min-height: 300px; }
}

/* Dark mode (the stage keeps its own light/dark choice) */
html[data-theme="dark"] .tg-tool .sh-card { background: #15151D !important; border-color: rgba(255, 255, 255, .09) !important; }
html[data-theme="dark"] .tg-tool .sh-seg { background: #1D1D27 !important; }
html[data-theme="dark"] .tg-tool .sh-seg button { color: #B9B9C6 !important; }
html[data-theme="dark"] .tg-tool .sh-seg button[aria-pressed="true"] { background: #262633 !important; color: #EDEDF2 !important; }
html[data-theme="dark"] .tg-tool .sh-side .sh-check, html[data-theme="dark"] .tg-tool .sh-slider label { color: #EDEDF2 !important; }
html[data-theme="dark"] .tg-tool .sh-slider span { color: #9393A3 !important; }
html[data-theme="dark"] .tg-tool .sh-btn { background: #1D1D27 !important; border-color: rgba(255, 255, 255, .16) !important; color: #EDEDF2 !important; }
html[data-theme="dark"] .tg-tool .sh-stage[data-bg="light"] .sh-check { color: #333 !important; }
