:root {
	--fcb-theme-colour: #a9714f;
}

/* The whole customizer sits inside one clearly bounded panel so it reads as a
   separate tool from the product page around it. */
.fcb-builder {
	margin: 2em 0;
	background: #fbf7f2;
	border: 2px solid var(--fcb-theme-colour);
	border-radius: 14px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	max-width: 100%;
	box-sizing: border-box;
}

.fcb-header {
	padding: 18px 24px;
	background: var(--fcb-theme-colour);
	color: #fff;
}

.fcb-title {
	font-size: 1.35em;
	font-weight: 700;
	line-height: 1.25;
	color: #fff;
}

.fcb-subtitle {
	margin: 4px 0 0;
	font-size: 14px;
	line-height: 1.4;
	color: #fff;
	opacity: 0.92;
}

.fcb-builder > .fcb-step {
	padding: 8px 24px 24px;
	margin-bottom: 0;
}

.fcb-builder > .fcb-noscript-warning {
	margin: 16px 24px;
}

.fcb-noscript-warning {
	padding: 10px 14px;
	background: #fdecea;
	border-left: 4px solid #d63638;
}

.fcb-admin-warning {
	padding: 10px 14px;
	margin: 1em 0;
	background: #fff8e5;
	border-left: 4px solid #dba617;
}

/* Progress bar: one shaded card per step; the active one is highlighted, a
   completed one gets a tick in place of its number. */
.fcb-progress-wrap {
	padding: 20px 24px 8px;
}

.fcb-progress {
	display: flex;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.fcb-progress-step {
	display: flex;
	flex: 1;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.fcb-progress-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 100%;
	padding: 10px 6px;
	background: #fff;
	border: 1px solid #e6dccf;
	border-radius: 10px;
	color: #777;
	font: inherit;
	text-align: center;
	cursor: pointer;
}

.fcb-progress-btn:disabled {
	cursor: default;
	opacity: 0.7;
}

.fcb-progress-step.is-active .fcb-progress-btn {
	background: #f3e6d9;
	background: color-mix(in srgb, var(--fcb-theme-colour) 13%, #fff);
	border-color: var(--fcb-theme-colour);
	color: #333;
	opacity: 1;
}

.fcb-progress-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #e9e2d9;
	color: #666;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
}

.fcb-progress-step.is-active .fcb-progress-badge {
	background: var(--fcb-theme-colour);
	color: #fff;
}

.fcb-progress-step.is-complete .fcb-progress-badge {
	background: #3f8f5b;
	color: #fff;
	font-size: 0;
}

.fcb-progress-step.is-complete .fcb-progress-badge::after {
	content: "\2713";
	font-size: 16px;
}

.fcb-progress-label {
	font-size: 12px;
	font-weight: 600;
	line-height: 1.25;
}

.fcb-progress-track {
	height: 6px;
	margin-top: 12px;
	background: #eadfd2;
	border-radius: 3px;
	overflow: hidden;
}

.fcb-progress-fill {
	width: 25%;
	height: 100%;
	background: var(--fcb-theme-colour);
	border-radius: 3px;
	transition: width 0.35s ease;
}

/* Steps */
.fcb-step {
	margin-bottom: 1.5em;
}

.fcb-step-heading {
	margin: 0 0 1em;
	font-size: 1.2em;
}

.fcb-field-group {
	margin-bottom: 1.5em;
}

.fcb-field-label {
	font-weight: 600;
	margin: 0 0 0.5em;
}

.fcb-field-group label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.4em;
}

.fcb-field-group input[type="text"],
.fcb-field-group textarea {
	width: 100%;
	max-width: 480px;
	box-sizing: border-box;
}

/* Swatch cards */
.fcb-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.fcb-swatch {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4em;
	width: calc(25% - 8px);
	min-width: 110px;
	padding: 0.6em;
	background: #fff;
	border: 2px solid #ddd;
	border-radius: 8px;
	cursor: pointer;
	text-align: center;
}

.fcb-swatch.is-selected {
	border-color: var(--fcb-theme-colour);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.fcb-swatch.is-selected::after {
	content: "\2713";
	position: absolute;
	top: 6px;
	right: 6px;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--fcb-theme-colour);
	color: #fff;
	border-radius: 50%;
	font-size: 12px;
}

/* Swatches uploaded in the admin are portrait 2:3. The flower option cards
   and frame photos below are square artwork, so they stay 1:1. */
.fcb-swatch-img {
	width: 100%;
	height: auto;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	border-radius: 4px;
}

.fcb-flower-choice .fcb-swatch-img,
.fcb-frame-swatches .fcb-swatch-img {
	aspect-ratio: 1 / 1;
}

/* Fallback preview flowers (shown when no variant swatch is uploaded) are
   square line art - show them whole instead of cropping them to 2:3. */
.fcb-swatch-img.is-contain {
	object-fit: contain;
	background: #fff;
}

.fcb-swatch-label {
	font-size: 13px;
	line-height: 1.3;
}

/* Character / flower rows */
.fcb-characters-list,
.fcb-flowers-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 0.75em;
}

.fcb-character-row,
.fcb-flower-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 10px;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
}

.fcb-character-row input[type="text"],
.fcb-flower-row input[type="text"] {
	flex: 1;
	min-width: 120px;
}

.fcb-flower-row select {
	flex: 1;
	min-width: 120px;
}

.fcb-flower-choice-wrap {
	display: flex;
	gap: 8px;
}

.fcb-flower-choice.fcb-swatch {
	width: 90px;
	min-width: 90px;
	padding: 0.4em;
}

.fcb-row-remove {
	background: none;
	border: none;
	color: #a00;
	cursor: pointer;
	font-size: 13px;
	text-decoration: underline;
	padding: 4px 6px;
}

.fcb-add-row {
	margin-top: 4px;
}

.fcb-flowers-footer {
	display: flex;
	align-items: center;
	gap: 12px;
}

.fcb-flower-count {
	font-size: 13px;
	color: #666;
}

/* Uploads */
.fcb-upload {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.fcb-upload-dropzone {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.fcb-upload-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.fcb-upload-thumb {
	position: relative;
	width: 72px;
	height: 72px;
}

.fcb-upload-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid #ddd;
}

.fcb-upload-thumb-remove {
	position: absolute;
	top: -6px;
	right: -6px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #a00;
	color: #fff;
	border: none;
	cursor: pointer;
	font-size: 12px;
	line-height: 1;
}

.fcb-upload-status {
	font-size: 12px;
	color: #666;
}

/* Errors */
.fcb-error {
	color: #a00;
	background: #fdecea;
	border-left: 4px solid #d63638;
	padding: 8px 12px;
	margin: 0.75em 0;
	font-size: 13px;
}

/* Step navigation: a clear, descriptive primary "Next Step" button */
.fcb-step-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 1.75em;
	padding-top: 1.25em;
	border-top: 1px solid #e6dccf;
}

.fcb-step-nav > span:empty {
	display: none;
}

.fcb-builder .fcb-step-next {
	margin-left: auto;
	padding: 14px 26px;
	background: var(--fcb-theme-colour);
	border: 0;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.15s ease;
}

.fcb-builder .fcb-step-next::after {
	content: "\00a0\2192";
}

.fcb-builder .fcb-step-next:hover,
.fcb-builder .fcb-step-next:focus {
	background: var(--fcb-theme-colour);
	color: #fff;
	filter: brightness(1.08);
	transform: translateY(-1px);
}

.fcb-builder .fcb-step-next.is-ready {
	animation: fcb-pulse 2.2s ease-in-out infinite;
}

@keyframes fcb-pulse {
	0%, 100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18), 0 0 0 0 rgba(169, 113, 79, 0.45); }
	50% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18), 0 0 0 9px rgba(169, 113, 79, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.fcb-builder .fcb-step-next.is-ready {
		animation: none;
	}
	.fcb-progress-fill {
		transition: none;
	}
}

.fcb-builder .fcb-step-back {
	padding: 12px 18px;
	background: #fff;
	border: 1px solid #cfc4b6;
	border-radius: 8px;
	color: #555;
	font-size: 14px;
	cursor: pointer;
}

.fcb-builder .fcb-step-back::before {
	content: "\2190\00a0";
}

/* Review step */
.fcb-review-summary {
	margin-bottom: 1.5em;
}

.fcb-review-block {
	padding: 12px;
	margin-bottom: 10px;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
}

.fcb-review-block h4 {
	margin: 0 0 0.5em;
}

.fcb-review-row {
	font-size: 13px;
	margin: 0.2em 0;
}

@media (max-width: 480px) {
	.fcb-swatch {
		width: calc(50% - 6px);
	}
}

/* Quantity is locked to 1 for this fully-personalized bundle (see
   FCB_Frontend_Display::lock_quantity_to_one()) - hide the stepper
   entirely on browsers that support :has(); unsupporting browsers just
   show a static "1", which is harmless. */
form.cart:has(.fcb-builder) .quantity {
	display: none;
}

/* Numbered subsections (2.1, 2.2 ...) */
.fcb-subsection {
	margin-bottom: 1.75em;
}

.fcb-subsection-heading {
	display: flex;
	align-items: baseline;
	gap: 0.6em;
	margin: 0 0 0.75em;
	font-size: 1.05em;
}

.fcb-subsection-number {
	color: var(--fcb-theme-colour);
	font-weight: 700;
}

.fcb-subsection-inner {
	margin-top: 1em;
}

.fcb-hint {
	margin: 0 0 0.75em;
	padding: 8px 12px;
	background: #fff;
	border: 1px solid #ece4da;
	border-radius: 4px;
	font-size: 13px;
}

/* Compact, editable flower rows */
.fcb-flower-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
}

.fcb-flower-item.needs-attention {
	border-color: #dba617;
	background: #fff8e5;
}

.fcb-flower-item-thumb {
	width: 44px;
	height: 44px;
	object-fit: contain;
	flex: none;
}

.fcb-flower-item-text {
	flex: 1;
	display: flex;
	flex-direction: column;
	font-size: 13px;
	line-height: 1.35;
	min-width: 0;
}

.fcb-flower-warning {
	color: #8a5a00;
}

.fcb-flower-item-actions {
	display: flex;
	gap: 4px;
	flex: none;
}

.fcb-flower-action {
	width: 30px;
	height: 30px;
	padding: 0;
	background: #f6f6f6;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
	line-height: 1;
}

.fcb-flower-action:disabled {
	opacity: 0.35;
	cursor: default;
}

.fcb-flower-editor {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px;
	background: #fff;
	border: 2px solid var(--fcb-theme-colour);
	border-radius: 6px;
}

.fcb-flower-editor-title {
	margin: 0;
	font-size: 14px;
}

.fcb-flower-editor select,
.fcb-flower-editor input[type="text"] {
	width: 100%;
	max-width: 320px;
	box-sizing: border-box;
}

.fcb-flower-editor-buttons {
	display: flex;
	gap: 8px;
}

/* Personalise it */
.fcb-reveal-field {
	margin-bottom: 0.6em;
}

.fcb-reveal-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	cursor: pointer;
}

.fcb-reveal-content {
	margin-top: 0.5em;
	padding-left: 26px;
}

.fcb-reveal-content input[type="text"],
.fcb-reveal-content textarea {
	width: 100%;
	max-width: 480px;
	box-sizing: border-box;
}

.fcb-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* Informational note (e.g. characters included in the price) */
.fcb-notice {
	margin: 0.9em 0 0;
	padding: 10px 14px;
	background: #fdf6ec;
	border-left: 4px solid var(--fcb-theme-colour);
	border-radius: 0 4px 4px 0;
	font-size: 13px;
	line-height: 1.5;
}

.fcb-notice a {
	font-weight: 600;
}

@media (max-width: 520px) {
	.fcb-header,
	.fcb-progress-wrap,
	.fcb-builder > .fcb-step {
		padding-left: 16px;
		padding-right: 16px;
	}

	.fcb-builder > .fcb-noscript-warning {
		margin-left: 16px;
		margin-right: 16px;
	}

	.fcb-progress {
		gap: 4px;
	}

	.fcb-progress-btn {
		padding: 8px 2px;
	}

	.fcb-progress-label {
		font-size: 10.5px;
	}

	.fcb-step-nav {
		flex-direction: column-reverse;
		align-items: stretch;
	}

	.fcb-builder .fcb-step-next,
	.fcb-builder .fcb-step-back {
		width: 100%;
		margin-left: 0;
	}
}

/* ---- Review step: artwork recap with thumbnails ---- */
.fcb-review-block {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.fcb-review-thumb {
	flex: none;
	width: 84px;
}

.fcb-review-thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	border: 1px solid #e6dccf;
	border-radius: 6px;
}

.fcb-review-body {
	flex: 1;
	min-width: 0;
}

.fcb-review-heading {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin: 0 0 0.4em;
	font-size: 1em;
}

.fcb-review-edit {
	padding: 0;
	background: none;
	border: 0;
	color: var(--fcb-theme-colour);
	font-size: 13px;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

.fcb-review-row {
	overflow-wrap: anywhere;
}

/* ---- Printing and framing ---- */
.fcb-print-notice {
	margin: 0 0 1.1em;
}

.fcb-frame-select {
	display: block;
	width: 100%;
	max-width: 420px;
	padding: 10px 12px;
	font-size: 15px;
	box-sizing: border-box;
}

.fcb-frame-swatches .fcb-swatch {
	width: 110px;
	min-width: 0;
}

/* ---- Rush order toggle (orange when on) ---- */
.fcb-learn-more-link {
	display: inline-block;
	margin-left: 0.5em;
	padding: 0;
	background: none;
	border: 0;
	color: var(--fcb-theme-colour);
	font-size: 0.85em;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

.fcb-learn-more-link:hover,
.fcb-learn-more-link:focus {
	text-decoration: none;
}

.fcb-toggle-row {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	gap: 0.85em;
	padding: 1em 1.2em;
	background: #fff;
	border: 1px solid #e5d9cf;
	border-radius: 10px;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.fcb-toggle-row.is-active {
	background: #fdf1e7;
	border-color: #f0a35f;
}

.fcb-toggle-icon {
	flex: 0 0 auto !important;
	font-size: 1.3em;
	line-height: 1;
}

.fcb-toggle-text {
	flex: 1 1 auto !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 0.2em;
}

.fcb-toggle-title {
	font-weight: 700;
}

.fcb-toggle-sub {
	font-size: 0.85em;
	color: #767676;
}

.fcb-toggle-price {
	flex: 0 0 auto;
	font-weight: 700;
	color: #b5651d;
	white-space: nowrap;
}

.fcb-toggle-switch {
	position: relative;
	flex: 0 0 auto !important;
	display: inline-block !important;
	width: 46px;
	height: 26px;
}

.fcb-toggle-switch input {
	position: absolute;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.fcb-toggle-slider {
	position: absolute;
	inset: 0;
	background: #d6d6d6;
	border-radius: 999px;
	transition: background-color 0.15s ease;
}

.fcb-toggle-slider::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s ease;
}

.fcb-toggle-switch input:checked + .fcb-toggle-slider {
	background: #f0883e;
}

.fcb-toggle-switch input:checked + .fcb-toggle-slider::before {
	transform: translateX(20px);
}

.fcb-toggle-switch input:focus-visible + .fcb-toggle-slider {
	outline: 2px solid var(--fcb-theme-colour);
	outline-offset: 2px;
}

/* ---- Price + Add to Cart ---- */
.fcb-purchase-nav {
	flex-wrap: wrap;
}

.fcb-purchase {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 18px;
	flex-wrap: wrap;
	margin-left: auto;
}

.fcb-price-box {
	text-align: right;
}

.fcb-price-line {
	display: flex;
	align-items: baseline;
	justify-content: flex-end;
	gap: 8px;
}

.fcb-price-label {
	font-size: 13px;
	color: #777;
}

.fcb-price-was {
	font-size: 14px;
	color: #999;
}

.fcb-price-total {
	font-size: 1.6em;
	font-weight: 800;
	line-height: 1.1;
	color: var(--fcb-theme-colour);
}

.fcb-price-note {
	margin-top: 2px;
	font-size: 12px;
	color: #b5651d;
}

/* The Add to Cart button is moved into the review step, so it is always
   inside a step that is hidden until the customer gets there. The layout
   properties below use !important + an ID selector on purpose: themes and
   Additional CSS commonly hide or resize this button (e.g. a rule that hides
   it for products tagged for a different step-by-step form, or a float/width
   sized to sit beside a quantity box), and either would otherwise leave it
   invisible or squashed here. */
.fcb-builder #fcb-add-to-cart-target button.single_add_to_cart_button {
	display: inline-block !important;
	float: none !important;
	width: auto !important;
	min-width: 220px;
	height: auto !important;
	margin: 0;
	padding: 14px 26px;
	background: var(--fcb-theme-colour);
	border: 0;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	cursor: pointer;
}

.fcb-builder #fcb-add-to-cart-target button.single_add_to_cart_button:hover,
.fcb-builder #fcb-add-to-cart-target button.single_add_to_cart_button:focus {
	background: var(--fcb-theme-colour);
	color: #fff;
	filter: brightness(1.08);
}

@media (max-width: 520px) {
	.fcb-review-thumb {
		width: 64px;
	}

	.fcb-purchase {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.fcb-price-box,
	.fcb-price-line {
		text-align: left;
		justify-content: space-between;
	}

	.fcb-builder #fcb-add-to-cart-target button.single_add_to_cart_button {
		display: block !important;
		width: 100% !important;
		min-width: 0;
	}

	.fcb-toggle-row {
		flex-wrap: wrap !important;
	}
}

/* ---- Lead-time modal (appended to <body>) ---- */
.fcb-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, 0.5);
}

.fcb-modal-overlay[hidden] {
	display: none;
}

.fcb-modal {
	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	padding: 1.75em;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	color: #333;
}

.fcb-modal-close {
	position: absolute;
	top: 0.75em;
	right: 0.75em;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2em;
	height: 2em;
	background: none;
	border: 0;
	border-radius: 50%;
	color: #666;
	font-size: 1.4em;
	line-height: 1;
	cursor: pointer;
}

.fcb-modal-close:hover,
.fcb-modal-close:focus {
	background: #f0f0f0;
}

.fcb-modal-title {
	margin: 0 0 0.6em;
	padding-right: 1.5em;
	font-size: 1.3em;
	font-weight: 800;
}

.fcb-modal-list {
	margin: 0 0 1.2em;
	padding-left: 1.2em;
}

.fcb-modal-list li {
	margin-bottom: 0.5em;
	line-height: 1.5;
}

.fcb-modal-estimate {
	padding: 1em 1.2em;
	background: #fdf1e7;
	border: 1px solid #f0a35f;
	border-radius: 8px;
}

.fcb-modal-estimate-label {
	margin: 0 0 0.3em;
	font-size: 0.85em;
	font-weight: 600;
	color: #767676;
}

.fcb-modal-estimate-line {
	margin: 0;
	font-size: 1.15em;
	font-weight: 800;
	color: #b5651d;
}

.fcb-modal-estimate-hint {
	margin: 0.4em 0 0;
	font-size: 0.8em;
	color: #767676;
}

.fcb-modal-urgent {
	margin: 1.2em 0 0;
	line-height: 1.6;
}

.fcb-modal-urgent a {
	color: var(--fcb-theme-colour);
}
