/* MentorsBoss — XML Sitemap Generator tool styles
 * Loaded only on /tools/xml-sitemap-generator/ (see
 * functions.php). Scoped under .xs-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.
 */

/* Layout (25 Nov 2026): form card + 360px output panel in a grid
   (minmax(0,1fr) 360px). The panel gets a DEFINITE inner column
   (grid-template-columns:minmax(0,1fr)) and min-width:0 on the panel
   and every card inside it — learned the hard way on the Schema
   Generator and UTM Builder: an `auto` inner column sizes to its
   widest min-content child (a long URL, a long filename) and spills
   past 360px. Long content must ellipsise or scroll internally,
   never push a card wider. The per-URL status table and the XML
   preview are deliberately NOT in the panel — they are full-width
   sections below the tool, because a table of long URLs can never
   fit 360px. */
.xs-tool{
	background:linear-gradient(135deg,var(--navy) 0%,var(--navy3) 55%,#241056 100%);
	border-radius:18px;
	padding:28px;
	color:#DBE2F5;
}
.xs-tool h2{color:#fff}
.xs-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:20px;align-items:start}
.xs-form-card,.xs-output{min-width:0}
.xs-output{position:sticky;top:84px;align-self:start}
.xs-form-card{
	background:#fff;color:var(--ink);border-radius:14px;padding:22px;
	box-shadow:0 18px 40px rgba(6,13,36,.35);
}
.xs-field{margin-bottom:16px}
.xs-label{display:block;font-size:14px;font-weight:700;color:var(--navy);margin-bottom:6px}
.xs-req{color:#B91C1C}
.xs-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;
}
.xs-input:focus{outline:2px solid var(--violet);outline-offset:1px;border-color:var(--violet)}
textarea.xs-input{resize:vertical;min-height:200px;line-height:1.5;font-size:14px}
select.xs-input{cursor:pointer}
.xs-hint{font-size:13px;color:var(--ink-soft);margin:5px 0 0;line-height:1.45}
.xs-hint code{
	font-family:"JetBrains Mono",ui-monospace,"SF Mono","Cascadia Mono",Menlo,Consolas,monospace;
	font-size:12px;background:var(--mist);border-radius:4px;padding:1px 5px;
}
.xs-error{
	display:none;font-size:14px;line-height:1.55;font-weight:600;
	background:#FDECEC;color:#991B1B;border-radius:10px;
	padding:10px 12px;margin:0 0 16px;
}
.xs-note{
	font-size:13.5px;color:var(--ink-soft);line-height:1.6;margin:0;
	background:var(--gold-100);border:1px solid #FDE68A;border-radius:10px;padding:10px 12px;
}
.xs-note b{color:var(--ink)}
.xs-note a{color:var(--violet-d);font-weight:700;text-decoration:none}
.xs-controls{
	display:grid;grid-template-columns:1fr 1fr;gap:0 16px;
	border-top:1px solid var(--line);margin-top:18px;padding-top:16px;
}
.xs-controls .xs-field{margin-bottom:14px}
.xs-check-row{display:flex;flex-wrap:wrap;gap:6px 18px;margin:0 0 14px}
.xs-check{
	display:flex;align-items:center;gap:7px;font-size:13.5px;font-weight:600;color:var(--navy);
	cursor:pointer;
}
.xs-check input{width:18px;height:18px;accent-color:var(--violet);cursor:pointer}
.xs-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:4px}
.xs-actions .btn{flex:1 1 auto}
.xs-file-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.xs-file-note,.xs-fetch-note{font-size:13px;color:var(--ink-soft);line-height:1.5;margin:6px 0 0}
.xs-fetch-row{display:flex;gap:10px}
.xs-fetch-row .xs-input{flex:1 1 auto;min-width:0}
.xs-fetch-row .btn{flex:0 0 auto}
.xs-output{display:grid;gap:16px;grid-template-columns:minmax(0,1fr)}
.xs-output>*{min-width:0}
.xs-out-card{background:var(--navy2);border-radius:14px;padding:18px 20px;box-shadow:0 18px 40px rgba(6,13,36,.35)}
.xs-out-card h3{color:#fff;font-size:15px;margin:0 0 12px}
.xs-out-card p{font-size:13.5px;color:#AEBADD;line-height:1.6;margin:0 0 10px}
.xs-out-card p:last-child{margin-bottom:0}
.xs-stats-list{margin:0;display:grid;gap:8px}
.xs-stats-list>div{
	display:flex;justify-content:space-between;gap:12px;
	font-size:13.5px;line-height:1.45;
}
.xs-stats-list dt{color:#AEBADD}
.xs-stats-list dd{margin:0;color:#fff;font-weight:700;text-align:right;white-space:nowrap}
.xs-check-list{margin:0;padding-left:0;list-style:none;display:grid;gap:8px}
.xs-check-list li{font-size:13.5px;color:#AEBADD;line-height:1.55;word-break:break-word}
.xs-check-list li b{color:#fff}
.xs-check-list li.xs-ok::before{content:"✓ ";color:#34D399;font-weight:800}
.xs-check-list li.xs-bad::before{content:"✕ ";color:#F87171;font-weight:800}
.xs-out-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.xs-out-actions .btn{flex:1 1 auto}
/* The theme's .btn-ghost is dark navy text for LIGHT backgrounds —
   inside the dark output card it would be dark-on-dark. Light ghost
   styling for buttons on dark surfaces (same fix as the UTM Builder
   and the Review Link Generator). */
.xs-out-card .btn-ghost{color:#DBE2F5;border-color:rgba(255,255,255,.45);background:rgba(255,255,255,.06)}
.xs-out-card .btn-ghost:hover{border-color:#fff;color:#fff;background:rgba(255,255,255,.12)}
.xs-part-list{margin:10px 0 0;padding:0;list-style:none;display:grid;gap:8px}
.xs-part-btn{
	width:100%;font:inherit;font-size:13.5px;font-weight:700;text-align:left;
	color:#fff;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.25);
	border-radius:8px;padding:9px 12px;cursor:pointer;word-break:break-all;
}
.xs-part-btn:hover{background:rgba(255,255,255,.16);border-color:#fff}
.xs-part-btn.xs-part-index{border-color:var(--gold);color:#FDE68A}
.xs-invalid-list{margin:0;padding-left:20px;color:var(--ink-soft);font-size:14px;line-height:1.6}
.xs-invalid-list li{margin-bottom:6px;word-break:break-word}
.xs-invalid-list li::marker{color:#B91C1C}
.xs-preview-wrap{
	background:#fff;color:var(--ink);border-radius:14px;padding:18px 20px;
	box-shadow:0 18px 40px rgba(6,13,36,.35);border:1px solid var(--line);
}
.xs-preview{
	font-family:"JetBrains Mono",ui-monospace,"SF Mono","Cascadia Mono",Menlo,Consolas,monospace;
	font-size:12.5px;line-height:1.6;color:var(--navy);background:var(--mist);
	border:1px solid var(--line);border-radius:8px;margin:0;padding:14px;
	white-space:pre;overflow:auto;max-height:420px;min-width:0;
}
.xs-preview-note{font-size:13px;color:var(--ink-soft);margin:10px 0 0;line-height:1.5}
.xs-status-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:14px;background:#fff}
table.xs-status-table{width:100%;min-width:640px;border-collapse:collapse;font-size:14px}
.xs-status-table th,.xs-status-table td{
	text-align:left;padding:10px 12px;border-bottom:1px solid var(--line);vertical-align:top;
}
.xs-status-table th{font-size:12.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--ink-soft);background:var(--mist)}
.xs-status-table tr:last-child td{border-bottom:0}
.xs-status-url{
	max-width:420px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
	font-family:"JetBrains Mono",ui-monospace,"SF Mono","Cascadia Mono",Menlo,Consolas,monospace;
	font-size:12.5px;
}
.xs-badge{
	display:inline-block;font-size:12px;font-weight:800;white-space:nowrap;
	border-radius:999px;padding:3px 10px;
}
.xs-badge.xs-ok{background:#D1FAE5;color:#065F46}
.xs-badge.xs-redirect{background:#FEF3C7;color:#92400E}
.xs-badge.xs-error{background:#FEE2E2;color:#991B1B}
.xs-badge.xs-blocked{background:#EDE9FE;color:#5B21B6}
.xs-badge.xs-unchecked{background:#E5E7EB;color:#374151}
.xs-status-count{font-size:13px;color:var(--ink-soft);margin:10px 0 0;line-height:1.5}
.xs-status-note{font-size:13.5px;color:var(--ink-soft);line-height:1.6;margin:0 0 12px}
.xs-guide-list{margin:0 0 16px;padding-left:20px;color:var(--ink-soft);font-size:16px;line-height:1.7}
.xs-guide-list li{margin-bottom:8px}
.xs-guide-list li::marker{color:var(--violet)}
.xs-guide-list b{color:var(--ink)}
.xs-guide-list a{color:var(--violet-d);font-weight:700;text-decoration:none}
.xs-guide-list code{
	font-family:"JetBrains Mono",ui-monospace,"SF Mono","Cascadia Mono",Menlo,Consolas,monospace;
	font-size:13.5px;background:var(--mist);border-radius:4px;padding:1px 5px;
}

@media (max-width:900px){
	.xs-layout{grid-template-columns:1fr}
	.xs-output{position:static}
	.xs-tool{padding:20px 16px}
	.xs-form-card{padding:18px 16px}
	.xs-controls{grid-template-columns:1fr}
	.xs-fetch-row{flex-wrap:wrap}
	.xs-fetch-row .btn{flex:1 1 auto}
	.xs-status-url{max-width:220px}
}
