.brxe-bif-intake-form {
	width: 820px;
}

/* Balustrader Intake Form — front end. Consumes Advanced Themer (AT) framework tokens.
   NOTE: this site roots at 62.5% (1rem = 10px). All AT vars already account for that;
   fallback/literal sizes here are written in px (not rem) so they stay correct regardless of root. */
.bif-wrap {
	--bif-accent: var(--at-primary, var(--primary, #1f2a37));
	--bif-success: var(--at-success, #1a7f47);
	--bif-success-bg: #dfffde;
	--bif-danger: var(--at-danger, #c0392b);
	--bif-border: var(--at-neutral, var(--at-black-t-5, rgba(0,0,0,.12)));
	--bif-radius: var(--at-radius--s, 8px);
	--bif-radius-s: var(--at-radius--xs, 5px);
	--bif-gap: var(--at-space--s, 16px);
	--bif-muted: var(--at-neutral-d-2, #5b6670);
	--bif-choice-icon-h: 48px;
	/* Exit-block icons. Used as CSS masks (alpha only, colour comes from currentColor)
	   because the html field is filtered through wp_kses_post, which strips inline SVG. */
	--bif-icon-help: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M9.1 9a3 3 0 0 1 5.8 1c0 2-3 3-3 3'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
	--bif-icon-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
	--bif-icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	--bif-icon-switch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 3l4 4-4 4'/%3E%3Cpath d='M20 7H4'/%3E%3Cpath d='M8 21l-4-4 4-4'/%3E%3Cpath d='M4 17h16'/%3E%3C/svg%3E");
	--bif-icon-email: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m2 7 10 6 10-6'/%3E%3C/svg%3E");
	--bif-icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E");
	--bif-icon-whatsapp: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M17.47 14.38c-.3-.15-1.76-.87-2.03-.97-.27-.1-.47-.15-.67.15-.2.3-.77.97-.94 1.16-.17.2-.35.22-.64.08-.3-.15-1.26-.47-2.4-1.48-.88-.79-1.48-1.76-1.65-2.06-.17-.3-.02-.46.13-.6.13-.14.3-.35.45-.52.15-.18.2-.3.3-.5.1-.2.05-.37-.03-.52-.07-.15-.66-1.61-.91-2.2-.24-.58-.49-.5-.67-.51h-.57c-.2 0-.52.07-.8.37-.27.3-1.03 1.02-1.03 2.48 0 1.46 1.06 2.87 1.21 3.07.15.2 2.1 3.2 5.08 4.49.7.3 1.26.49 1.69.62.71.23 1.36.2 1.87.12.57-.09 1.76-.72 2-1.41.25-.7.25-1.29.18-1.42-.08-.12-.28-.2-.57-.34m-5.42 7.4a9.87 9.87 0 0 1-5.03-1.38l-.36-.21-3.74.98 1-3.65-.24-.37a9.86 9.86 0 0 1-1.51-5.26c0-5.45 4.44-9.88 9.89-9.88 2.64 0 5.12 1.03 6.99 2.9a9.83 9.83 0 0 1 2.89 6.99c0 5.45-4.44 9.88-9.89 9.88M20.46 3.49A11.82 11.82 0 0 0 12.05 0C5.5 0 .16 5.34.16 11.89c0 2.1.55 4.14 1.59 5.95L.06 24l6.3-1.65a11.88 11.88 0 0 0 5.69 1.44c6.55 0 11.89-5.33 11.89-11.89 0-3.18-1.24-6.16-3.48-8.41'/%3E%3C/svg%3E");
	color: var(--at-neutral-d-2, #333);
	font-size: var(--at-text--s, 16px);
	display: flex;
    gap: var(--at-space--m);
    flex-direction: column;
}

.bif-wrap *, .bif-wrap *::before, .bif-wrap *::after { box-sizing: border-box; }

/* Intro choice */
.bif-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--bif-gap); }
.bif-wrap .bif-choice__card {
	position: relative;
	display: flex; flex-direction: column; gap: var(--at-space--m); align-items: flex-start; text-align: left;
	padding: var(--at-space--l, 24px); border: 1px solid var(--bif-border); border-radius: var(--bif-radius);
	background: var(--at-white, #fff); color: inherit; text-transform: none; font-weight: 400;
	cursor: pointer; transition: border-color var(--at-duration--fast, .2s) ease, box-shadow var(--at-duration--fast, .2s) ease;
}
.bif-wrap .bif-choice__card:hover, .bif-wrap .bif-choice__card:focus-visible { background: var(--at-white, #fff); color: inherit; border-color: var(--bif-accent); box-shadow: var(--at-shadow--m, 0 4px 6px -1px rgba(0,0,0,.1)); outline: none; }
/* Selected intro choice → green border + background + tick. */
.bif-wrap .bif-choice__card.is-selected, .bif-wrap .bif-choice__card.is-selected:hover { border-color: var(--bif-success); background: var(--bif-success-bg); box-shadow: 0 0 0 1px var(--bif-success); }
.bif-choice__tick { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; background: var(--bif-success); color: #fff; opacity: 0; transform: scale(.6); transition: opacity var(--at-duration--fast,.2s) ease, transform var(--at-duration--fast,.2s) ease; }
.bif-choice__card.is-selected .bif-choice__tick { opacity: 1; transform: scale(1); }
.bif-choice__icon { color: var(--bif-accent); }
.bif-choice__icon img, .bif-choice__icon-img { max-height: var(--bif-choice-icon-h, 48px); width: auto; height: auto; display: block; }
.bif-choice__title { font-size: var(--at-text--s, 21px); font-weight: 800; }
.bif-choice__desc { font-size: var(--at-text--xs, 14px); color: var(--bif-muted); }
.bif-choice__help { font-size: calc(var(--at-text--xs, 14px)*0.8); font-weight: 700; color: var(--bif-accent); }

/* Progress */
.bif-progress { height: 4px; background: var(--at-neutral-l-5, #eee); border-radius: 999px; margin-bottom: var(--at-space--l, 24px); overflow: hidden; }
.bif-progress__bar { display: block; height: 100%; width: 0; background: var(--bif-accent); transition: width .3s ease; }

.bif-form__intro { color: var(--bif-muted); margin: 0 0 var(--bif-gap); }
.bif-wrap .bif-back-to-choice { background: none; border: 0; color: var(--bif-accent); cursor: pointer; padding: 0 0 var(--bif-gap); font-weight: 700; text-transform: none; }

/* Steps & fields */
.bif-step__title { font-size: var(--at-heading--m, 26px); font-weight: 800; margin: 0 0 .15em; color: var(--at-neutral-d-4, #1f2a37); }
.bif-step__subtitle { color: var(--bif-muted); margin: 0 0 var(--at-space--m, 20px); }
.bif-step__fields { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--at-space--m, 20px); align-items: start; }
.bif-step__fields > .bif-field { grid-column: span 12; }
.bif-step__fields > .bif-field--half { grid-column: span 6; }
.bif-step__fields > .bif-field--third { grid-column: span 4; }
@media (max-width: 400px) { .bif-step__fields > .bif-field { grid-column: span 12; } }
.bif-field.bif-hidden { display: none; }
.bif-field__label { display: inline-block; font-size: var(--at-form-label-font-size, var(--at-text--s)); font-weight: 700; color: var(--at-form-label-color, var(--at-neutral-d-4)); margin-bottom: .35em; }
.bif-field__help { display: inline-block; font-size: var(--at-text--xs, 14px); color: var(--bif-muted); margin: 0 0 .5em 0.5em; }
.bif-req { color: var(--bif-danger); text-decoration: none; }
.bif-heading { font-size: var(--at-heading--s, 21px); margin: var(--at-space--m, 16px) 0 0; }

.bif-field input {
	--at-form-input-border-width: 1px;
}
.bif-field input[type=text], .bif-field input[type=email], .bif-field input[type=tel], .bif-field input[type=date],
.bif-field input[type=number], .bif-field select, .bif-field textarea {
	width: 100%; font: inherit; color: var(--at-form-input-color, #222);
	background: var(--at-form-input-background-color, #fff);
	border: var(--at-form-input-border-width, 1px) solid var(--at-form-input-border-color, var(--bif-border));
	border-radius: var(--at-form-input-border-radius, var(--bif-radius-s));
	padding: var(--at-form-input-padding-block, .5em) var(--at-form-input-padding-inline, .75em);
	transition: border-color var(--at-duration--fast, .2s) ease;
}
.bif-field input:focus, .bif-field select:focus, .bif-field textarea:focus { outline: none; border-color: var(--bif-accent); }
.bif-number { position: relative; display: block; }
.bif-number[name=balustrades_m], .bif-number[name=handrails_m], .bif-repeater__row .bif-field .bif-number input { padding-right: 30px; }
.bif-number__unit { position: absolute; right: .8em; top: 50%; transform: translateY(-50%); color: var(--bif-muted); pointer-events: none; }

.bif-field--error input, .bif-field--error select, .bif-field--error textarea,
.bif-field--error .bif-cards, .bif-field--error .bif-file { border-color: var(--bif-danger) !important; }
/* A card group has no border of its own, so flag the cards themselves — otherwise a missed
   required cards/pills answer had no visible indication at all. */
.bif-field--error .bif-card:not(.is-selected) { border-color: var(--bif-danger); }
.bif-field--error .bif-field__label { color: var(--bif-danger); }
.bif-field__error { color: var(--bif-danger); font-weight: 700; font-size: var(--at-text--xs, 14px); margin: .35em 0 0; }
.bif-field__error[hidden] { display: none; } /* survives themes that force `display` on p */

/* Live success: a completed, type-valid control the user has interacted with turns to the success
   background. Backed by native validity + the `required` attribute, so it can't go green when submit
   would fail (empty required, bad email, etc.). :not(:placeholder-shown) keeps empty fields neutral. */
.bif-field input:user-valid:not(:placeholder-shown),
.bif-field textarea:user-valid:not(:placeholder-shown),
.bif-field select:user-valid { background-color: var(--bif-success-bg); border-color: var(--bif-success);}
/* Clearing a flagged field once it is answered is done in JS (clearFixedErrors), not with
   :user-valid — card/pill inputs carry no `required` attribute, so they read as user-valid the
   moment they are touched and a :has() rule here silently hid their "Required" message. */

/* Selector cards (pills) */
.bif-cards { display: grid; grid-template-columns: repeat(var(--bif-cols, 3), 1fr); gap: var(--at-space--xs, 12px); }
@media (max-width: 540px) { .bif-cards { grid-template-columns: 1fr 1fr; } }
/* Pill mode: applies ONLY when the WHOLE group is label-only (no card has a description, accent,
   image or icon). Then the group lays out as inline pills sized to their text. A mixed group keeps
   the standard card grid + radius — so one richer card no longer turns its siblings into pills. */
.bif-cards:not(:has(.bif-card__desc, .bif-card__accent, .bif-card__media img, .bif-card__icon)) { display: flex; flex-wrap: wrap; }
.bif-card {
	--bif-card-radius: var(--at-radius--s, 8px);
	--bif-card-gap: .5em;
	--bif-card-padding: var(--at-space--2xs, 10px);
	position: relative; display: flex; flex-direction: column; gap: var(--bif-card-gap); cursor: pointer;
	padding: var(--bif-card-padding); border: 1px solid var(--bif-border); border-radius: var(--bif-card-radius);
	background: var(--at-neutral-l-6, #fff); transition: border-color var(--at-duration--fast, .2s) ease, box-shadow var(--at-duration--fast, .2s) ease, transform var(--at-duration--fast, .2s) ease;
}
/* applyConditions() (bif-form.js) sets [hidden] on a condition-hidden option's own
   .bif-card label — the single element/class render_card() emits for cards, cards_multi,
   pills and pills_multi alike (pill mode is this same .bif-card under a :not(:has(...))
   container below, not a separate class). Without this, the author-origin `display: flex`
   above beats the user-agent [hidden] rule, so the card stays fully visible and clicking
   it appears to do nothing. */
.bif-card[hidden] { display: none; }
/* Every card in a label-only group gets the pill radius (corner tick hidden — it would overlap the label). */
.bif-cards:not(:has(.bif-card__desc, .bif-card__accent, .bif-card__media img, .bif-card__icon)) .bif-card { --bif-card-radius: 999px; --bif-card-gap: 0; --bif-card-padding: var(--at-space--3xs, 5px) var(--at-space--s, 16px); }
.bif-cards:not(:has(.bif-card__desc, .bif-card__accent, .bif-card__media img, .bif-card__icon)) .bif-card__tick { display: none; }
.bif-card__input { position: absolute; opacity: 0; width: 0; height: 0; }
.bif-card:hover { border-color: var(--bif-accent); box-shadow: var(--at-shadow--s, 0 1px 3px rgba(0,0,0,.12)); }
.bif-card__input:focus-visible + .bif-card__media { outline: 2px solid var(--bif-accent); outline-offset: 2px; }
.bif-card.is-selected { border-color: var(--bif-success); box-shadow: 0 0 0 1px var(--bif-success); background-color: var(--bif-success-bg);}
.bif-card__media { display: block; }
.bif-card__media img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--bif-radius-s); }
.bif-card__icon { display: inline-flex; color: var(--bif-accent); }
.bif-card__icon svg { width: 28px; height: 28px; }
.bif-card__body { display: flex; flex-direction: column; gap: .15em; }
.bif-card__label { font-size: var(--at-text--xs, 14px); font-weight: 500; color: var(--at-neutral-d-4, #1f2a37); }
.bif-card__desc { font-size: var(--at-text--3xs, 10px); color: var(--bif-muted); line-height: 1.4; }
.bif-card__accent { font-size: var(--at-text--3xs, 10px); font-weight: 700; color: var(--bif-accent); }
.bif-card__tick {
	position: absolute; top: 9px; right: 9px; width: 24px; height: 24px; border-radius: 999px;
	display: grid; place-items: center; background: var(--bif-success); color: #fff;
	opacity: 0; transform: scale(.6); transition: opacity var(--at-duration--fast,.2s) ease, transform var(--at-duration--fast,.2s) ease;
}
.bif-card.is-selected .bif-card__tick { opacity: 1; transform: scale(1); }

/* Repeater */
.bif-repeater__row { position: relative; border: 1px dashed var(--bif-border); border-radius: var(--bif-radius); padding: var(--at-space--s, 16px); margin-bottom: var(--at-space--xs, 12px); }
.bif-repeater__row-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: var(--at-space--xs, 12px); }
.bif-wrap .bif-repeater__remove { display: flex; justify-content: center; align-items: center; position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 999px; background: var(--at-neutral-l-5,#eee); color: var(--bif-muted); cursor: pointer; font-size: 18px; line-height: 1; text-transform: none; padding: 0; }
.bif-wrap .bif-repeater__remove:hover { background: var(--bif-danger); color: #fff; }

/* File */
.bif-file { display: block; border: 2px dashed var(--bif-border); border-radius: var(--bif-radius); padding: var(--at-space--m, 20px); text-align: center; cursor: pointer; color: var(--bif-muted); }
.bif-file:hover { border-color: var(--bif-accent); }
.bif-file input[type=file] { display: none; }
.bif-file__list { display: block; margin-top: .5em; font-size: var(--at-text--xs, 14px); color: var(--at-neutral-d-4); }

/* Help / exit block (field type `exit`) — the way out for a customer who feels stuck.
   Icons are CSS masks so they inherit currentColor and need no inline SVG. */
.bif-exit {
	position: relative;
	padding: var(--at-space--m, 20px);
	padding-left: calc(var(--at-space--m, 20px) + 34px);
	border: 1px solid color-mix(in srgb, var(--bif-accent) 45%, transparent);
	border-radius: var(--bif-radius);
	background: color-mix(in srgb, var(--bif-accent) 6%, #fff);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bif-accent) 12%, transparent);
}
.bif-exit__badge {
	position: absolute; top: var(--at-space--m, 20px); left: var(--at-space--s, 16px);
	width: 22px; height: 22px; background: var(--bif-accent);
	-webkit-mask: var(--bif-icon-help) center/contain no-repeat; mask: var(--bif-icon-help) center/contain no-repeat;
}
.bif-exit__title { margin: 0; font-size: var(--at-text--s, 16px); font-weight: 800; color: var(--at-neutral-d-4, #1f2a37); }
.bif-exit__text { margin: 0; font-size: var(--at-text--xs, 14px); color: var(--bif-muted); }
.bif-exit__actions { display: flex; flex-wrap: wrap; gap: var(--at-space--xs, 12px); margin-top: var(--at-space--s, 16px); }

/* Collapsed by default — only the badge, heading and this toggle show. */
.bif-wrap .bif-exit__toggle {
	display: inline-flex; align-items: center; gap: .4em; margin: .25em 0 0; padding: 0;
	background: none; border: 0; cursor: pointer;
	font: inherit; font-size: var(--at-text--xs, 14px); font-weight: 700; text-transform: none;
	color: var(--bif-accent); text-decoration: underline; text-underline-offset: .2em;
}
.bif-wrap .bif-exit__toggle:hover, .bif-wrap .bif-exit__toggle:focus-visible { background: none; color: var(--bif-accent); filter: brightness(.85); }
.bif-exit__chevron {
	width: 13px; height: 13px; flex: 0 0 13px; background: currentColor;
	-webkit-mask: var(--bif-icon-chevron) center/contain no-repeat; mask: var(--bif-icon-chevron) center/contain no-repeat;
	transition: transform var(--at-duration--fast, .2s) ease;
}
.bif-exit[data-open="1"] .bif-exit__chevron { transform: rotate(180deg); }

/* Height animation without measuring: the panel is a grid row that grows 0fr → 1fr. */
.bif-exit__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s ease; }
.bif-exit[data-open="1"] .bif-exit__panel { grid-template-rows: 1fr; }
.bif-exit__panel-inner {
	min-height: 0; overflow: hidden; /* visibility keeps collapsed links out of the tab order */
	padding-top: var(--at-space--s, 16px); /* constant, so expanding never snaps the padding in */
	visibility: hidden; opacity: 0; transition: opacity .2s ease, visibility 0s linear .32s;
}
.bif-exit[data-open="1"] .bif-exit__panel-inner { visibility: visible; opacity: 1; transition: opacity .25s ease .08s, visibility 0s; }
@media (prefers-reduced-motion: reduce) {
	.bif-exit__panel, .bif-exit__panel-inner, .bif-exit__chevron { transition: none; }
}
.bif-wrap .bif-exit__action {
	display: inline-flex; align-items: center; gap: .5em;
	padding: .5em 1em; border: 1px solid var(--bif-border); border-radius: 999px;
	background: var(--at-white, #fff); color: var(--at-neutral-d-4, #1f2a37);
	font-size: var(--at-text--xs, 14px); font-weight: 700; line-height: 1.3; text-decoration: none; text-transform: none;
	transition: border-color var(--at-duration--fast,.2s) ease, color var(--at-duration--fast,.2s) ease, box-shadow var(--at-duration--fast,.2s) ease;
}
.bif-wrap .bif-exit__action:hover, .bif-wrap .bif-exit__action:focus-visible { border-color: var(--bif-accent); color: var(--bif-accent); box-shadow: var(--at-shadow--s, 0 1px 3px rgba(0,0,0,.12)); outline: none; }
.bif-wrap .bif-exit__action--whatsapp:hover, .bif-wrap .bif-exit__action--whatsapp:focus-visible { border-color: #25d366; color: #128c4a; }
.bif-exit__action .bif-exit__icon { width: 17px; height: 17px; flex: 0 0 17px; background: currentColor; -webkit-mask: center/contain no-repeat; mask: center/contain no-repeat; }
.bif-exit__action--switch .bif-exit__icon { -webkit-mask-image: var(--bif-icon-switch); mask-image: var(--bif-icon-switch); }
.bif-exit__action--whatsapp .bif-exit__icon { -webkit-mask-image: var(--bif-icon-whatsapp); mask-image: var(--bif-icon-whatsapp); }
.bif-exit__action--email .bif-exit__icon { -webkit-mask-image: var(--bif-icon-email); mask-image: var(--bif-icon-email); }
.bif-exit__action--phone .bif-exit__icon { -webkit-mask-image: var(--bif-icon-phone); mask-image: var(--bif-icon-phone); }
@media (max-width: 400px) { .bif-exit__actions { flex-direction: column; align-items: stretch; } .bif-wrap .bif-exit__action { justify-content: center; } }

/* "Your details have been carried over" notice shown after switching forms. */
.bif-switched {
	display: flex; flex-wrap: wrap; align-items: center; gap: .6em;
	margin: 0 0 var(--bif-gap); padding: .7em 1em;
	border: 1px solid var(--bif-success); border-radius: var(--bif-radius);
	background: var(--bif-success-bg); color: var(--at-neutral-d-4, #1f2a37);
	font-size: var(--at-text--xs, 14px); font-weight: 700;
}
.bif-wrap .bif-switched__undo {
	background: none; border: 0; padding: 0; margin-left: auto;
	font: inherit; color: var(--bif-accent); text-transform: none; text-decoration: underline; cursor: pointer;
}

/* Save-for-later consent panel. Shown once per device before the first 30-day
   save, and thereafter only as the "already saved" manage view. */
.bif-save {
	margin-top: var(--at-space--l, 24px); padding: var(--at-space--m, 20px);
	border: 1px solid var(--bif-border); border-radius: var(--bif-radius);
	background: var(--at-neutral-l-6, #fff);
	box-shadow: var(--at-shadow--s, 0 1px 3px rgba(0,0,0,.12));
}
.bif-save[data-saved="0"] .bif-save__done, .bif-save[data-saved="1"] .bif-save__ask { display: none; }
.bif-save__title { margin: 0 0 .5em; font-size: var(--at-text--s, 16px); font-weight: 800; color: var(--at-neutral-d-4, #1f2a37); }
.bif-save__text { margin: 0 0 .6em; font-size: var(--at-text--xs, 14px); color: var(--bif-muted); }
/* The public-computer caution has to read as a caution, not a third grey line. */
.bif-save__warn {
	position: relative; padding: .7em .9em .7em 2.4em;
	border-radius: var(--bif-radius-s); color: var(--at-neutral-d-4, #1f2a37);
	background: color-mix(in srgb, var(--bif-danger) 8%, #fff);
	border: 1px solid color-mix(in srgb, var(--bif-danger) 35%, transparent);
}
.bif-save__warn::before {
	content: ""; position: absolute; left: .9em; top: .85em; width: 16px; height: 16px; background: var(--bif-danger);
	-webkit-mask: var(--bif-icon-warn) center/contain no-repeat; mask: var(--bif-icon-warn) center/contain no-repeat;
}
.bif-save__actions { display: flex; flex-wrap: wrap; gap: var(--at-space--xs, 12px); margin: var(--at-space--s, 16px) 0 0; }
.bif-wrap .bif-save__actions .bif-btn { margin-left: 0; }
.bif-wrap .bif-nav__save { margin-left: 0; margin-right: auto; }
.bif-wrap .bif-nav__save.is-saved { border-color: var(--bif-success); color: var(--bif-success); }

/* Draft status bar above the form (restored / offer to restore / saved). */
.bif-draft {
	display: flex; flex-wrap: wrap; align-items: center; gap: .6em;
	margin: 0 0 var(--bif-gap); padding: .7em 1em;
	border: 1px solid var(--bif-border); border-radius: var(--bif-radius);
	background: var(--at-neutral-l-6, #f7f8f9); color: var(--at-neutral-d-4, #1f2a37);
	font-size: var(--at-text--xs, 14px);
}
.bif-wrap .bif-draft__act {
	background: none; border: 0; padding: 0; font: inherit; font-weight: 700;
	color: var(--bif-accent); text-transform: none; text-decoration: underline; cursor: pointer;
}
.bif-wrap .bif-draft__act:first-of-type { margin-left: auto; }

/* Nav & buttons */
.bif-nav { display: flex; gap: var(--at-space--xs, 12px); margin-top: var(--at-space--l, 24px); }
.bif-wrap .bif-btn {
	font: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; cursor: pointer;
	color: var(--at-btn-primary-color, #fff); background: var(--bif-accent);
	border: 2px solid transparent; border-radius: var(--at-radius--xs, var(--bif-radius-s));
	padding: .65em 1.4em; transition: all var(--at-duration--fast,.2s) ease; margin-left: auto;
}
.bif-wrap .bif-btn:hover { background: var(--bif-accent); filter: brightness(.94); box-shadow: var(--at-shadow--l, 0 10px 15px -3px rgba(0,0,0,.1)); }
.bif-wrap .bif-btn--ghost { background: transparent; color: var(--bif-accent); border-color: var(--bif-border); margin-left: 0; }
.bif-wrap .bif-btn--ghost:hover { background: transparent; color: var(--bif-accent); }
.bif-wrap .bif-nav__next, .bif-wrap .bif-nav__submit { margin-left: auto; }
.bif-wrap .bif-btn:disabled { opacity: .6; cursor: default; }

/* Messages */
.bif-form__message { padding: var(--at-space--m, 20px); border-radius: var(--bif-radius); margin-top: var(--bif-gap); }
.bif-form__message.is-success { background: var(--at-success, #1a7f47); color: #fff; }
.bif-form__message.is-error { background: color-mix(in srgb, var(--bif-danger) 12%, #fff); color: var(--bif-danger); border: 1px solid var(--bif-danger); }
.bif-notice { padding: 16px; background: #fff3cd; border: 1px solid #ffe69c; border-radius: 6px; }

/* ---- Auto-estimate panel on the thank-you screen ---- */
.bif-estimate {
	margin-top: var(--bif-gap);
	padding: var(--at-space--m, 20px);
	border: 1px solid var(--bif-border);
	border-radius: var(--bif-radius);
	background: var(--at-neutral-l-3, #f8fafc);
}
.bif-estimate__title { margin: 0 0 .25em; font-size: var(--at-text--s, 15px); color: var(--at-neutral-d-1, #4b5563); }
.bif-estimate__total { margin: 0 0 .5em; font-size: var(--at-heading--m, 30px); font-weight: 800; color: var(--at-success, #1a7f47); }
.bif-estimate__group { margin-top: var(--at-space--s, 16px); }
.bif-estimate__group-title { margin: 0 0 .3em; font-weight: 700; }
.bif-estimate__lines { width: 100%; border-collapse: collapse; font-size: var(--at-text--xs, 14px); }
.bif-estimate__lines td { padding: .45em .4em .45em 0; border-bottom: 1px solid var(--bif-border); vertical-align: top; }
.bif-estimate__lines td:nth-child(2), .bif-estimate__lines td:nth-child(3) { white-space: nowrap; color: var(--at-neutral-d-1, #6b7280); }
.bif-estimate__lines td:last-child { text-align: right; white-space: nowrap; font-weight: 700; padding-right: 0; }
.bif-estimate__sub td { border-bottom: 0; font-weight: 700; }
.bif-estimate__sub td:first-child { text-align: right; color: var(--at-neutral-d-1, #6b7280); font-weight: 400; }
.bif-estimate__disclaimer { margin: var(--at-space--s, 16px) 0 0; padding: .6em .9em; border-radius: var(--bif-radius); background: var(--at-neutral-l-2, #eef2f6); color: var(--at-neutral-d-1, #6b7280); font-size: var(--at-text--xs, 13px); }
.bif-estimate__actions { display: flex; flex-wrap: wrap; gap: var(--at-space--xs, 12px); margin-top: var(--at-space--s, 16px); }
.bif-wrap .bif-estimate__send {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	padding: .6em 1.2em; border: 1px solid var(--bif-border); border-radius: 999px; cursor: pointer;
	background: var(--at-white, #fff); color: var(--at-neutral-d-4, #1f2a37);
	font-size: var(--at-text--xs, 14px); font-weight: 700; line-height: 1.3; text-transform: none;
}
.bif-wrap .bif-estimate__send:hover:not(:disabled), .bif-wrap .bif-estimate__send:focus-visible { border-color: var(--bif-accent); color: var(--bif-accent); box-shadow: var(--at-shadow--s, 0 1px 3px rgba(0,0,0,.12)); outline: none; }
.bif-wrap .bif-estimate__send--whatsapp:hover:not(:disabled) { border-color: #25d366; color: #128c4a; }
.bif-wrap .bif-estimate__send:disabled { opacity: .7; cursor: default; }
.bif-wrap .bif-estimate__send.is-sent { border-color: var(--at-success, #1a7f47); color: var(--at-success, #1a7f47); opacity: 1; }
.bif-estimate__status { margin: .6em 0 0; color: var(--bif-danger, #b91c1c); font-size: var(--at-text--xs, 13px); }
@media (max-width: 400px) { .bif-estimate__actions { flex-direction: column; align-items: stretch; } }

/* ---------------- Consent notice ---------------- */

.bif-consent {
	margin: 0 0 var(--at-space--m, 16px);
	padding: var(--at-space--xs, 8px) var(--at-space--s, 12px);
	border-left: 3px solid var(--at-neutral-300, #d8d8d8);
	background: var(--at-neutral-050, #f7f7f7);
	border-radius: var(--at-radius--s, 4px);
	color: var(--at-text--muted, #666);
	font-size: 0.875em;
	line-height: 1.5;
}

/* ---------------- Quote page ---------------- */

.bif-quote {
	max-width: 720px;
	margin: var(--at-space--l, 24px) auto;
	padding: var(--at-space--l, 24px);
	background: var(--at-neutral-000, #fff);
	border: 1px solid var(--at-neutral-200, #e6e6e6);
	border-radius: var(--at-radius--m, 8px);
	box-shadow: var(--at-shadow--s, 0 1px 3px rgba(0, 0, 0, 0.06));
}

.bif-quote__eyebrow {
	margin: 0 0 var(--at-space--2xs, 4px);
	color: var(--at-text--muted, #666);
	font-size: 0.9375em;
}

/* The number is the reason the page exists — let it carry the page. */
.bif-quote__total {
	margin: 0 0 var(--at-space--xs, 8px);
	color: var(--at-success, #1a7f47);
	font-size: clamp(2rem, 6vw, 3rem);
	font-weight: 700;
	line-height: 1.1;
}

.bif-quote__lead { margin: 0 0 var(--at-space--m, 16px); font-size: 1.125em; }

.bif-quote__valid {
	margin: 0 0 var(--at-space--l, 24px);
	color: var(--at-text--muted, #666);
	font-size: 0.9375em;
}

.bif-quote__group { margin: var(--at-space--l, 24px) 0; }

.bif-quote__group-title {
	margin: 0 0 var(--at-space--xs, 8px);
	font-weight: 600;
	color: var(--at-heading--color, inherit);
}

.bif-quote__lines { width: 100%; border-collapse: collapse; font-size: 0.9375em; }

.bif-quote__lines td {
	padding: var(--at-space--xs, 8px) var(--at-space--2xs, 4px);
	border-bottom: 1px solid var(--at-neutral-100, #eee);
	vertical-align: top;
}

/* Money and quantities read as columns, not prose. */
.bif-quote__lines td:nth-child(2),
.bif-quote__lines td:nth-child(3) { white-space: nowrap; color: var(--at-text--muted, #666); }
.bif-quote__lines td:last-child { text-align: right; white-space: nowrap; }

.bif-quote__sub td { border-bottom: 0; padding-top: var(--at-space--s, 12px); }
.bif-quote__sub td:first-child { text-align: right; color: var(--at-text--muted, #666); }
.bif-quote__sub td:last-child { color: var(--at-success, #1a7f47); }

.bif-quote__disclaimer {
	margin: var(--at-space--l, 24px) 0 0;
	padding: var(--at-space--s, 12px) var(--at-space--m, 16px);
	background: var(--at-neutral-050, #f7f7f7);
	border-radius: var(--at-radius--s, 4px);
	color: var(--at-text--muted, #555);
	font-size: 0.875em;
}

.bif-quote__ref { margin: var(--at-space--m, 16px) 0 0; color: var(--at-text--muted, #666); font-size: 0.875em; }

.bif-quote__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--at-space--s, 12px);
	margin-top: var(--at-space--l, 24px);
}

/* The action buttons carry Bricks' own classes so they inherit the site's
   Theme Styles. Everything below is layout and state only — no background,
   padding, radius or font may be set here. Bricks 2.0 ships its CSS inside
   @layer bricks, and unlayered plugin CSS beats a layer at any specificity,
   so a stray background here would silently make those classes inert. */
.bif-quote__actions .bricks-button { flex: 1 1 220px; text-decoration: none; }

/* Two corrections to the site's Bricks Theme Style, which sets buttons in
   uppercase and puts their border-radius in the Hover tab only — so the corners
   square off again the moment the pointer leaves. Bricks' own CSS sets neither
   property, so nothing is being fought here; these are the values the buttons
   should already have had in both states. Fix it under Theme Styles → Button
   and both lines can go, along with the same fault on every other button. */
.bif-quote__actions .bricks-button,
.bif-quote__actions .bricks-button:hover {
	text-transform: none;
	border-radius: var(--at-radius--xs, 2px);
}

/* .bricks-button.outline sets a 2px border but no colour, so it falls back to
   currentColor. Point it at the theme's own token rather than ours. */
.bif-quote__pdf { color: var(--bricks-color-primary, var(--at-primary, #1a7f47)); }

/* Bricks has no disabled state of its own. */
.bif-quote__send:disabled { opacity: 0.55; cursor: default; }

/* .bricks-button is inline-flex with gap:10px, so these pseudo-elements
   become flex items and space themselves — no extra markup needed. */
.bif-quote__send.is-busy::before {
	content: "";
	width: 0.9em;
	height: 0.9em;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: bif-spin 0.7s linear infinite;
}

.bif-quote__send.is-sent::after {
	content: "✓";
	color: var(--at-success, #1a7f47);
	background: #fff;
	border-radius: 50%;
	width: 1.15em;
	height: 1.15em;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	line-height: 1;
}

@keyframes bif-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
	.bif-quote__send.is-busy::before { animation: none; }
}

.bif-quote__status { margin: var(--at-space--s, 12px) 0 0; font-size: 0.9375em; }

/* Expired: state the fact plainly, keep the figures readable underneath. */
.bif-quote__expired {
	margin: 0 0 var(--at-space--l, 24px);
	padding: var(--at-space--s, 12px) var(--at-space--m, 16px);
	border-left: 3px solid var(--at-danger, #b3261e);
	background: var(--at-neutral-050, #f7f7f7);
	border-radius: var(--at-radius--s, 4px);
}

.bif-quote__expired p { margin: 0; font-size: 0.9375em; color: var(--at-text--muted, #555); }
.bif-quote__expired-title { font-weight: 700; color: var(--at-danger, #b3261e); margin-bottom: var(--at-space--2xs, 4px) !important; }
.bif-quote.is-expired .bif-quote__total { color: var(--at-text--muted, #666); }
.bif-quote--empty { text-align: center; }

/* Empty state: the ways to reach a human. Wraps to one per line on a narrow
   screen rather than crowding them onto one. */
.bif-quote__contact {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--at-space--2xs, 4px) var(--at-space--m, 16px);
	margin: var(--at-space--m, 16px) 0 0;
	font-size: 0.9375em;
}

.bif-quote__contact-link {
	color: var(--bricks-color-primary, var(--at-primary, #1a7f47));
	font-weight: 600;
}
