/* SliceFleet plugin demo page styles.
   Dark theme matching slicefleet.com (background #101022 family,
   orange #FF7613 accents). Widget styles live in
   assets/css/sfw-widget.css; this file is the page chrome plus the
   demo-stage overrides only. */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
	font-family: 'Inter', system-ui, sans-serif;
	background: #101022;
	color: #EDEDF5;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

h1, .demo-wordmark { font-family: 'Archivo', sans-serif; }

a { color: #FF7613; }

/* --- header and footer --- */

.demo-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 24px;
	background: #1B1B38;
	border-bottom: 1px solid #2C2C4E;
}

.demo-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: #EDEDF5;
}

.demo-brand-icon { width: 30px; height: 30px; }

.demo-wordmark { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; }
.demo-wm-accent { color: #FF7613; }

.demo-home-link { color: #A6A6C2; text-decoration: none; font-size: 0.92rem; }
.demo-home-link:hover { color: #FF7613; }

.demo-footer {
	padding: 22px 24px 30px;
	text-align: center;
	color: #A6A6C2;
	font-size: 0.92rem;
}

/* --- main column --- */

.demo-main {
	max-width: 1160px;
	margin: 0 auto;
	padding: 36px 24px 20px;
}

.demo-main h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }

.demo-lede { font-size: 1.08rem; font-weight: 600; margin-bottom: 8px; }

.demo-note { color: #A6A6C2; max-width: 72ch; margin-bottom: 26px; }

/* --- breakpoint bar (the only page-level control) ---
   A slim segmented control at the top of the page: it resizes
   the stage so the widget's responsive layout can be watched at
   each width. Everything else is driven from the settings panel. */

.demo-breakpoints {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 18px;
	margin-bottom: 26px;
}

.demo-bp-label {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #9A9CC0;
}

.demo-bp-row {
	display: inline-flex;
	background: #1C1C3A;
	border: 1px solid #2C2C4E;
	border-radius: 99px;
	padding: 3px;
	gap: 2px;
}

.demo-bp {
	background: transparent;
	color: #A6A6C2;
	border: 0;
	border-radius: 99px;
	padding: 5px 14px;
	font: inherit;
	font-size: 0.86rem;
	cursor: pointer;
}

.demo-bp:hover { color: #EDEDF5; }

.demo-bp.is-active { background: #FF7613; color: #101022; font-weight: 600; }

.demo-btn {
	background: #232344;
	color: #EDEDF5;
	border: 1px solid #2C2C4E;
	border-radius: 99px;
	padding: 7px 16px;
	font: inherit;
	font-size: 0.9rem;
	cursor: pointer;
}

.demo-btn:hover { border-color: #FF7613; }

.demo-width-value { color: #A6A6C2; font-size: 0.88rem; }

.demo-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.95rem; }
.demo-check input { accent-color: #FF7613; width: 17px; height: 17px; cursor: pointer; }

/* --- stage --- */

.demo-stage {
	margin: 0 auto;
	max-width: 100%;
	transition: width 0.35s ease;
	/* The plugin is self-contained (v2.13.0 redesign): the
	   stage lends it nothing but a width and the plain page
	   background a store body would give it - no card, no
	   border, no padding, no upload area of the page's own.
	   What you see is the widget exactly as it embeds. */
	background: #fff;
	border: none;
	border-radius: 0;
	box-shadow: none;
	padding: 0;
}

@media (max-width: 700px) {
	.demo-stage { padding: 0; }
}

/* XL preview: the stage breaks out of the centred 1160px
   column to a true ultrawide width (2560px, capped by the
   viewport) so the plugin's ultrawide layout can be watched
   filling a wide screen - both of its columns stretched to
   the full width. The rest of the page keeps the normal
   column; the breakout centres the stage on the viewport
   because the column itself is centred. */
.demo-stage.is-xl {
	max-width: calc(100vw - 32px);
	position: relative;
	left: 50%;
	transform: translateX(-50%);
}

body.demo-xl { overflow-x: clip; }

/* The stage is the embedder and sets the width; the plugin
   itself carries no width ceiling since v2.5.2. */
.demo-stage .sfw-quote { max-width: none; }

/* Appearance: the widget sets --sfw-primary and --sfw-accent
   inline on its root from the resolved theme (see demo.js). The
   defaults below are the plugin's Generic theme pair, used only
   until the widget paints its own; the rules map the variables
   onto the widget's primary and accent surfaces in the stage. */
.demo-stage .sfw-quote {
	--sfw-primary: #1F2937;
	--sfw-accent: #D97706;
}

.demo-stage .sfw-popup-btn-gold {
	background: var(--sfw-accent);
	color: var(--sfw-primary);
}
.demo-stage .sfw-popup-btn-ghost {
	border-color: var(--sfw-primary);
	color: var(--sfw-primary);
}
.demo-stage .sfw-part-row.is-selected {
	border-color: var(--sfw-accent);
}
.demo-stage .sfw-tier.is-selected,
.demo-stage .sfw-setting-pill.is-selected {
	border-color: var(--sfw-accent);
	box-shadow: 0 0 0 1px var(--sfw-accent);
}
.demo-stage .sfw-popup-spinner,
.demo-stage .sfw-viewer-spinner { border-top-color: var(--sfw-accent); }
.demo-stage .sfw-swatch.is-selected { box-shadow: 0 0 0 3px var(--sfw-accent); }

@media (max-width: 640px) {
	.demo-main { padding: 26px 14px 14px; }
	.demo-header { padding: 12px 14px; }
}

/* --- settings panel (the plugin admin screen, in miniature) ---
   A light settings card on the dark page, echoing wp-admin: white
   surface, dark text, section headings, label-left rows. */

.demo-admin {
	background: #fff;
	color: #1d2327;
	border-radius: 14px;
	padding: 26px 28px 22px;
	margin-top: 34px;
	text-align: left;
}

.demo-admin h2 {
	font-family: 'Archivo', sans-serif;
	font-size: 1.45rem;
	font-weight: 800;
	margin-bottom: 6px;
}

.demo-admin-intro { color: #50575e; max-width: 78ch; margin-bottom: 8px; }

.demo-admin-section {
	border-top: 1px solid #dcdcde;
	padding: 18px 0 6px;
	margin-top: 18px;
}

.demo-admin-section h3 {
	font-family: 'Archivo', sans-serif;
	font-size: 1.05rem;
	font-weight: 700;
	margin-bottom: 10px;
}

.demo-admin-note { color: #50575e; font-size: 0.94rem; max-width: 78ch; margin-bottom: 12px; }

.demo-admin-row {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 8px 22px;
	align-items: start;
	padding: 7px 0;
}

.demo-admin-row > label { font-weight: 600; padding-top: 6px; }

.demo-admin-field p { color: #646970; font-size: 0.88rem; margin-top: 5px; max-width: 62ch; }

.demo-admin select,
.demo-admin input[type="text"],
.demo-admin input[type="number"] {
	font: inherit;
	font-size: 0.95rem;
	color: #1d2327;
	background: #fff;
	border: 1px solid #8c8f94;
	border-radius: 6px;
	padding: 6px 10px;
	min-width: 220px;
	max-width: 100%;
}

.demo-admin input[type="number"] { min-width: 120px; width: 140px; }

.demo-admin-colours { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; }

.demo-admin-colour { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }

.demo-admin-colour input[type="color"] {
	width: 52px; height: 34px; padding: 2px;
	border: 1px solid #8c8f94; border-radius: 6px; background: #fff; cursor: pointer;
}

.demo-admin-colours p { flex: 1 1 100%; }

.demo-admin-table { border-collapse: collapse; width: 100%; max-width: 640px; }

.demo-admin-table th,
.demo-admin-table td {
	text-align: left;
	padding: 8px 12px;
	border-bottom: 1px solid #eeeeee;
	font-size: 0.95rem;
}

.demo-admin-table th { color: #50575e; font-weight: 600; }

.demo-admin-table input[type="checkbox"] { accent-color: #FF7613; width: 17px; height: 17px; cursor: pointer; }

/* Editable catalogue tables: compact rate inputs, small row
   buttons, and the add-from-catalogue row under each table. */
.demo-admin-table input[type="number"] { min-width: 92px; width: 110px; }

.demo-btn-small { padding: 4px 12px; font-size: 0.86rem; }

.demo-admin .demo-btn[disabled] { opacity: 0.45; cursor: default; }
.demo-admin .demo-btn[disabled]:hover { border-color: #8c8f94; }

.demo-admin-addrow {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin-top: 12px;
}

.demo-admin-addrow select { min-width: 240px; }

.demo-admin-checks { display: flex; flex-wrap: wrap; gap: 10px 26px; }

/* Compact merged groups (v2.8.0): label + select pairs ride
   inline, and the advanced group collapses behind a summary. */
.demo-admin-inline { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }

.demo-admin-inline p { flex: 1 1 100%; }

.demo-admin-mini { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }

.demo-admin-mini select { min-width: 130px; }

.demo-admin-details > summary {
	font-family: 'Archivo', sans-serif;
	font-size: 1.05rem;
	font-weight: 700;
	margin-bottom: 10px;
	cursor: pointer;
}

.demo-admin .demo-check { color: #1d2327; }

.demo-admin-foot {
	display: flex;
	align-items: center;
	gap: 16px;
	border-top: 1px solid #dcdcde;
	padding-top: 16px;
	margin-top: 18px;
}

.demo-admin .demo-btn {
	background: #f6f7f7;
	color: #1d2327;
	border-color: #8c8f94;
}

.demo-admin .demo-btn:hover { border-color: #FF7613; }

.demo-admin-status { color: #9c2b2e; font-size: 0.9rem; }

@media (max-width: 640px) {
	.demo-admin { padding: 20px 16px 16px; }
	.demo-admin-row { grid-template-columns: 1fr; }
	.demo-admin-row > label { padding-top: 0; }
	.demo-admin select,
	.demo-admin input[type="text"] { min-width: 0; width: 100%; }

	/* Settings rework (v2.13.0): the Materials and Printers field
	   rows wrap and stack within the available space at narrow
	   widths instead of staying in a row and cramping - the same
	   behaviour as the plugin's wp-admin screen. */
	.demo-plastic-head label { flex: 1 1 100%; }
	.demo-plastic-head label input,
	.demo-plastic-head label select { width: 100%; box-sizing: border-box; }
	.demo-admin-table thead { display: none; }
	.demo-admin-table tbody,
	.demo-admin-table tr,
	.demo-admin-table td {
		display: block;
		width: 100%;
		box-sizing: border-box;
	}
	.demo-admin-table td input,
	.demo-admin-table td select {
		width: 100%;
		max-width: 100%;
		min-width: 0;
		box-sizing: border-box;
	}
}

/* --- wp-admin parity additions (v2.10.0) ---
   The usage readout notice, the per-plastic blocks with their
   colour sub-tables, and the wider input set (textarea, url,
   read-only catalogue fields) the full settings screen needs. */

.demo-admin [hidden] { display: none !important; }

.demo-usage {
	background: #f0f6fc;
	border-left: 4px solid #72aee6;
	padding: 10px 14px;
	margin: 14px 0 4px;
	font-size: 0.94rem;
}

.demo-usage p { margin: 0; }

.demo-usage-sep { color: #8c8f94; margin: 0 4px; }

.demo-admin textarea,
.demo-admin input[type="url"] {
	font: inherit;
	font-size: 0.95rem;
	color: #1d2327;
	background: #fff;
	border: 1px solid #8c8f94;
	border-radius: 6px;
	padding: 6px 10px;
	width: 100%;
	max-width: 560px;
}

.demo-admin textarea { resize: vertical; }

.demo-admin input[readonly] {
	background: #f6f7f7;
	color: #50575e;
}

.demo-admin input:disabled { opacity: 0.75; }

.demo-plastic {
	border: 1px solid #eeeeee;
	border-radius: 8px;
	padding: 12px 14px 6px;
	margin-bottom: 14px;
	max-width: 720px;
}

.demo-plastic-head {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	align-items: end;
	margin-bottom: 10px;
}

.demo-plastic-head label {
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	font-weight: 600;
	font-size: 0.92rem;
}

.demo-plastic-head input[type="text"] { min-width: 180px; }

.demo-colours-table { max-width: 560px; }

.demo-colours-table input[type="text"] { min-width: 120px; }

.demo-colours-table .demo-hex-cell {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.demo-colours-table input[type="color"] {
	width: 44px; height: 30px; padding: 2px;
	border: 1px solid #8c8f94; border-radius: 6px; background: #fff; cursor: pointer;
}

.demo-printers-table { max-width: 900px; }

.demo-printers-table input[type="text"] { min-width: 150px; }

.demo-admin-table select { min-width: 130px; }
