/*
 * CSS Pattern Generator ([css_pattern]). Loaded after tools.css; the code
 * boxes reuse its .gg-output styles. The stage and the pattern thumbnails are
 * painted inline by tool-pt.js.
 */

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

.pt-stage { position: sticky; top: 96px; min-height: 460px; border-radius: 28px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }

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

.pt-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pt-types button {
	display: flex !important; flex-direction: column; align-items: stretch; gap: 6px; padding: 6px !important; margin: 0 !important;
	border: 1px solid #E6E6EC !important; border-radius: 16px !important; background: #fff !important; color: #333 !important;
	font-size: 12.5px !important; font-weight: 600 !important; cursor: pointer; box-shadow: none !important;
}
.pt-types button i { display: block; height: 44px; border-radius: 11px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.pt-types button span { padding-bottom: 2px; text-align: center; }
.pt-types button:hover { border-color: #111 !important; }
.pt-types button[aria-pressed="true"] { border-color: #111 !important; box-shadow: 0 0 0 1px #111 !important; color: #111 !important; }

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

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

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

.pt-outputs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
.pt-outputs pre { white-space: pre-wrap !important; word-break: break-all; }

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

/* Dark mode */
html[data-theme="dark"] .tg-tool .pt-card { background: #15151D !important; border-color: rgba(255, 255, 255, .09) !important; }
html[data-theme="dark"] .tg-tool .pt-slider label { color: #EDEDF2 !important; }
html[data-theme="dark"] .tg-tool .pt-slider span { color: #9393A3 !important; }
html[data-theme="dark"] .tg-tool .pt-btn, html[data-theme="dark"] .tg-tool .pt-types button { background: #1D1D27 !important; border-color: rgba(255, 255, 255, .16) !important; color: #EDEDF2 !important; }
html[data-theme="dark"] .tg-tool .pt-types button[aria-pressed="true"] { border-color: #EDEDF2 !important; box-shadow: 0 0 0 1px #EDEDF2 !important; }
