/* Broward Badge Designer
   Palette: deep navy stage + gold badge + ink controls.
   Display: Oswald (condensed, echoes engraved badge lettering). Body: Inter. */

.bbd-app {
	--navy-900: #0c1f37;
	--navy-800: #102a47;
	--navy-700: #15355a;
	--gold-500: #c8a24a;
	--gold-400: #d8b765;
	--ink-900: #16202e;
	--ink-600: #4a5b70;
	--line: #e1e6ec;
	--panel: #ffffff;
	--panel-2: #f6f8fb;
	--radius: 10px;

	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	max-width: 1080px;
	margin: 0 auto;
	font-family: "Inter", system-ui, -apple-system, sans-serif;
	color: var(--ink-900);
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 18px 50px -28px rgba(12, 31, 55, .45);
}

/* Desktop: controls left, sticky preview right (matches the reference tool). */
@media (min-width: 860px) {
	.bbd-app {
		grid-template-columns: 1fr 1fr;
	}
	.bbd-controls { order: 1; }
	.bbd-stage { order: 2; }
}

/* ---------- STAGE / PREVIEW ---------- */
.bbd-stage {
	background:
		radial-gradient(120% 90% at 50% 0%, var(--navy-700) 0%, var(--navy-900) 70%);
	color: #fff;
	padding: 28px 24px 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}
@media (min-width: 860px) {
	.bbd-stage {
		position: sticky;
		top: 0;
		align-self: start;
		min-height: 100%;
		justify-content: center;
	}
}

.bbd-stage__head { margin-bottom: 8px; }

.bbd-eyebrow {
	font-family: "Oswald", sans-serif;
	text-transform: uppercase;
	letter-spacing: .22em;
	font-size: 11px;
	font-weight: 600;
	color: var(--gold-400);
}
.bbd-stage__title {
	font-family: "Oswald", sans-serif;
	font-weight: 600;
	font-size: 26px;
	letter-spacing: .04em;
	margin: 2px 0 4px;
	color: #fff;
}
.bbd-stage__meta {
	font-size: 14px;
	color: #c4d1e2;
	margin: 0;
	display: flex;
	gap: 8px;
	justify-content: center;
	align-items: center;
}
.bbd-price { color: var(--gold-400); font-weight: 600; }
.bbd-dot { opacity: .5; }

.bbd-canvas-wrap {
	margin: 18px 0 10px;
	width: 100%;
	max-width: 300px;
	filter: drop-shadow(0 14px 26px rgba(0, 0, 0, .4));
}
.bbd-canvas {
	width: 100%;
	height: auto;
	display: block;
}
.bbd-disclaimer {
	font-size: 11px;
	color: #8ea1bb;
	margin: 4px 0 18px;
}

.bbd-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	width: 100%;
}

/* ---------- CONTROLS ---------- */
.bbd-controls {
	padding: 28px 24px 32px;
	background: var(--panel);
}
.bbd-controls__title {
	font-family: "Oswald", sans-serif;
	font-weight: 600;
	font-size: 22px;
	letter-spacing: .03em;
	text-transform: uppercase;
	margin: 0 0 20px;
	color: var(--navy-800);
}

.bbd-field { margin-bottom: 16px; }

.bbd-label {
	display: block;
	font-family: "Oswald", sans-serif;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: .08em;
	font-size: 12px;
	color: var(--navy-700);
	margin-bottom: 6px;
}
.bbd-label--sm { font-size: 11px; }

.bbd-select,
.bbd-input {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel-2);
	font-size: 15px;
	font-family: inherit;
	color: var(--ink-900);
	transition: border-color .15s, box-shadow .15s;
}
.bbd-select:focus,
.bbd-input:focus {
	outline: none;
	border-color: var(--navy-700);
	box-shadow: 0 0 0 3px rgba(21, 53, 90, .12);
	background: #fff;
}
.bbd-textarea { resize: vertical; min-height: 64px; }

.bbd-field--inline {
	display: grid;
	grid-template-columns: 60px 1fr;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}
.bbd-field--inline .bbd-label { margin-bottom: 0; }

/* Segmented (Block / Roman) */
.bbd-segmented {
	display: inline-flex;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--panel-2);
}
.bbd-seg {
	border: 0;
	background: transparent;
	padding: 10px 22px;
	font-family: "Oswald", sans-serif;
	letter-spacing: .06em;
	text-transform: uppercase;
	font-size: 13px;
	color: var(--ink-600);
	cursor: pointer;
	transition: background .15s, color .15s;
}
.bbd-seg.is-active {
	background: var(--navy-800);
	color: #fff;
}

/* Color swatches */
.bbd-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.bbd-swatch {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 12px 6px 7px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
	font-size: 13px;
	color: var(--ink-900);
	transition: border-color .15s, box-shadow .15s;
}
.bbd-swatch::before {
	content: "";
	width: 16px; height: 16px;
	border-radius: 50%;
	background: var(--sw);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
}
.bbd-swatch.is-active {
	border-color: var(--navy-700);
	box-shadow: 0 0 0 2px rgba(21, 53, 90, .15);
}

.bbd-fieldset {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 16px 14px 6px;
	margin: 0 0 18px;
}
.bbd-legend {
	font-family: "Oswald", sans-serif;
	text-transform: uppercase;
	letter-spacing: .1em;
	font-size: 11px;
	font-weight: 600;
	color: var(--gold-500);
	padding: 0 6px;
}

/* Buttons */
.bbd-btn {
	font-family: "Oswald", sans-serif;
	text-transform: uppercase;
	letter-spacing: .06em;
	font-size: 13px;
	padding: 11px 18px;
	border-radius: var(--radius);
	border: 1px solid rgba(255, 255, 255, .35);
	background: transparent;
	color: #fff;
	cursor: pointer;
	transition: background .15s, transform .05s;
}
.bbd-btn:hover { background: rgba(255, 255, 255, .12); }
.bbd-btn:active { transform: translateY(1px); }
.bbd-btn--primary {
	background: var(--gold-500);
	border-color: var(--gold-500);
	color: var(--navy-900);
	font-weight: 600;
}
.bbd-btn--primary:hover { background: var(--gold-400); }

.bbd-status {
	font-size: 13px;
	margin: 4px 0 0;
	min-height: 18px;
	color: var(--navy-700);
}
.bbd-status.is-error { color: #9b1c20; }
.bbd-status.is-ok { color: #15512c; }

/* Accessibility: visible focus everywhere */
.bbd-app :focus-visible {
	outline: 2px solid var(--gold-500);
	outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
	.bbd-app * { transition: none !important; }
}
