/*
 * Gradient Button Generator ([gradient_button]). Loaded after tools.css; the
 * code boxes reuse its .gg-output styles. The demo button's look comes from
 * the live <style> tool-bt.js writes.
 */

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

.bt-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; }
.bt-stage[data-bg="light"] { background: #FFFFFF; }
.bt-stage[data-bg="dark"] { background: #0C0C11; }
.bt-demo { display: flex; align-items: center; justify-content: center; min-height: 300px; }
.bt-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); }
.bt-stage[data-bg="dark"] .bt-check, .bt-stage[data-bg="dark"] .bt-label-edit { color: #EDEDF2; }
.bt-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #333; cursor: pointer; }
.bt-check input { width: 16px; height: 16px; margin: 0; accent-color: #7B5CFF; }
.bt-label-edit { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #333; margin-left: auto; }
.bt-label-edit input { width: 150px !important; }

.bt-side { display: grid; gap: 14px; }
.bt-card { background: #fff; border: 1px solid #F0F0F0; border-radius: 24px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0, 0, 0, .04); }
.bt-card-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6E6E78; margin-bottom: 12px; }
.bt-card-title.bt-sub { margin-top: 4px; }

.bt-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: #F4F4F7; margin-bottom: 12px; }
.bt-seg-wrap { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); }
.bt-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; }
.bt-seg button[aria-pressed="true"] { background: #fff !important; color: #111 !important; box-shadow: 0 1px 3px rgba(0, 0, 0, .1) !important; }
.bt-stage-bar .bt-seg { margin: 0; }

.bt-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.bt-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; }
.bt-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.bt-row input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.bt-row input[type="text"] { flex: 1; min-width: 90px; font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace; text-transform: uppercase; }
#bt-add[hidden] { display: none !important; }
.bt-ink { margin: 8px 0 0; }
.bt-ink > span { font-size: 13px; font-weight: 600; color: #333; min-width: 40px; }
.bt-ink .bt-seg { flex: 1; margin: 0; }

.bt-slider { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.bt-slider label { min-width: 56px; font-size: 13px; font-weight: 600; color: #333; }
.bt-slider input { flex: 1; }
.bt-slider span { min-width: 44px; text-align: right; font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace; font-size: 13px; color: #55555F; }

.bt-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;
}
.bt-btn:hover { border-color: #111 !important; }
.bt-remove { width: 30px; height: 30px; padding: 0 !important; justify-content: center; }

.bt-outputs { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-bottom: 24px; align-items: start; }
.bt-out-side { display: grid; gap: 14px; }

@media (max-width: 860px) {
	.bt-layout, .bt-outputs { grid-template-columns: 1fr; }
	.bt-stage { position: static; }
	.bt-label-edit { margin-left: 0; }
}

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

.bt-ink-note { margin: 8px 0 0 !important; font-size: 12.5px; line-height: 1.5; color: #6E6E78; }
html[data-theme="dark"] .tg-tool .bt-ink-note { color: #9393A3 !important; }
