/* TBFS insurance flow wizard. Uses theme palette variables with fallbacks
   so it degrades gracefully outside the tbfs-theme. */

/* The theme and this sheet set explicit display values on cards, which
   would otherwise override the UA's [hidden] rule — the search filter
   relies on the hidden attribute actually hiding things. */
.tbfs-flow [hidden] {
	display: none !important;
}

.tbfs-flow {
	--flow-teal: var(--wp--preset--color--teal, #84cfc9);
	--flow-teal-dark: var(--wp--preset--color--teal-dark, #3f9e97);
	--flow-teal-light: var(--wp--preset--color--teal-light, #e9f7f6);
	--flow-coral: var(--wp--preset--color--coral, #f37868);
	--flow-muted: var(--wp--preset--color--muted, #6f7a80);
	box-sizing: border-box;
	max-width: 860px;
	margin: 0 auto;
	padding: 0 1rem;
	/* Paint above the scroll-reveal sections that follow, so the doctor
	   typeahead dropdown is never covered by later page content. Stays
	   below the theme header (z-index 50). */
	position: relative;
	z-index: 5;
}

/* Sticky wizard bar (progress + back/next). JS sets `top` to the sticky
   header's height so the bar docks right beneath it. */

.tbfs-flow__bar {
	position: sticky;
	top: 64px;
	z-index: 40;
	display: flex;
	align-items: center;
	gap: 0.9rem;
	background: #fff;
	border: 1px solid #e6ecea;
	border-radius: 14px;
	box-shadow: 0 4px 14px rgba(35, 60, 57, 0.07);
	padding: 0.55rem 0.9rem;
	margin: 0 0 1.6rem;
}

/* Docked = stuck under the site header (JS toggles the class). A floating
   rounded card butting against the header reads broken, so the bar becomes
   a flat full-bleed strip: visually a second header row. The paddings keep
   the controls on the wizard's 828px rail. */
.tbfs-flow__bar.is-docked {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding-left: max(0.9rem, calc(50vw - 414px));
	padding-right: max(0.9rem, calc(50vw - 414px));
	border: 0;
	border-bottom: 1px solid #e6ecea;
	border-radius: 0;
	box-shadow: 0 10px 22px rgba(35, 60, 57, 0.05);
}

/* While the bar is docked, the header's scroll shadow would fall on it and
   draw a dark seam between the two white strips; the bar's own bottom
   shadow takes over as the chrome's edge. !important because load order
   between this sheet and the theme's isn't guaranteed. */
body.tbfs-flow-docked .tbfs-header {
	box-shadow: none !important;
}

.tbfs-flow__bar-mid {
	flex: 1;
	min-width: 0;
	display: grid;
	gap: 0.3rem;
}

.tbfs-flow__bar-label {
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--flow-teal-dark);
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tbfs-flow__bar-track {
	display: block;
	height: 6px;
	border-radius: 999px;
	background: #eef2f1;
	overflow: hidden;
}

.tbfs-flow__bar-fill {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--flow-teal), var(--flow-teal-dark));
	transition: width 0.3s ease;
}

.tbfs-flow__bar-btn {
	border: 0;
	border-radius: 999px;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	padding: 0.45rem 1rem;
	white-space: nowrap;
	flex: none;
}

.tbfs-flow__bar-btn--back {
	background: transparent;
	color: var(--flow-muted);
}

.tbfs-flow__bar-btn--back:hover {
	color: var(--flow-teal-dark);
}

.tbfs-flow__bar-btn--next {
	background: var(--flow-coral);
	color: #fff;
}

.tbfs-flow__bar-btn--next:hover {
	background: #e0604f;
}

/* Panels */

/* Step transitions: the incoming panel slides in from the side you're
   heading toward (forward = from the right, back = from the left). */
@keyframes tbfs-slide-fwd {
	from { opacity: 0; transform: translateX(28px); }
	to { opacity: 1; transform: none; }
}

@keyframes tbfs-slide-back {
	from { opacity: 0; transform: translateX(-28px); }
	to { opacity: 1; transform: none; }
}

/* The panel is held at its outgoing height while the next step loads
   (see setProgress), then eases down to the new content's height. */
.tbfs-flow__step {
	transition: min-height 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.tbfs-flow__step.is-slide-fwd {
	animation: tbfs-slide-fwd 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tbfs-flow__step.is-slide-back {
	animation: tbfs-slide-back 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
	.tbfs-flow__step.is-slide-fwd,
	.tbfs-flow__step.is-slide-back {
		animation: none;
	}
}

.tbfs-flow__step h2 {
	text-align: center;
	margin-bottom: 0.4rem;
}

.tbfs-flow__hint {
	text-align: center;
	color: var(--flow-muted);
	margin: 0 0 1.6rem;
}

.tbfs-flow__loading {
	text-align: center;
	color: var(--flow-muted);
	padding: 2rem 0;
}

/* Choice grids (states, payers) */

.tbfs-choice-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 0.7rem;
}

.tbfs-choice {
	display: block;
	width: 100%;
	padding: 0.9rem 1rem;
	border: 2px solid #e6ecea;
	border-radius: 12px;
	background: #fff;
	font: inherit;
	font-weight: 600;
	color: inherit;
	cursor: pointer;
	transition: border-color 0.12s ease, background 0.12s ease;
}

.tbfs-choice:hover,
.tbfs-choice:focus-visible {
	border-color: var(--flow-teal);
	background: var(--flow-teal-light);
}

/* Pump cards */

.tbfs-pump-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 1rem;
}

.tbfs-pump {
	border: 2px solid #e6ecea;
	border-radius: 16px;
	background: #fff;
	padding: 1.3rem;
	text-align: center;
	cursor: pointer;
	font: inherit;
	color: inherit; /* iOS buttons default to blue text */
	transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.tbfs-pump:hover,
.tbfs-pump:focus-visible {
	border-color: var(--flow-teal);
	box-shadow: 0 6px 18px rgba(63, 158, 151, 0.15);
}

.tbfs-pump__img {
	width: 100%;
	height: 150px;
	object-fit: contain;
	margin-bottom: 0.7rem;
}

.tbfs-pump__name {
	font-weight: 700;
	font-size: 1.05rem;
	margin: 0 0 0.5rem;
}

/* Type badge: one hue per pump type, kept away from the teal/coral the
   price badges use so the two reads don't blur together. Text colors are
   picked for WCAG AA on their pastel backgrounds. */
.tbfs-pump__type {
	display: inline-block;
	border-radius: 999px;
	padding: 0.18rem 0.7rem;
	margin-bottom: 0.6rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	background: #eef1f4;
	color: #4a5560; /* Standard */
}

.tbfs-pump__type[data-t="Hospital grade"] {
	background: #ece9f7;
	color: #4c3d8f;
}

.tbfs-pump__type[data-t="Portable"] {
	background: #fdf3e0;
	color: #7a5410;
}

.tbfs-pump__type[data-t="Wearable"] {
	background: #e4f2fb;
	color: #1d5e8a;
}

.tbfs-pump__price {
	display: inline-block;
	border-radius: 999px;
	padding: 0.25rem 0.9rem;
	font-size: 0.85rem;
	font-weight: 700;
}

.tbfs-pump__price--covered {
	background: var(--flow-teal-light);
	color: var(--flow-teal-dark);
}

.tbfs-pump__price--upgrade {
	background: #fdeae7;
	color: #c4523f;
}

.tbfs-pump__price--verify {
	background: #f3f0e9;
	color: #7a6f52;
}

.tbfs-pump.is-selected,
.tbfs-choice.is-selected {
	border-color: var(--flow-teal-dark);
	background: var(--flow-teal-light);
}

/* Compression product cards */

.tbfs-comp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1rem;
	margin-bottom: 1.2rem;
}

.tbfs-comp {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	border: 2px solid #e6ecea;
	border-radius: 16px;
	background: #fff;
	padding: 1.2rem 1rem 1rem;
}

.tbfs-comp__img {
	width: 100%;
	height: 130px;
	object-fit: contain;
	margin-bottom: 0.7rem;
}

.tbfs-comp__name {
	font-weight: 700;
	color: inherit;
	text-decoration: underline;
	text-decoration-color: #cfdedd;
	text-underline-offset: 3px;
	margin-bottom: 0.7rem;
}

.tbfs-comp__name:hover {
	color: var(--flow-teal-dark);
}

.tbfs-comp .tbfs-field {
	width: 100%;
	margin-bottom: 0.5rem;
}

.tbfs-comp__chart {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--flow-teal-dark);
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
	font-family: inherit;
}

/* Size-chart popup (block lifted from the sizing page, so the table is
   styled here; the theme's sizing-page CSS isn't loaded on this page). */
.tbfs-chart-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(35, 31, 29, 0.55);
}

.tbfs-chart-modal__card {
	position: relative;
	background: #fff;
	border-radius: 16px;
	max-width: 560px;
	width: 100%;
	max-height: 82vh;
	overflow-y: auto;
	padding: 1.4rem 1.4rem 1.2rem;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.tbfs-chart-modal__close {
	position: absolute;
	top: 0.6rem;
	right: 0.7rem;
	border: 0;
	background: none;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--flow-muted);
	cursor: pointer;
	padding: 0.2rem 0.4rem;
}

.tbfs-chart-modal__close:hover {
	color: inherit;
}

.tbfs-chart-modal__body h3 {
	margin: 0 0 0.8rem;
	font-size: 1.15rem;
}

.tbfs-chart-modal__body table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.tbfs-chart-modal__body th,
.tbfs-chart-modal__body td {
	padding: 0.5rem 0.6rem;
	text-align: left;
	border-bottom: 1px solid #eee7e2;
}

.tbfs-chart-modal__body thead th {
	color: var(--flow-teal-dark);
	background: var(--flow-teal-light);
}

.tbfs-chart-modal__body tbody th {
	font-weight: 700;
}

.tbfs-chart-modal__body figure {
	margin: 0;
}

.tbfs-chart-modal__body figcaption {
	margin-top: 0.7rem;
	font-size: 0.82rem;
	color: var(--flow-muted);
}

.tbfs-chart-modal__link {
	display: inline-block;
	margin-top: 0.9rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--flow-teal-dark);
}

/* "May also qualify" (letter-of-necessity) block: the note and the brace
   card read as one unit, set apart from the always-offered items. */
.tbfs-comp-lomn {
	border-radius: 16px;
	background: var(--flow-coral-soft, #fdeae7);
	padding: 1rem;
	margin-bottom: 1.2rem;
}

.tbfs-comp-lomn__note {
	margin: 0 0 0.8rem;
	font-size: 0.92rem;
	line-height: 1.5;
}

.tbfs-comp-lomn .tbfs-comp {
	max-width: 340px;
	margin: 0 auto;
}

/* Required marks + inline validation */

.tbfs-req {
	color: var(--flow-coral-dark, #e0604f);
	font-weight: 700;
}

.tbfs-intake__req-note {
	margin: 0 0 1rem;
	font-size: 0.82rem;
	color: var(--flow-muted);
}

.tbfs-field.is-invalid input,
.tbfs-field.is-invalid select {
	border-color: #d9534f;
	box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.12);
}

.tbfs-field__error {
	margin: 0.35rem 0 0;
	font-size: 0.84rem;
	font-weight: 600;
	color: #b3382f;
}

fieldset.tbfs-field.is-invalid legend {
	color: #b3382f;
}

/* Toggle switch (policy holder). The theme forces label { display: block }
   and stretches checkbox inputs, so every rule here carries the .tbfs-flow
   prefix and pins its own display/size. */

.tbfs-flow label.tbfs-switch {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.9rem;
	cursor: pointer;
	font-weight: 600;
	border: 2px solid #e6ecea;
	border-radius: 14px;
	background: #fff;
	padding: 0.85rem 1.1rem;
	transition: border-color 0.12s ease, background 0.12s ease;
}

.tbfs-flow label.tbfs-switch:hover {
	border-color: var(--flow-teal);
}

.tbfs-flow label.tbfs-switch:has(.tbfs-switch__input:checked) {
	border-color: var(--flow-teal-dark);
	background: var(--flow-teal-light);
}

.tbfs-flow .tbfs-switch__input {
	position: absolute !important;
	opacity: 0;
	width: 1px !important;
	height: 1px !important;
	margin: 0;
	pointer-events: none;
}

/* Text sits left, pill sits right (DOM order is input, track, text). */
.tbfs-flow .tbfs-switch > span:last-child {
	order: -1;
	flex: 1;
}

.tbfs-flow .tbfs-switch__track {
	display: inline-block;
	flex: 0 0 auto;
	width: 50px;
	height: 28px;
	border-radius: 999px;
	background: #d5dedd;
	position: relative;
	transition: background 0.18s ease;
}

.tbfs-flow .tbfs-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 0.18s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.tbfs-flow .tbfs-switch__input:checked ~ .tbfs-switch__track {
	background: var(--flow-teal-dark);
}

.tbfs-flow .tbfs-switch__input:checked ~ .tbfs-switch__track::after {
	transform: translateX(22px);
}

.tbfs-flow .tbfs-switch__input:focus-visible ~ .tbfs-switch__track {
	outline: 2px solid var(--flow-teal-dark);
	outline-offset: 2px;
}

/* Authorizations card: compact list, accepted one by one in the popup */

.tbfs-agree {
	border: 2px solid #e6ecea;
	border-radius: 16px;
	padding: 1.1rem 1.3rem 1.2rem;
	background: #fff;
	margin: 1.6rem 0;
	transition: border-color 0.15s ease;
}

.tbfs-agree.is-complete {
	border-color: var(--flow-teal-dark);
	background: #fbfffe;
}

.tbfs-agree__real {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.tbfs-agree__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.8rem;
	margin-bottom: 0.65rem;
}

.tbfs-agree__head strong {
	font-size: 1.02rem;
}

.tbfs-agree__status {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--flow-muted);
}

.tbfs-agree.is-complete .tbfs-agree__status {
	color: var(--flow-teal-dark);
}

.tbfs-agree__list {
	list-style: none;
	margin: 0 0 0.75rem;
	padding: 0;
}

.tbfs-agree__list li {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.28rem 0;
	font-size: 0.92rem;
	color: var(--flow-muted);
}

.tbfs-agree__list li.is-accepted {
	color: inherit;
}

.tbfs-agree__mark {
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2px solid #d5dedd;
	font-size: 0.75rem;
	font-weight: 700;
	color: #fff;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.tbfs-agree__list li.is-accepted .tbfs-agree__mark {
	background: var(--flow-teal-dark);
	border-color: var(--flow-teal-dark);
}

.tbfs-agree__btn {
	border: 2px solid var(--flow-coral);
	border-radius: 999px;
	background: var(--flow-coral);
	color: #fff;
	font: inherit;
	font-size: 0.92rem;
	font-weight: 600;
	padding: 0.5rem 1.3rem;
	cursor: pointer;
	transition: filter 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.tbfs-agree__btn:hover {
	filter: brightness(1.06);
}

.tbfs-agree.is-complete .tbfs-agree__btn {
	background: #fff;
	color: var(--flow-teal-dark);
	border-color: var(--flow-teal-dark);
}

/* Consent popup: one authorization at a time */

.tbfs-modal,
.tbfs-modal * {
	box-sizing: border-box;
}

.tbfs-modal {
	/* Lives on document.body, outside .tbfs-flow: re-declare the palette. */
	--flow-teal: var(--wp--preset--color--teal, #84cfc9);
	--flow-teal-dark: var(--wp--preset--color--teal-dark, #3f9e97);
	--flow-teal-light: var(--wp--preset--color--teal-light, #e9f7f6);
	--flow-coral: var(--wp--preset--color--coral, #f37868);
	--flow-muted: var(--wp--preset--color--muted, #6f7a80);
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: 1rem;
	background: rgba(35, 60, 57, 0.45);
	animation: tbfs-modal-in 0.18s ease;
}

.tbfs-modal__card {
	position: relative;
	/* Viewport-based cap so the card keeps a gutter on phones even if a
	   theme rule eats the overlay's padding. */
	width: min(560px, calc(100vw - 2.4rem));
	max-height: min(80vh, 640px);
	overflow-y: auto;
	background: #fff;
	border-radius: 18px;
	padding: 1.6rem 1.7rem 1.5rem;
	box-shadow: 0 24px 60px rgba(35, 60, 57, 0.35);
	animation: tbfs-modal-card 0.22s cubic-bezier(0.34, 1.3, 0.64, 1);
}

@media (max-width: 600px) {
	.tbfs-modal__card {
		padding: 1.4rem 1.2rem 1.3rem;
	}
}

.tbfs-modal__card:focus {
	outline: none;
}

.tbfs-modal__close {
	position: absolute;
	top: 0.7rem;
	right: 0.9rem;
	border: 0;
	background: transparent;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--flow-muted);
	cursor: pointer;
	padding: 0.2rem;
}

.tbfs-modal__eyebrow {
	display: block;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--flow-coral);
}

.tbfs-modal__dots {
	display: flex;
	gap: 0.35rem;
	margin: 0.5rem 0 0.2rem;
}

.tbfs-modal__dots i {
	width: 26px;
	height: 5px;
	border-radius: 999px;
	background: #e6ecea;
	transition: background 0.15s ease;
}

.tbfs-modal__dots i.is-done {
	background: var(--flow-teal);
}

.tbfs-modal__dots i.is-current {
	background: var(--flow-coral);
}

.tbfs-modal__card h3 {
	margin: 0.5rem 0 0.5rem;
}

.tbfs-modal__body {
	font-size: 0.92rem;
	line-height: 1.6;
	color: var(--flow-muted);
	margin: 0 0 1.2rem;
}

.tbfs-modal__actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.8rem;
}

.tbfs-modal__actions .tbfs-btn {
	margin-left: auto;
}

@keyframes tbfs-modal-in {
	from { opacity: 0; }
}

@keyframes tbfs-modal-card {
	from { opacity: 0; transform: translateY(16px) scale(0.97); }
}

@media (prefers-reduced-motion: reduce) {
	.tbfs-modal,
	.tbfs-modal__card {
		animation: none;
	}
}

/* Signature pad */

.tbfs-sign__pad {
	display: block;
	width: 100%;
	height: 160px;
	border: 2px dashed #cfdedd;
	border-radius: 12px;
	background: #fff;
	touch-action: none;
	cursor: crosshair;
}

.tbfs-sign__clear {
	margin-top: 0.4rem;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--flow-teal-dark);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* Intake form */

.tbfs-intake {
	max-width: 560px;
	margin: 0 auto;
}

.tbfs-intake__privacy {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	background: var(--flow-teal-light);
	border-radius: 12px;
	padding: 0.9rem 1rem;
	font-size: 0.88rem;
	color: var(--flow-teal-dark);
	margin-bottom: 1.4rem;
}

.tbfs-intake label {
	display: block;
	font-weight: 600;
	font-size: 0.92rem;
	margin: 1rem 0 0.3rem;
}

.tbfs-intake input,
.tbfs-intake textarea,
.tbfs-intake select {
	box-sizing: border-box;
	width: 100%;
	padding: 0.7rem 0.9rem;
	border: 2px solid #e6ecea;
	border-radius: 10px;
	font: inherit;
	background: #fff;
}

/* Popup date picker (year → month → day) */

.tbfs-datepick {
	position: relative;
}

.tbfs-datepick input[type="text"] {
	cursor: pointer;
	caret-color: transparent;
}

.tbfs-datepick__pop {
	position: absolute;
	z-index: 40;
	top: 100%;
	left: 0;
	margin-top: 0.3rem;
	width: min(320px, 100%);
	background: #fff;
	border: 2px solid #e6ecea;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(35, 60, 57, 0.16);
	padding: 0.8rem;
}

.tbfs-datepick__head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 700;
	margin-bottom: 0.6rem;
}

.tbfs-datepick__back {
	border: 0;
	background: var(--flow-teal-light);
	color: var(--flow-teal-dark);
	border-radius: 8px;
	width: 1.8rem;
	height: 1.8rem;
	font-size: 1.2rem;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.tbfs-datepick__grid {
	display: grid;
	gap: 0.3rem;
}

.tbfs-datepick__grid--years {
	grid-template-columns: repeat(4, 1fr);
	max-height: 220px;
	overflow-y: auto;
}

.tbfs-datepick__grid--months {
	grid-template-columns: repeat(3, 1fr);
}

.tbfs-datepick__grid--days {
	grid-template-columns: repeat(7, 1fr);
}

.tbfs-datepick__grid button {
	border: 0;
	background: transparent;
	border-radius: 8px;
	padding: 0.45rem 0.2rem;
	font: inherit;
	font-size: 0.9rem;
	cursor: pointer;
}

.tbfs-datepick__grid button:hover,
.tbfs-datepick__grid button:focus-visible {
	background: var(--flow-teal-light);
	color: var(--flow-teal-dark);
}

.tbfs-datepick__wd {
	text-align: center;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--flow-muted);
	padding-bottom: 0.2rem;
}

.tbfs-intake input:focus,
.tbfs-intake textarea:focus,
.tbfs-intake select:focus {
	outline: none;
	border-color: var(--flow-teal);
}

.tbfs-intake h3 {
	margin: 2rem 0 0.2rem;
	font-size: 1.15rem;
}

/* Live search filter (states, payers, pumps) */

.tbfs-search__input {
	display: block;
	width: 100%;
	max-width: 420px;
	margin: 0 auto 1.2rem;
	padding: 0.7rem 1.2rem;
	border: 2px solid #e6ecea;
	border-radius: 999px;
	font: inherit;
}

.tbfs-search__input:focus {
	outline: none;
	border-color: var(--flow-teal);
}

.tbfs-search__empty {
	text-align: center;
	color: var(--flow-muted);
	margin: 0 0 1rem;
}

.tbfs-choice-grid--payers {
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.tbfs-choice--muted {
	color: var(--flow-muted);
	border-style: dashed;
}

/* Payer buttons carrying a brand logo: logo stacked above the plan name. */
.tbfs-choice--logo {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	text-align: center;
}

.tbfs-choice__logo {
	display: block;
	width: auto;
	max-width: 130px;
	height: 30px;
	object-fit: contain;
}

.tbfs-choice__name {
	display: block;
}

/* Product checklist */

.tbfs-product-list {
	display: grid;
	gap: 0.8rem;
	max-width: 560px;
	margin: 0 auto;
}

.tbfs-product {
	display: flex;
	gap: 0.8rem;
	align-items: flex-start;
	border: 2px solid #e6ecea;
	border-radius: 14px;
	padding: 1rem 1.1rem;
	cursor: pointer;
	transition: border-color 0.12s ease, background 0.12s ease;
}

.tbfs-product:hover {
	border-color: var(--flow-teal);
}

.tbfs-product:has(input:checked) {
	border-color: var(--flow-teal-dark);
	background: var(--flow-teal-light);
}

.tbfs-product input {
	width: 1.2rem;
	height: 1.2rem;
	margin-top: 0.2rem;
	accent-color: var(--flow-teal-dark);
	flex: none;
}

.tbfs-product strong {
	display: block;
}

.tbfs-product small {
	color: var(--flow-muted);
}

/* Radio / checkbox groups */

.tbfs-radio-group,
.tbfs-check-group {
	border: 0;
	padding: 0;
	margin: 1rem 0 0;
}

.tbfs-radio-group legend,
.tbfs-check-group legend {
	font-weight: 600;
	font-size: 0.92rem;
	margin-bottom: 0.3rem;
	padding: 0;
}

.tbfs-radio {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	font-weight: 400;
	margin: 0.35rem 0;
	cursor: pointer;
}

.tbfs-radio input {
	width: 1.15rem;
	height: 1.15rem;
	margin-top: 0.15rem;
	accent-color: var(--flow-teal-dark);
	flex: none;
}

/* Doctor lookup (NPI registry typeahead) */

.tbfs-doc {
	position: relative;
}

/* Anchor the results to the search field itself, not the whole block,
   so the dropdown opens right under the input even when a selected
   doctor card or the manual fields sit below. */
.tbfs-doc__search,
.tbfs-suggest {
	position: relative;
}

.tbfs-doc__results {
	position: absolute;
	z-index: 40;
	top: calc(100% + 0.35rem);
	left: 0;
	right: 0;
	background: #fff;
	border: 2px solid #e6ecea;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(35, 60, 57, 0.16);
	max-height: 300px;
	overflow-y: auto;
	padding: 0.4rem;
}

.tbfs-doc__result {
	display: block;
	width: 100%;
	text-align: left;
	border: 0;
	background: transparent;
	border-radius: 10px;
	padding: 0.55rem 0.7rem;
	font: inherit;
	color: inherit;
	cursor: pointer;
}

.tbfs-doc__result:hover,
.tbfs-doc__result:focus-visible {
	background: var(--flow-teal-light);
}

.tbfs-doc__result strong {
	display: block;
}

.tbfs-doc__result small {
	color: var(--flow-muted);
}

.tbfs-doc__none {
	margin: 0.4rem 0.7rem;
	color: var(--flow-muted);
	font-size: 0.9rem;
}

.tbfs-doc__card {
	margin: 0.6rem 0 0;
	display: grid;
	gap: 0.15rem;
	font-size: 0.9rem;
	color: var(--flow-teal-dark);
	background: var(--flow-teal-light);
	border-radius: 12px;
	padding: 0.7rem 1rem;
}

.tbfs-doc__card-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.6rem;
}

.tbfs-doc__change {
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--flow-teal-dark);
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
}

.tbfs-doc__manual {
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 0.85rem;
	color: var(--flow-muted);
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
	margin-top: 0.4rem;
}

.tbfs-doc__manual:hover {
	color: var(--flow-teal-dark);
}

.tbfs-doc__fields {
	margin-top: 0.4rem;
}

/* Instruction note for email / fax / on-file methods */

.tbfs-rx-note {
	background: var(--flow-teal-light);
	color: var(--flow-teal-dark);
	border-radius: 12px;
	padding: 0.85rem 1.1rem;
	font-size: 0.92rem;
	margin: 0.4rem 0 1rem;
}

/* Step-level heads-up shown above the Continue button */
.tbfs-rx-note--footer {
	margin: 1.4rem 0 0;
	font-size: 0.88rem;
}

/* Styled file picker (native input stays focusable for validation) */

.tbfs-file input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	border: 0;
	opacity: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

/* Doubled class specificity so .tbfs-intake label rules don't win. */
.tbfs-file label.tbfs-file__button {
	display: grid;
	gap: 0.25rem;
	justify-items: center;
	text-align: center;
	font-weight: 400;
	font-size: 1rem;
	margin: 0.6rem 0 0;
	border: 2px dashed var(--flow-teal);
	border-radius: 16px;
	background: #fbfffe;
	padding: 1.4rem 1rem;
	cursor: pointer;
	transition: background 0.12s ease, border-color 0.12s ease;
}

.tbfs-file label.tbfs-file__button:hover,
.tbfs-file input[type="file"]:focus-visible + .tbfs-file__button {
	background: var(--flow-teal-light);
	border-color: var(--flow-teal-dark);
}

.tbfs-file label.tbfs-file__button.is-filled {
	border-style: solid;
	border-color: var(--flow-teal-dark);
}

.tbfs-file__icon {
	font-size: 1.6rem;
}

.tbfs-file__button small {
	color: var(--flow-muted);
	font-size: 0.85rem;
}

/* Prescription method cards + pills */

.tbfs-rx-primary {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.8rem;
	margin-bottom: 0.9rem;
}

.tbfs-rx-primary--single {
	grid-template-columns: minmax(0, 420px);
	justify-content: center;
}

.tbfs-rx-card {
	display: grid;
	gap: 0.25rem;
	justify-items: center;
	text-align: center;
	border: 2px solid #e6ecea;
	border-radius: 16px;
	background: #fff;
	padding: 1.2rem 1rem;
	font: inherit;
	color: inherit;
	cursor: pointer;
	transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.tbfs-rx-card:hover,
.tbfs-rx-card:focus-visible {
	border-color: var(--flow-teal);
	box-shadow: 0 6px 18px rgba(63, 158, 151, 0.15);
}

.tbfs-rx-card.is-selected {
	border-color: var(--flow-teal-dark);
	background: var(--flow-teal-light);
}

.tbfs-rx-card__icon {
	font-size: 1.6rem;
}

.tbfs-rx-card small {
	color: var(--flow-muted);
}

/* Toggle cards (milk storage bags) carry an explicit add/added pill so
   it reads as something you tap, not a static banner. */
.tbfs-rx-card__cta {
	margin-top: 0.5rem;
	display: inline-block;
	border: 2px solid var(--flow-coral);
	border-radius: 999px;
	padding: 0.35rem 1rem;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--flow-coral);
	background: #fff;
	transition: background 0.12s ease, color 0.12s ease;
}

.tbfs-rx-card--toggle:hover .tbfs-rx-card__cta {
	background: var(--flow-coral);
	color: #fff;
}

.tbfs-rx-card--toggle.is-selected .tbfs-rx-card__cta {
	border-color: var(--flow-teal-dark);
	background: var(--flow-teal-dark);
	color: #fff;
}

.tbfs-rx-secondary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.tbfs-rx-secondary__label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--flow-muted);
}

.tbfs-rx-pill {
	border: 1.5px solid #e6ecea;
	border-radius: 999px;
	background: #fff;
	padding: 0.4rem 0.9rem;
	font: inherit;
	font-size: 0.85rem;
	color: inherit;
	cursor: pointer;
	transition: border-color 0.12s ease, background 0.12s ease;
}

.tbfs-rx-pill:hover {
	border-color: var(--flow-teal);
}

.tbfs-rx-pill.is-selected {
	border-color: var(--flow-teal-dark);
	background: var(--flow-teal-light);
	color: var(--flow-teal-dark);
	font-weight: 600;
}

.tbfs-doc-block--hero {
	border: 2px solid var(--flow-teal);
	border-radius: 16px;
	padding: 1.1rem 1.2rem 1.4rem;
	margin-top: 1rem;
	background: #fbfffe;
}

.tbfs-doc-block--hero h3 {
	margin-top: 0.2rem;
}

@media (max-width: 600px) {
	.tbfs-rx-primary {
		grid-template-columns: 1fr;
	}
}

/* ---------- Success screen ---------- */

.tbfs-done {
	position: relative;
	text-align: center;
	padding-top: 3.5rem;
}

.tbfs-done__badge {
	display: inline-grid;
	place-items: center;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	background: #fdeeea;
	animation: tbfs-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.tbfs-done__ring {
	stroke: var(--flow-coral);
	stroke-dasharray: 202;
	stroke-dashoffset: 202;
	transform: rotate(-90deg);
	transform-origin: 50% 50%;
	animation: tbfs-draw 0.7s ease-out 0.25s forwards;
}

.tbfs-done__check {
	stroke: var(--flow-teal-dark);
	stroke-dasharray: 60;
	stroke-dashoffset: 60;
	animation: tbfs-draw 0.45s ease-out 0.85s forwards;
}

.tbfs-done__title {
	margin: 1.1rem 0 0.3rem;
	animation: tbfs-fade-up 0.6s ease 0.2s both;
}

.tbfs-done__sub {
	color: var(--flow-muted);
	font-size: 1.05rem;
	margin: 0 0 0.8rem;
	animation: tbfs-fade-up 0.6s ease 0.35s both;
}

.tbfs-done__steps {
	max-width: 560px;
	margin: 1.2rem auto 0;
	border: 2px solid #e6ecea;
	border-radius: 16px;
	padding: 1.1rem 1.3rem 0.6rem;
	text-align: left;
	animation: tbfs-fade-up 0.6s ease 0.45s both;
}

.tbfs-done__steps h3 {
	margin: 0 0 0.6rem;
	font-size: 1.05rem;
}

.tbfs-done__step {
	display: flex;
	gap: 0.85rem;
	align-items: flex-start;
	padding: 0.65rem 0;
	animation: tbfs-fade-up 0.55s ease both;
}

.tbfs-done__step + .tbfs-done__step {
	border-top: 1px solid #eef3f2;
}

.tbfs-done__step-icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--flow-teal-light);
	font-size: 1.15rem;
}

.tbfs-done__step strong {
	display: block;
}

.tbfs-done__step p {
	margin: 0.15rem 0 0;
	color: var(--flow-muted);
	font-size: 0.92rem;
}

.tbfs-done__note {
	max-width: 560px;
	margin: 1rem auto 0;
	animation: tbfs-fade-up 0.55s ease 1.6s both;
}

.tbfs-done__sign {
	text-align: center;
	color: var(--flow-muted);
	margin: 1.6rem 0 0.4rem;
	animation: tbfs-fade-up 0.55s ease 1.85s both;
}

/* Confetti: one gentle burst, then gone. */
.tbfs-done__confetti {
	position: absolute;
	inset: 0 0 auto;
	height: 0;
	pointer-events: none;
}

.tbfs-done__confetti i {
	position: absolute;
	top: -12px;
	width: 9px;
	height: 13px;
	border-radius: 3px;
	opacity: 0;
	animation: tbfs-confetti 2.6s ease-in forwards;
}

.tbfs-done__confetti i:nth-child(4n + 1) { background: var(--flow-coral); }
.tbfs-done__confetti i:nth-child(4n + 2) { background: var(--flow-teal); }
.tbfs-done__confetti i:nth-child(4n + 3) { background: #f5c26b; }
.tbfs-done__confetti i:nth-child(4n + 4) { background: #f9d5cc; width: 7px; height: 10px; }

.tbfs-done__confetti i:nth-child(1)  { left: 4%;  animation-delay: 0.30s; }
.tbfs-done__confetti i:nth-child(2)  { left: 10%; animation-delay: 0.55s; }
.tbfs-done__confetti i:nth-child(3)  { left: 16%; animation-delay: 0.40s; }
.tbfs-done__confetti i:nth-child(4)  { left: 22%; animation-delay: 0.70s; }
.tbfs-done__confetti i:nth-child(5)  { left: 28%; animation-delay: 0.35s; }
.tbfs-done__confetti i:nth-child(6)  { left: 34%; animation-delay: 0.60s; }
.tbfs-done__confetti i:nth-child(7)  { left: 40%; animation-delay: 0.45s; }
.tbfs-done__confetti i:nth-child(8)  { left: 46%; animation-delay: 0.75s; }
.tbfs-done__confetti i:nth-child(9)  { left: 52%; animation-delay: 0.32s; }
.tbfs-done__confetti i:nth-child(10) { left: 58%; animation-delay: 0.65s; }
.tbfs-done__confetti i:nth-child(11) { left: 64%; animation-delay: 0.42s; }
.tbfs-done__confetti i:nth-child(12) { left: 70%; animation-delay: 0.58s; }
.tbfs-done__confetti i:nth-child(13) { left: 76%; animation-delay: 0.38s; }
.tbfs-done__confetti i:nth-child(14) { left: 82%; animation-delay: 0.68s; }
.tbfs-done__confetti i:nth-child(15) { left: 88%; animation-delay: 0.48s; }
.tbfs-done__confetti i:nth-child(16) { left: 94%; animation-delay: 0.72s; }
.tbfs-done__confetti i:nth-child(17) { left: 25%; animation-delay: 0.85s; }
.tbfs-done__confetti i:nth-child(18) { left: 65%; animation-delay: 0.90s; }

@keyframes tbfs-pop {
	from { transform: scale(0.5); opacity: 0; }
	to   { transform: scale(1); opacity: 1; }
}

@keyframes tbfs-draw {
	to { stroke-dashoffset: 0; }
}

@keyframes tbfs-fade-up {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: none; }
}

@keyframes tbfs-confetti {
	0%   { opacity: 0; transform: translateY(-16px) rotate(0deg); }
	12%  { opacity: 1; }
	100% { opacity: 0; transform: translateY(330px) rotate(520deg); }
}

@media (prefers-reduced-motion: reduce) {
	.tbfs-done__badge,
	.tbfs-done__ring,
	.tbfs-done__check,
	.tbfs-done__title,
	.tbfs-done__sub,
	.tbfs-done__steps,
	.tbfs-done__step,
	.tbfs-done__note,
	.tbfs-done__sign {
		animation: none;
		opacity: 1;
		stroke-dashoffset: 0;
	}
	.tbfs-done__confetti {
		display: none;
	}
}

/* Review summary */

.tbfs-summary {
	max-width: 560px;
	margin: 0 auto 1.5rem;
	border: 2px solid #e6ecea;
	border-radius: 14px;
	padding: 0.4rem 1.1rem;
}

.tbfs-summary > div {
	display: grid;
	grid-template-columns: 130px 1fr;
	gap: 0.8rem;
	padding: 0.55rem 0;
	border-bottom: 1px solid #eef2f1;
}

.tbfs-summary > div:last-child {
	border-bottom: 0;
}

.tbfs-summary dt {
	font-weight: 700;
	font-size: 0.88rem;
	color: var(--flow-muted);
}

.tbfs-summary dd {
	margin: 0;
	font-size: 0.95rem;
}

/* Misc */

.tbfs-flow__hint--left {
	text-align: left;
	margin: 0.2rem 0 0.6rem;
	font-size: 0.88rem;
}

.tbfs-flow__filenote {
	font-size: 0.85rem;
	color: var(--flow-teal-dark);
	margin: 0.4rem 0 0;
}

.tbfs-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.tbfs-flow__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 1rem;
}

/* Buttons */

.tbfs-flow__actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 1.8rem;
}

.tbfs-btn {
	border: 0;
	border-radius: 999px;
	padding: 0.8rem 1.9rem;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	background: var(--flow-coral);
	color: #fff;
	transition: background 0.12s ease;
}

.tbfs-btn:hover {
	background: #e0604f;
}

.tbfs-btn--ghost {
	background: transparent;
	color: var(--flow-muted);
	text-decoration: underline;
}

.tbfs-btn--ghost:hover {
	background: transparent;
	color: var(--flow-teal-dark);
}

.tbfs-flow__error {
	background: #fdeae7;
	color: #b0432f;
	border-radius: 10px;
	padding: 0.8rem 1rem;
	margin-top: 1rem;
	font-size: 0.9rem;
}

@media (max-width: 600px) {
	.tbfs-flow__bar {
		gap: 0.6rem;
		padding: 0.5rem 0.6rem;
	}
	.tbfs-flow__bar-btn {
		font-size: 0.8rem;
		padding: 0.4rem 0.7rem;
	}
	.tbfs-pump-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.7rem;
	}
	.tbfs-pump {
		padding: 0.9rem 0.7rem;
	}
	.tbfs-pump__img {
		height: 110px;
	}
	.tbfs-pump__name {
		font-size: 0.92rem;
	}
	.tbfs-flow__row {
		grid-template-columns: 1fr;
	}
}
