/* Built Uncommon Dad Bod Calculator — front-end calculator styles */

.bu-dbc-root {
	--bu-navy: #0c243e;
	--bu-navy-light: #14304f;
	--bu-green: #74f129;
	--bu-green-dark: #4f9c1c;
	--bu-blue: #29699c;
	--bu-text: #eef2f5;
	--bu-text-dim: #b7c3cf;
	--bu-error: #ff6161;
	--bu-radius: 10px;

	max-width: 680px;
	margin: 0 auto;
	background: var(--bu-navy);
	color: var(--bu-text);
	border-radius: 16px;
	padding: 32px 28px 28px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}
.bu-dbc-root *, .bu-dbc-root *::before, .bu-dbc-root *::after { box-sizing: border-box; }

/* WordPress themes/builders sometimes override the native [hidden] rule.
 * Keep step controls, overlays and result panels reliably hidden until JS reveals them. */
.bu-dbc-root [hidden] { display: none !important; }

.bu-dbc-progress { margin-bottom: 24px; }
.bu-dbc-progress-bar { height: 6px; background: var(--bu-navy-light); border-radius: 999px; overflow: hidden; }
.bu-dbc-progress-fill { display: block; height: 100%; background: linear-gradient(90deg, #fcff32, var(--bu-green)); transition: width 0.3s ease; width: 0%; }
.bu-dbc-progress-label { margin-top: 8px; font-size: 13px; color: var(--bu-text-dim); text-align: right; }

.bu-dbc-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bu-dbc-step-title {
	font-weight: 800;
	font-size: 26px;
	letter-spacing: 0.01em;
	margin: 0 0 6px;
	color: #fff !important;
	outline: none;
}
.bu-dbc-step-sub { margin: 0 0 22px; color: #fff !important; font-size: 15px; }

.bu-dbc-field { margin-bottom: 18px; }
.bu-dbc-field-row { display: flex; gap: 14px; }
.bu-dbc-field-row .bu-dbc-field { flex: 1; }

.bu-dbc-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #fff !important; text-transform: uppercase; letter-spacing: 0.04em; }

.bu-dbc-field input[type="text"],
.bu-dbc-field input[type="email"],
.bu-dbc-field input[type="number"],
.bu-dbc-field select {
	width: 100%;
	padding: 12px 14px;
	background: var(--bu-navy-light);
	border: 1px solid #2a4a6b;
	border-radius: var(--bu-radius);
	color: #fff;
	font-size: 16px;
}
.bu-dbc-field input:focus-visible,
.bu-dbc-field select:focus-visible { outline: 2px solid var(--bu-green); outline-offset: 1px; border-color: var(--bu-green); }

.bu-dbc-checkbox-field { display: flex; align-items: flex-start; gap: 10px; }
.bu-dbc-checkbox-field input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--bu-green); flex-shrink: 0; }
.bu-dbc-checkbox-field label { text-transform: none; font-size: 14px; color: #fff !important; font-weight: 400; }

.bu-dbc-fieldset { border: 0; padding: 0; margin: 0 0 24px; }
.bu-dbc-legend { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #fff !important; margin-bottom: 10px; padding: 0; }

.bu-dbc-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.bu-dbc-card-option { position: relative; }
.bu-dbc-card-option input[type="radio"] { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.bu-dbc-card-option label {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 56px;
	padding: 12px 10px;
	border: 2px solid #2a4a6b;
	border-radius: var(--bu-radius);
	background: var(--bu-navy-light);
	color: #fff !important;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.bu-dbc-card-option input[type="radio"]:checked + label {
	border-color: var(--bu-green);
	background: rgba(116, 241, 41, 0.12);
	color: var(--bu-green) !important;
}
.bu-dbc-card-option input[type="radio"]:focus-visible + label { outline: 2px solid var(--bu-green); outline-offset: 2px; }

.bu-dbc-bodyfat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.bu-dbc-bodyfat-option { position: relative; }
.bu-dbc-bodyfat-option input[type="radio"] {
	position: absolute;
	inset: 0;
	z-index: 3;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}
.bu-dbc-bodyfat-option label {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 14px 10px;
	border: 2px solid #2a4a6b;
	border-radius: var(--bu-radius);
	background: var(--bu-navy-light);
	color: #fff !important;
	cursor: pointer;
	position: relative;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.bu-dbc-bodyfat-swatch {
	width: 100%;
	height: 44px;
	border-radius: 6px;
	background: linear-gradient(180deg, rgba(116,241,41,0.35), rgba(116,241,41,0.05));
	position: relative;
	overflow: hidden;
}
.bu-dbc-bodyfat-swatch::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	background: var(--bu-green);
	opacity: 0.55;
}
.bu-dbc-bodyfat-swatch[data-range="10_15"]::after { height: 20%; }
.bu-dbc-bodyfat-swatch[data-range="16_20"]::after { height: 35%; }
.bu-dbc-bodyfat-swatch[data-range="21_25"]::after { height: 50%; }
.bu-dbc-bodyfat-swatch[data-range="26_30"]::after { height: 65%; }
.bu-dbc-bodyfat-swatch[data-range="31_35"]::after { height: 80%; }
.bu-dbc-bodyfat-swatch[data-range="36_plus"]::after { height: 95%; }
.bu-dbc-bodyfat-range { font-weight: 700; font-size: 15px; }
.bu-dbc-bodyfat-selected-indicator {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: none;
	align-items: center;
	justify-content: center;
	background: var(--bu-green) !important;
	color: var(--bu-navy) !important;
	font-size: 19px;
	font-weight: 900;
	line-height: 1;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.32);
}

/*
 * Use both the native :checked state and a JS-maintained class. Some themes/page
 * builders apply aggressive radio/label rules, so the real indicator element
 * and .is-selected class make the selection state resilient.
 */
.bu-dbc-bodyfat-option.is-selected label,
.bu-dbc-bodyfat-option input[type="radio"]:checked + label {
	border-color: var(--bu-green) !important;
	background: rgba(116, 241, 41, 0.14) !important;
	box-shadow: 0 0 0 3px rgba(116, 241, 41, 0.28), inset 0 0 0 1px rgba(116, 241, 41, 0.42) !important;
}
.bu-dbc-bodyfat-option.is-selected .bu-dbc-bodyfat-range,
.bu-dbc-bodyfat-option input[type="radio"]:checked + label .bu-dbc-bodyfat-range {
	color: var(--bu-green) !important;
}
.bu-dbc-bodyfat-option.is-selected .bu-dbc-bodyfat-selected-indicator,
.bu-dbc-bodyfat-option input[type="radio"]:checked + label .bu-dbc-bodyfat-selected-indicator {
	display: flex !important;
}
.bu-dbc-bodyfat-option.is-selected .bu-dbc-bodyfat-swatch,
.bu-dbc-bodyfat-option input[type="radio"]:checked + label .bu-dbc-bodyfat-swatch {
	box-shadow: 0 0 0 2px rgba(116, 241, 41, 0.6);
}
.bu-dbc-bodyfat-option input[type="radio"]:focus-visible + label { outline: 2px solid var(--bu-green); outline-offset: 3px; }

.bu-dbc-field-error { color: var(--bu-error); font-size: 13px; margin: 6px 0 0; }
[aria-invalid="true"] { border-color: var(--bu-error) !important; }

.bu-dbc-hp-wrap { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

.bu-dbc-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.bu-dbc-btn {
	appearance: none;
	border: none;
	border-radius: 999px;
	padding: 14px 26px;
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.bu-dbc-btn-back { background: transparent; color: var(--bu-text-dim); border: 1px solid #2a4a6b; }
.bu-dbc-btn-back:hover { color: #fff; border-color: var(--bu-text-dim); }
.bu-dbc-btn-next,
.bu-dbc-btn-submit { background: linear-gradient(90deg, #fcff32, var(--bu-green)); color: var(--bu-navy); margin-left: auto; }
.bu-dbc-btn-next:hover,
.bu-dbc-btn-submit:hover { filter: brightness(1.05); }
.bu-dbc-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.bu-dbc-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.bu-dbc-teaser-title { text-transform: uppercase; }

.bu-dbc-result {
	position: relative;
	text-align: center;
	padding: 30px 26px 12px;
	outline: none;
	overflow: hidden;
}
.bu-dbc-result::before {
	content: "";
	position: absolute;
	top: -110px;
	left: 50%;
	width: 300px;
	height: 300px;
	transform: translateX(-50%);
	background: radial-gradient(circle, rgba(116, 241, 41, 0.13) 0%, rgba(116, 241, 41, 0) 68%);
	pointer-events: none;
}
.bu-dbc-result-status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	margin: 0 auto 22px;
	border: 1px solid rgba(116, 241, 41, 0.32);
	border-radius: 999px;
	background: rgba(116, 241, 41, 0.07);
	color: var(--bu-green);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}
.bu-dbc-result-status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--bu-green);
	box-shadow: 0 0 0 4px rgba(116, 241, 41, 0.12);
}
.bu-dbc-result-icon {
	position: relative;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px;
	font-size: 34px;
	font-weight: 900;
	line-height: 1;
	box-shadow: 0 0 0 9px rgba(116, 241, 41, 0.08), 0 12px 35px rgba(0, 0, 0, 0.18);
}
.bu-dbc-result.is-success .bu-dbc-result-icon { background: var(--bu-green); color: var(--bu-navy); }
.bu-dbc-result.is-error .bu-dbc-result-icon { background: var(--bu-error); color: #fff; }
.bu-dbc-result-kicker {
	margin: 0 0 7px;
	color: var(--bu-green) !important;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.bu-dbc-result-title {
	max-width: 520px;
	margin: 0 auto 10px;
	color: #fff !important;
	font-size: clamp(26px, 5vw, 36px);
	font-weight: 850;
	line-height: 1.08;
	letter-spacing: -0.025em;
}
.bu-dbc-result-body {
	max-width: 475px;
	margin: 0 auto 25px;
	color: var(--bu-text-dim) !important;
	font-size: 15px;
	line-height: 1.6;
}
.bu-dbc-result-delivery {
	display: flex;
	align-items: center;
	gap: 15px;
	max-width: 530px;
	margin: 0 auto 22px;
	padding: 16px 18px;
	text-align: left;
	background: rgba(255, 255, 255, 0.045);
	border: 1px solid #2a4a6b;
	border-radius: 12px;
}
.bu-dbc-result-mail {
	width: 42px;
	height: 42px;
	border-radius: 10px;
	background: linear-gradient(135deg, #fcff32, var(--bu-green));
	color: var(--bu-navy);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	font-weight: 900;
	flex: 0 0 42px;
}
.bu-dbc-result-delivery-copy strong {
	display: block;
	margin-bottom: 3px;
	color: #fff !important;
	font-size: 14px;
}
.bu-dbc-result-delivery-copy span {
	display: block;
	color: var(--bu-text-dim) !important;
	font-size: 13px;
	line-height: 1.45;
	word-break: break-word;
}
.bu-dbc-result-delivery-copy b { color: #fff; font-weight: 700; }
.bu-dbc-result-includes {
	max-width: 530px;
	margin: 0 auto;
	padding-top: 4px;
}
.bu-dbc-result-includes-label {
	margin: 0 0 10px;
	color: #fff !important;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: left;
}
.bu-dbc-result-includes-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}
.bu-dbc-result-includes-grid > div {
	min-height: 72px;
	padding: 12px 10px;
	background: var(--bu-navy-light);
	border: 1px solid #2a4a6b;
	border-radius: 10px;
	text-align: left;
}
.bu-dbc-result-includes-grid span {
	display: block;
	margin-bottom: 7px;
	color: var(--bu-green);
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 0.08em;
}
.bu-dbc-result-includes-grid strong {
	display: block;
	color: #fff !important;
	font-size: 12px;
	line-height: 1.25;
}
.bu-dbc-result-note {
	margin: 18px 0 0;
	color: #8fa2b5 !important;
	font-size: 11px;
	line-height: 1.5;
}
.bu-dbc-result.is-error .bu-dbc-success-only { display: none; }
.bu-dbc-result.is-error { padding-top: 52px; padding-bottom: 45px; }

@media (max-width: 560px) {
	.bu-dbc-result { padding: 24px 3px 8px; }
	.bu-dbc-result-includes-grid { grid-template-columns: 1fr; }
	.bu-dbc-result-includes-grid > div { min-height: auto; }
	.bu-dbc-result-delivery { align-items: flex-start; }
}
.bu-dbc-progress-overlay {
	position: absolute; inset: 0; background: rgba(12, 36, 62, 0.92);
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	border-radius: 16px; gap: 16px; z-index: 5;
}
.bu-dbc-root { position: relative; }
.bu-dbc-spinner {
	width: 40px; height: 40px; border-radius: 50%;
	border: 4px solid #2a4a6b; border-top-color: var(--bu-green);
	animation: bu-dbc-spin 0.8s linear infinite;
}
@keyframes bu-dbc-spin { to { transform: rotate(360deg); } }
.bu-dbc-progress-overlay p { color: #fff; font-weight: 600; }

@media (max-width: 480px) {
	.bu-dbc-root { padding: 22px 18px; border-radius: 0; }
	.bu-dbc-step-title { font-size: 21px; }
	.bu-dbc-field-row { flex-direction: column; gap: 0; }
}
