/* MentorsBoss — Schema Generator tool styles
 * Loaded only on /tools/schema-generator/ (see functions.php).
 * Scoped under .sg-tool. Uses the theme's own variables
 * (--navy, --violet, --gold, --ink, --line, --mist) so the tool
 * stays in step with the rest of the site. No new dependency.
 */

.sg-tool{
	background:linear-gradient(135deg,var(--navy) 0%,var(--navy3) 55%,#241056 100%);
	border-radius:18px;
	padding:28px;
	color:#DBE2F5;
}
.sg-tool h2{color:#fff}
.sg-types{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px;padding:0;list-style:none}
.sg-type{
	font:inherit;font-size:14px;font-weight:700;color:#DBE2F5;
	background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.22);
	border-radius:999px;padding:9px 15px;min-height:40px;cursor:pointer;
	transition:background .15s,color .15s,border-color .15s;
}
.sg-type:hover{border-color:#fff;color:#fff}
.sg-type-active{background:var(--gold);border-color:var(--gold);color:var(--navy2)}
.sg-note{
	background:var(--violet-100);color:var(--navy);
	border:1px solid #DDD6FE;border-radius:12px;
	padding:14px 16px;font-size:14.5px;line-height:1.55;margin:0 0 18px;
}
.sg-note-warn{background:var(--gold-100);border-color:var(--gold);color:#78350F}
.sg-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:20px;align-items:start}
/* QC fix (25 Nov 2026): the output column must never leave its 360px
   grid track. min-width:0 stops grid-item min-content blowout from
   pushing the column wider than its track; position:sticky keeps the
   panel visible while the long form scrolls AND constrains it to its
   grid area, so it cannot drift outside the dark container. top:84px
   matches the theme's other sticky elements (.rail, .toc-card). */
.sg-form-card,.sg-output{min-width:0}
.sg-output{position:sticky;top:84px;align-self:start}
.sg-form-card{
	background:#fff;color:var(--ink);border-radius:14px;padding:22px;
	box-shadow:0 18px 40px rgba(6,13,36,.35);
}
.sg-form-card .sg-label{color:var(--navy)}
.sg-field{margin-bottom:16px}
.sg-label{display:block;font-size:14px;font-weight:700;color:var(--navy);margin-bottom:6px}
.sg-req{color:#B91C1C}
.sg-rec{font-weight:600;color:var(--ink-soft);font-size:12.5px}
.sg-input{
	width:100%;font:inherit;font-size:15px;color:var(--ink);
	background:#fff;border:1px solid var(--line);border-radius:8px;
	padding:10px 12px;min-height:44px;
}
.sg-input:focus{outline:2px solid var(--violet);outline-offset:1px;border-color:var(--violet)}
textarea.sg-input{resize:vertical;min-height:84px;line-height:1.5}
.sg-hint{font-size:13px;color:var(--ink-soft);margin:5px 0 0;line-height:1.45}
.sg-error{font-size:13.5px;color:#B91C1C;margin:5px 0 0;font-weight:600}
.sg-invalid .sg-input{border-color:#B91C1C}
.sg-group{border:1px solid var(--line);border-radius:12px;padding:18px;margin:0 0 18px}
.sg-group-title{font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--violet-d);padding:0 8px}
.sg-repeat{margin-bottom:18px}
.sg-repeat-head{margin-bottom:10px}
.sg-repeat-row{
	border:1px solid var(--line);border-radius:12px;padding:16px;
	margin-bottom:12px;background:var(--mist);
}
.sg-repeat-row .sg-field:last-child{margin-bottom:0}
.sg-row-remove{
	font:inherit;font-size:13.5px;font-weight:700;color:#B91C1C;
	background:none;border:0;cursor:pointer;padding:6px 0;min-height:32px;
}
.sg-add{margin-top:2px}
.sg-output{display:grid;gap:16px}
/* QC fix round 2 (25 Nov 2026): same inner-column defect as the UTM
   panel — .sg-output is display:grid with an implicit `auto`
   column, which sizes to its widest min-content child and spills
   past the 360px track. The panel only looked fixed because it was
   measured EMPTY; reproduced in Chromium with a filled form: the
   panel box is 360px but the cards render 883px wide, driven by the
   preview <pre> (white-space:pre, long unbreakable JSON lines).
   Definite minmax(0,1fr) inner column + min-width:0 on every card,
   so long lines scroll inside the preview instead of pushing the
   panel wider. */
.sg-output{grid-template-columns:minmax(0,1fr)}
.sg-output>*{min-width:0}
.sg-check-list{grid-template-columns:minmax(0,1fr)}
.sg-check-list li{min-width:0}
.sg-preview{min-width:0}
.sg-checklist{
	background:#fff;color:var(--ink);border-radius:14px;padding:18px 20px;
	box-shadow:0 18px 40px rgba(6,13,36,.35);
}
.sg-check-title{font-size:15px;font-weight:800;color:var(--navy);margin:0 0 10px}
.sg-check-list{list-style:none;margin:0 0 6px;padding:0;display:grid;gap:5px;font-size:14px}
.sg-check-list .sg-ok{color:var(--green);font-weight:600}
.sg-check-list .sg-missing{color:#B91C1C;font-weight:600}
.sg-check-rec{font-size:13.5px;color:var(--ink-soft);margin:8px 0 0}
.sg-check-warn{font-size:13.5px;color:#B45309;font-weight:700;margin:8px 0 0}
.sg-preview-card{background:var(--navy2);border-radius:14px;padding:18px 20px;box-shadow:0 18px 40px rgba(6,13,36,.35)}
.sg-preview-card h3{color:#fff;font-size:15px;margin:0 0 12px}
.sg-preview{
	font-family:"JetBrains Mono",ui-monospace,"SF Mono","Cascadia Mono",Menlo,Consolas,monospace;
	font-size:12.5px;line-height:1.6;color:#D8CCFF;background:transparent;
	border:0;margin:0;padding:0;white-space:pre;overflow:auto;max-height:420px;
}
.sg-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.sg-actions .btn{flex:1 1 auto}
/* QC fix (25 Nov 2026): the theme's .btn-ghost is dark navy text for
   LIGHT backgrounds — on the dark tool gradient it was dark-on-dark.
   Light ghost styling for the Share button on dark surfaces. */
.sg-actions .btn-ghost{color:#DBE2F5;border-color:rgba(255,255,255,.45);background:rgba(255,255,255,.06)}
.sg-actions .btn-ghost:hover{border-color:#fff;color:#fff;background:rgba(255,255,255,.12)}
.sg-wrap-toggle{display:flex;align-items:center;gap:8px;font-size:14px;color:#DBE2F5;cursor:pointer}
.sg-wrap-toggle input{width:18px;height:18px;accent-color:var(--gold)}
.sg-validators{font-size:13.5px;color:#AEBADD;line-height:1.6}
.sg-validators a{color:#D8CCFF}
.sg-validators a:hover{color:#fff}
.sg-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.sg-guide-list{margin:0 0 16px;padding-left:20px;color:var(--ink-soft);font-size:16px;line-height:1.7}
.sg-guide-list li{margin-bottom:8px}
.sg-guide-list li::marker{color:var(--violet)}
.sg-guide-list b{color:var(--ink)}

@media (max-width:900px){
	.sg-layout{grid-template-columns:1fr}
	.sg-output{position:static}
	.sg-tool{padding:20px 16px}
	.sg-form-card{padding:18px 16px}
}
