/* MentorsBoss — UTM Builder tool styles
 * Loaded only on /tools/utm-builder/ (see functions.php).
 * Scoped under .ub-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.
 */

.ub-tool{
	background:linear-gradient(135deg,var(--navy) 0%,var(--navy3) 55%,#241056 100%);
	border-radius:18px;
	padding:28px;
	color:#DBE2F5;
}
.ub-tool h2{color:#fff}
.ub-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px;padding:0;list-style:none}
.ub-tab{
	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;
}
.ub-tab:hover{border-color:#fff;color:#fff}
.ub-tab-active{background:var(--gold);border-color:var(--gold);color:var(--navy2)}
.ub-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). */
.ub-form-card,.ub-output{min-width:0}
.ub-output{position:sticky;top:84px;align-self:start}
.ub-form-card{
	background:#fff;color:var(--ink);border-radius:14px;padding:22px;
	box-shadow:0 18px 40px rgba(6,13,36,.35);
}
.ub-form-card .ub-label{color:var(--navy)}
.ub-field{margin-bottom:16px}
.ub-label{display:block;font-size:14px;font-weight:700;color:var(--navy);margin-bottom:6px}
.ub-req{color:#B91C1C}
.ub-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;
}
.ub-input:focus{outline:2px solid var(--violet);outline-offset:1px;border-color:var(--violet)}
textarea.ub-input{resize:vertical;min-height:84px;line-height:1.5}
.ub-hint{font-size:13px;color:var(--ink-soft);margin:5px 0 0;line-height:1.45}
.ub-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.ub-chip{
	font:inherit;font-size:13px;font-weight:700;color:var(--violet-d);
	background:var(--violet-100);border:1px solid #DDD6FE;border-radius:999px;
	padding:5px 11px;min-height:30px;cursor:pointer;
	transition:background .15s,color .15s;
}
.ub-chip:hover{background:var(--violet);color:#fff;border-color:var(--violet)}
.ub-advanced{
	border:1px solid var(--line);border-radius:12px;padding:0 16px 16px;margin:0 0 4px;
}
.ub-advanced summary{
	font-size:14px;font-weight:800;color:var(--violet-d);cursor:pointer;
	padding:14px 0 4px;list-style-position:inside;
}
.ub-advanced .ub-field:last-child{margin-bottom:0}
.ub-output{display:grid;gap:16px}
/* QC fix round 2 (25 Nov 2026): min-width:0 on .ub-output only holds
   the panel inside its 360px track in the OUTER grid. The panel is
   itself display:grid, and its implicit column is `auto` — auto
   columns size to their widest min-content child and spill past the
   panel. Reproduced in Chromium: the panel box is 360px, but the
   cards render 894px wide. The trigger is the history button: one
   nowrap run of a full tagged URL (~850px min-content); the 555px QR
   canvas is a second contributor. Fix: a definite minmax(0,1fr)
   inner column, min-width:0 on every card, and the same treatment
   for the history and warnings lists — the history button already
   ellipsises, it just never had a width to ellipsise against. */
.ub-output{grid-template-columns:minmax(0,1fr)}
.ub-output>*{min-width:0}
.ub-history{grid-template-columns:minmax(0,1fr)}
.ub-history>li,.ub-history-item{min-width:0}
.ub-warnings{grid-template-columns:minmax(0,1fr)}
.ub-warnings li{min-width:0}
.ub-preview{min-width:0}
.ub-qr-card canvas{min-width:0}
.ub-channel-card{
	background:#fff;color:var(--ink);border-radius:14px;padding:18px 20px;
	box-shadow:0 18px 40px rgba(6,13,36,.35);
}
.ub-channel-card h3{color:var(--navy);font-size:15px;margin:0 0 6px}
.ub-channel{font-size:20px;font-weight:800;color:var(--violet-d);margin:0 0 4px}
.ub-channel-reason{font-size:13.5px;color:var(--ink-soft);margin:0;line-height:1.55}
.ub-warnings{
	list-style:none;margin:0;padding:0;display:grid;gap:8px;font-size:14px;line-height:1.55;
}
.ub-warnings li{border-radius:10px;padding:10px 12px}
.ub-warn{background:var(--gold-100);color:#78350F;font-weight:600}
.ub-info{background:var(--violet-100);color:var(--navy)}
.ub-ok{background:#E7F6EE;color:var(--green);font-weight:600}
.ub-preview-card{background:var(--navy2);border-radius:14px;padding:18px 20px;box-shadow:0 18px 40px rgba(6,13,36,.35)}
.ub-preview-card h3{color:#fff;font-size:15px;margin:0 0 12px}
.ub-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-wrap;word-break:break-all;overflow:auto;max-height:220px;
}
.ub-md-row{display:flex;gap:8px;margin-top:12px}
.ub-md-row .ub-input{
	background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.25);color:#fff;
	min-height:40px;
}
.ub-md-row .ub-input::placeholder{color:#93A3C9}
.ub-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.ub-actions .btn{flex:1 1 auto}
/* QC fix (25 Nov 2026): the theme's .btn-ghost is dark navy text for
   LIGHT backgrounds — inside the dark preview card it was dark-on-dark.
   Light ghost styling for the Share button on dark surfaces. */
.ub-actions .btn-ghost{color:#DBE2F5;border-color:rgba(255,255,255,.45);background:rgba(255,255,255,.06)}
.ub-actions .btn-ghost:hover{border-color:#fff;color:#fff;background:rgba(255,255,255,.12)}
.ub-share-note{font-size:13.5px;color:#AEBADD;line-height:1.6;margin:0}
.ub-qr-card{
	background:#fff;color:var(--ink);border-radius:14px;padding:18px 20px;
	box-shadow:0 18px 40px rgba(6,13,36,.35);text-align:center;
}
.ub-qr-card h3{color:var(--navy);font-size:15px;margin:0 0 12px;text-align:left}
.ub-qr-card canvas{display:block;margin:0 auto 12px;border-radius:8px;max-width:100%;height:auto}
.ub-qr-note{font-size:13.5px;color:var(--ink-soft);margin:0 0 12px;line-height:1.55}
.ub-history-card{
	background:#fff;color:var(--ink);border-radius:14px;padding:18px 20px;
	box-shadow:0 18px 40px rgba(6,13,36,.35);
}
.ub-history-card h3{color:var(--navy);font-size:15px;margin:0 0 10px}
.ub-history{list-style:none;margin:0 0 10px;padding:0;display:grid;gap:6px}
.ub-history-item{
	width:100%;text-align:left;font:inherit;font-size:13.5px;color:var(--violet-d);
	background:var(--violet-100);border:1px solid #DDD6FE;border-radius:8px;
	padding:8px 10px;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.ub-history-item:hover{background:var(--violet);color:#fff;border-color:var(--violet)}
.ub-history-empty{font-size:13.5px;color:var(--ink-soft);line-height:1.55}
.ub-history-clear{
	font:inherit;font-size:13.5px;font-weight:700;color:#B91C1C;
	background:none;border:0;cursor:pointer;padding:4px 0;min-height:32px;
}
.ub-bulk-text{min-height:180px;font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}
.ub-bulk-results{display:grid;gap:10px;margin-top:16px}
.ub-bulk-row{
	background:#fff;color:var(--ink);border-radius:12px;padding:14px 16px;
	display:grid;gap:6px;box-shadow:0 18px 40px rgba(6,13,36,.35);
}
.ub-bulk-src{font-size:14px;font-weight:700;color:var(--navy);word-break:break-all}
.ub-bulk-out{
	font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;
	font-size:12.5px;color:var(--ink-soft);word-break:break-all;line-height:1.5;
}
.ub-bulk-bad .ub-bulk-out{color:#B91C1C;font-weight:700;font-family:inherit;font-size:13.5px}
.ub-bulk-copy{
	justify-self:start;font:inherit;font-size:13.5px;font-weight:700;color:var(--violet-d);
	background:var(--violet-100);border:1px solid #DDD6FE;border-radius:999px;
	padding:6px 14px;min-height:32px;cursor:pointer;
}
.ub-bulk-copy:hover{background:var(--violet);color:#fff}
/* QC fix (25 Nov 2026): this note sits inside the WHITE form card, so
   it needs dark text — the pale #DBE2F5 was a dark-panel colour and was
   barely legible on white. It is a status line (JS updates it with the
   build result), not a second format hint. */
.ub-bulk-note{font-size:14px;color:var(--ink-soft);line-height:1.55;margin:14px 0 0}
.ub-bulk-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.ub-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.ub-guide-list{margin:0 0 16px;padding-left:20px;color:var(--ink-soft);font-size:16px;line-height:1.7}
.ub-guide-list li{margin-bottom:8px}
.ub-guide-list li::marker{color:var(--violet)}
.ub-guide-list b{color:var(--ink)}

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