/**
 * GSTL order wizard — clean, lightweight styling matching the UX prototype's
 * green theme, step indicator bar, and compact order breakdown card.
 * Deliberately self-contained (no framework dependency) so it drops cleanly
 * into a Breakdance page without fighting the theme's own styles.
 */
/* The topbar renders as a sibling of #gstl-order-wizard-root (both inside a
   shared wrapper), so the custom properties below apply to the wrapper class
   too — CSS variables cascade to all descendants regardless of which of the
   two carries the class. */
.gstl-order-wizard-wrap,
.gstl-order-wizard {
	--gstl-green-900: #123822;
	--gstl-green-800: #1a4d2e;
	--gstl-green-700: #22622e;
	--gstl-green-600: #2e7d32;
	--gstl-green-500: #3f9142;
	--gstl-green-100: #e7f3e6;
	--gstl-green-50: #f3f9f1;
	--gstl-ink-900: #1c2321;
	--gstl-ink-700: #3d4a44;
	--gstl-ink-500: #647169;
	--gstl-line: #dde5df;
	--gstl-amber: #b3690a;
	--gstl-amber-bg: #fdf2e3;
	--gstl-red: #b3261e;
	--gstl-red-bg: #fbeceb;
	--gstl-radius: 12px;
	--gstl-shadow: 0 1px 2px rgba(20, 30, 25, 0.06), 0 4px 16px rgba(20, 30, 25, 0.05);

	max-width: 1180px;
	margin: 0 auto;
	font-family: inherit;
	color: var(--gstl-ink-900);
	line-height: 1.45;
}

.gstl-order-wizard-wrap *,
.gstl-order-wizard * {
	box-sizing: border-box;
}

/* Topbar — matches the Staff Dashboard's, duplicated here since the two
   shortcodes can appear on different pages with only one stylesheet loaded. */
.gstl-topbar {
	background: var(--gstl-green-800);
	color: #fff;
	padding: 12px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	border-radius: var(--gstl-radius);
	margin-bottom: 18px;
	box-shadow: var(--gstl-shadow);
}

.gstl-topbar-brand {
	font-weight: 700;
	font-size: 15px;
}

.gstl-topbar-tabs {
	display: flex;
	gap: 6px;
	background: rgba(255, 255, 255, 0.12);
	padding: 4px;
	border-radius: 10px;
	overflow-x: auto;
	max-width: 100%;
}

.gstl-topbar-tabs a,
.gstl-topbar-tabs span {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 8px;
	font-size: 13.5px;
	font-weight: 600;
	white-space: nowrap;
	color: #e9f2e8;
	text-decoration: none;
}

.gstl-topbar-tabs a:hover {
	background: rgba(255, 255, 255, 0.15);
}

.gstl-topbar-tabs span.active {
	background: #fff;
	color: var(--gstl-green-800);
}

.gstl-wizard-title {
	font-size: 22px;
	margin: 0 0 16px;
}

.gstl-wizard-layout {
	display: flex;
	gap: 24px;
	align-items: flex-start;
}

.gstl-wizard-main {
	flex: 1 1 0%;
	min-width: 0;
}

.gstl-wizard-sidebar {
	width: 300px;
	flex: none;
	position: sticky;
	top: 20px;
}

@media ( max-width: 860px ) {
	.gstl-wizard-layout {
		flex-direction: column;
	}
	.gstl-wizard-sidebar {
		width: 100%;
		position: static;
		order: -1;
	}
}

.gstl-wizard-card {
	background: #fff;
	border: 1px solid var(--gstl-line);
	border-radius: var(--gstl-radius);
	padding: 18px;
	margin-bottom: 16px;
	box-shadow: var(--gstl-shadow);
}

.gstl-wizard-card h2 {
	font-size: 17px;
	margin: 0 0 12px;
}

.gstl-wizard-card h3 {
	font-size: 14.5px;
	margin: 0 0 8px;
}

.gstl-wizard-card label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--gstl-ink-700);
	margin: 12px 0 5px;
}

.gstl-wizard-card label:first-of-type {
	margin-top: 0;
}

.gstl-order-wizard input[type="text"],
.gstl-order-wizard input[type="number"],
.gstl-order-wizard input[type="email"],
.gstl-order-wizard input[type="tel"] {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid var(--gstl-line);
	border-radius: 8px;
	font-size: 16px;
	background: #fff;
	color: var(--gstl-ink-900);
	font-family: inherit;
}

.gstl-order-wizard input:focus {
	outline: 2px solid var(--gstl-green-500);
	outline-offset: 1px;
}

.gstl-wizard-row {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
}

.gstl-wizard-row > * {
	flex: 1;
	min-width: 170px;
}

.gstl-wizard-flex-between {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

/* Progress bar + step indicator */
.gstl-wizard-progress {
	height: 8px;
	border-radius: 6px;
	background: #e4e9df;
	overflow: hidden;
	margin-bottom: 8px;
}

.gstl-wizard-progress-fill {
	height: 100%;
	background: #e8bf65;
	transition: width 0.5s ease;
}

.gstl-wizard-steps {
	display: flex;
	gap: 6px;
	margin-bottom: 18px;
	flex-wrap: wrap;
}

.gstl-wizard-steps span {
	flex: 1;
	min-width: 90px;
	text-align: center;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	padding: 6px 3px;
	border-radius: 8px;
	background: var(--gstl-green-100);
	color: var(--gstl-green-800);
	opacity: 0.5;
}

.gstl-wizard-steps span.current,
.gstl-wizard-steps span.done {
	opacity: 1;
	background: var(--gstl-green-700);
	color: #fff;
}

.gstl-wizard-steps span.clickable {
	cursor: pointer;
}

.gstl-wizard-reset-link {
	display: block;
	margin: 0 0 18px auto;
	padding: 0;
	border: none;
	background: none;
	color: var(--gstl-ink-500);
	font-size: 12px;
	text-decoration: underline;
	cursor: pointer;
}

.gstl-wizard-reset-link:hover {
	color: var(--gstl-red);
}

/* Choice cards (product picks, delivery/pickup, payment method) */
.gstl-choice-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 10px;
	margin-top: 6px;
}

.gstl-choice-card {
	border: 1.5px solid var(--gstl-line);
	border-radius: 10px;
	padding: 12px 14px;
	cursor: pointer;
	background: #fff;
}

.gstl-choice-card:hover {
	border-color: var(--gstl-green-500);
}

.gstl-choice-card.selected {
	border-color: var(--gstl-green-700);
	background: var(--gstl-green-50);
}

/* Payment step: the "Pay now" card when forced to invoice-only (manual
   freight review and/or extra services requested — see stepReview() in
   order-wizard.js). Greyed out and inert rather than removed, so it's clear
   card payment exists but isn't available for this particular order. */
.gstl-choice-card.disabled {
	opacity: 0.4;
	pointer-events: none;
	cursor: not-allowed;
}

.gstl-choice-title {
	font-weight: 700;
	font-size: 14px;
	margin-bottom: 2px;
}

.gstl-choice-meta {
	font-size: 12px;
	color: var(--gstl-ink-500);
}

.gstl-choice-price {
	font-weight: 700;
	color: var(--gstl-green-800);
	font-size: 14px;
	margin-top: 6px;
}

.gstl-badge-rec {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 999px;
	background: var(--gstl-green-700);
	color: #fff;
	margin-left: 4px;
}

.gstl-qty-stepper {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
}

.gstl-qty-stepper button {
	width: 28px;
	height: 28px;
	border-radius: 6px;
	border: 1px solid var(--gstl-line);
	background: #fff;
	font-size: 16px;
	cursor: pointer;
}

.gstl-qty-stepper span {
	font-weight: 700;
	min-width: 16px;
	text-align: center;
}

.gstl-checkbox-row {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	font-size: 14px;
	margin-top: 12px !important;
}

.gstl-checkbox-row input {
	width: auto;
}

/* Notes */
.gstl-wizard-note {
	background: var(--gstl-green-50);
	border: 1px solid #cfe6cf;
	color: var(--gstl-green-900);
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 13px;
	margin-top: 12px;
}

.gstl-note-green {
	background: var(--gstl-green-50);
	border-color: #cfe6cf;
	color: var(--gstl-green-900);
}

.gstl-note-amber {
	background: var(--gstl-amber-bg);
	border-color: #f0d9b5;
	color: #7a4a08;
}

.gstl-note-red {
	background: var(--gstl-red-bg);
	border-color: #f0c9c6;
	color: var(--gstl-red);
}

.hint {
	font-size: 12px;
	color: var(--gstl-ink-500);
	margin-top: 6px;
}

/* Buttons */
.gstl-wizard-btn-row {
	display: flex;
	justify-content: space-between;
	margin-top: 6px;
	gap: 10px;
	flex-wrap: wrap;
}

.gstl-btn-primary,
.gstl-btn-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 20px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	border: none;
}

.gstl-btn-primary {
	background: var(--gstl-green-700);
	color: #fff;
}

.gstl-btn-primary:hover {
	background: var(--gstl-green-800);
}

.gstl-btn-primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.gstl-btn-secondary {
	background: #fff;
	color: var(--gstl-green-800);
	border: 1.5px solid var(--gstl-green-700);
}

.gstl-btn-secondary:hover {
	background: var(--gstl-green-50);
}

/* Order breakdown card (sidebar + review step) */
.gstl-wizard-cart,
.gstl-wizard-confirmed {
	background: #fff;
	border: 1px solid var(--gstl-line);
	border-radius: var(--gstl-radius);
	padding: 16px;
	box-shadow: var(--gstl-shadow);
}

.gstl-wizard-cart h3 {
	margin: 0 0 10px;
	font-size: 14.5px;
}

.gstl-wizard-cart-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12.5px;
}

.gstl-wizard-cart-table td {
	padding: 6px 0;
	border-bottom: 1px dashed var(--gstl-line);
	vertical-align: top;
}

.gstl-wizard-cart-table td:last-child {
	text-align: right;
	white-space: nowrap;
	padding-left: 8px;
}

.gstl-wizard-cart-table tr:last-child td {
	border-bottom: none;
}

.gstl-wizard-cart-total {
	display: flex;
	justify-content: space-between;
	font-size: 15px;
	font-weight: 800;
	color: var(--gstl-green-800);
	border-top: 1.5px solid var(--gstl-ink-900);
	padding-top: 10px;
	margin-top: 8px;
}

/* Step 4 calendar — month grid + Prev/Next month nav, matching the UX
   prototype's own .cal-head/.cal-grid/.cal-cell/.cal-legend exactly. */
.cal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
	gap: 10px;
	margin-top: 10px;
}

.cal-month-label {
	font-weight: 700;
	font-size: 15px;
}

.cal-nav-btn {
	padding: 6px 14px;
	border-radius: 999px;
	border: 1.5px solid var(--gstl-line);
	background: #fff;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--gstl-green-800);
	cursor: pointer;
}

.cal-nav-btn:hover {
	border-color: var(--gstl-green-500);
}

.cal-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 5px;
}

.cal-dow {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--gstl-ink-500);
	text-align: center;
	padding-bottom: 4px;
}

.cal-cell {
	min-height: 56px;
	border: 1.5px solid var(--gstl-line);
	border-radius: 8px;
	padding: 6px;
	font-size: 12px;
	background: #fff;
}

.cal-cell.empty-cell {
	border: none;
	background: transparent;
}

.cal-cell .dnum {
	font-weight: 700;
	font-size: 12.5px;
}

.cal-cell.past {
	opacity: 0.35;
}

.cal-cell.available {
	cursor: pointer;
}

.cal-cell.available:hover {
	border-color: var(--gstl-green-500);
}

.cal-cell.selected {
	border-color: var(--gstl-green-700);
	background: var(--gstl-green-50);
}

.cal-cell.full {
	background: var(--gstl-red-bg);
}

.cal-cell.closed {
	background: #f1f3f1;
}

.cal-cell .status {
	font-size: 10.5px;
	font-weight: 700;
	margin-top: 3px;
}

.cal-cell.available .status {
	color: var(--gstl-green-700);
}

.cal-cell.full .status {
	color: var(--gstl-red);
}

.cal-cell.closed .status {
	color: var(--gstl-ink-500);
}

.cal-legend {
	display: flex;
	gap: 14px;
	margin-top: 12px;
	flex-wrap: wrap;
	font-size: 11.5px;
	color: var(--gstl-ink-500);
}

.cal-legend span {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.cal-legend-swatch {
	width: 10px;
	height: 10px;
	border-radius: 3px;
	display: inline-block;
}

.cal-legend-available {
	background: var(--gstl-green-50);
	border: 1px solid var(--gstl-green-700);
}

.cal-legend-full {
	background: var(--gstl-red-bg);
}

.cal-legend-closed {
	background: #f1f3f1;
}

@media (max-width: 640px) {
	.cal-cell {
		min-height: 44px;
		font-size: 11px;
		padding: 4px;
	}
}

/* Measuring canvas modal card */
#gstl-measure-canvas {
	border: 1.5px dashed var(--gstl-line);
	border-radius: 8px;
	touch-action: none;
	max-width: 100%;
	background: #fbfcfa;
	cursor: crosshair;
}

/* Confirmed step */
.gstl-wizard-confirmed {
	text-align: left;
}

.gstl-wizard-confirmed h2 {
	color: var(--gstl-green-800);
	margin-top: 0;
}
