/* Patient Billing — Doctor Induction form
   Branding taken from patientbilling.co.uk:
   Space Grotesk · #001510 ink green · #003D3A deep green · #EDE9D7 cream
   #F5F4EB light cream · #D3F4E9 pale mint · #00B995 teal accent
   Square corners and arrow buttons, as on the site.
   Scoped under .pbind so it plays nicely with any theme/Elementor. */

.pbind {
	--pb-ink: #001510;        /* near-black green (site hero) */
	--pb-deep: #003D3A;       /* deep green sections */
	--pb-deep-text: #003F32;  /* deep green text on cream */
	--pb-cream: #EDE9D7;      /* site cream */
	--pb-cream-2: #F5F4EB;    /* lighter cream */
	--pb-mint: #D3F4E9;       /* pale mint (text on dark) */
	--pb-teal: #00B995;       /* accent / buttons */
	--pb-teal-dark: #00A283;
	--pb-body: #1C2B26;
	--pb-muted: #55655E;
	--pb-line: #D9D4C0;       /* cream-tinted rule */
	--pb-error: #B3261E;

	max-width: 880px;
	margin: 0 auto;
	color: var(--pb-body);
	font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.55;
}

/* ---------- layout options (shortcode: layout / max_width / logo / top_gap) ----------
   layout="full"  → the banner, progress strip and cream section run edge-to-edge
                    while the content stays centred at --pbind-max.
   max_width="…"  → sets --pbind-max (px) on the root.
   logo="hide"    → hides the wordmark in the banner (site header already shows it).
   top_gap="…"    → extra headroom inside the banner to clear a floating site header.
   Stable hooks for theme CSS: .pbind-head-inner, .pbind-progress-wrap, .pbind-form-inner */
.pbind-layout-full {
	max-width: none;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}
.pbind-head-inner,
.pbind-layout-full .pbind-progress,
.pbind-form-inner {
	max-width: var(--pbind-max, 880px);
	margin-left: auto;
	margin-right: auto;
}
.pbind-progress-wrap { background: var(--pb-deep); }
.pbind-logo-hide .pbind-head .pbind-brand { display: none; }
.pbind-logo-hide .pbind-head h2 { margin-top: 0; }

.pbind *, .pbind *::before, .pbind *::after { box-sizing: border-box; }
.pbind [hidden] { display: none !important; }

/* test-mode ribbon (shown when the plugin points at DocuSign's demo environment) */
.pbind-testmode {
	background: #7A5C00;
	color: #FFF4D6;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .3px;
	padding: 10px 16px;
	text-align: center;
	border-bottom: 3px solid #FFD200;
}

.pbind-purpose { margin: 16px 0 18px; }

/* ---------- brand mark ---------- */
.pbind-brand { display: inline-flex; align-items: center; gap: 9px; line-height: 1; }
.pbind-brand-text { font-size: 1.15em; letter-spacing: .2px; font-weight: 300; }
.pbind-brand-text b { font-weight: 600; }
.pbind-mark { display: inline-block; flex: 0 0 auto; }

/* ---------- header band (site hero style) ---------- */
.pbind-head {
	position: relative;
	overflow: hidden;
	background: linear-gradient(118deg, #000E0A 0%, var(--pb-ink) 45%, #00291F 78%, #003D30 100%);
	color: var(--pb-mint);
	padding: 42px 44px 40px;
	padding-top: calc(42px + var(--pbind-topgap, 0px));
}
.pbind-head::after {
	/* diagonal motif from the site hero */
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(52deg, transparent 62%, rgba(0, 185, 149, .14) 62.5%, rgba(0, 185, 149, .14) 70%, transparent 70.5%),
		linear-gradient(52deg, transparent 76%, rgba(211, 244, 233, .07) 76.5%, rgba(211, 244, 233, .07) 86%, transparent 86.5%);
	pointer-events: none;
}
.pbind-head .pbind-brand { color: var(--pb-cream); font-size: 15px; }
.pbind-head h2 {
	margin: 18px 0 8px;
	color: #EFE9D2;
	font-family: inherit;
	font-size: 40px;
	font-weight: 300;
	line-height: 1.1;
	letter-spacing: .2px;
}
.pbind-head p { margin: 0; color: var(--pb-mint); font-weight: 300; font-size: 15.5px; max-width: 58ch; position: relative; }

/* ---------- progress (page tabs) ---------- */
.pbind-progress {
	display: flex;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 14px 20px;
	background: var(--pb-deep);
	overflow-x: auto;
}
.pbind-progress li { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 6px 8px; opacity: .5; }
.pbind-progress li.is-active, .pbind-progress li.is-done { opacity: 1; }
.pbind-dot {
	flex: 0 0 auto;
	width: 24px; height: 24px;
	background: transparent;
	border: 1.5px solid var(--pb-mint);
	color: var(--pb-mint);
	font-size: 12.5px; font-weight: 600;
	display: inline-flex; align-items: center; justify-content: center;
}
.pbind-progress li.is-active .pbind-dot { background: var(--pb-teal); border-color: var(--pb-teal); color: var(--pb-ink); }
.pbind-progress li.is-done .pbind-dot { background: var(--pb-mint); border-color: var(--pb-mint); color: var(--pb-deep); }
.pbind-dot-label { font-size: 12.5px; color: var(--pb-mint); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- form body: cream desk, paper sheets ---------- */
.pbind-form {
	background: var(--pb-cream);
	padding: 34px 34px 30px;
}
.pbind-step { display: none; }
.pbind-step.is-active { display: block; animation: pbind-in .3s ease; }
@keyframes pbind-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* the A4-style sheet */
.pbind-sheet {
	background: #FFFFFF;
	box-shadow: 0 1px 0 rgba(0, 21, 16, .08), 0 14px 34px rgba(0, 21, 16, .13);
	border-top: 4px solid var(--pb-deep);
}
.pbind-sheet-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px 34px 0;
	color: var(--pb-deep-text);
}
.pbind-sheet-title { font-size: 13px; font-weight: 400; letter-spacing: .4px; color: var(--pb-muted); }
.pbind-sheet-head .pbind-brand { color: var(--pb-deep-text); font-size: 13px; }
.pbind-sheet-body { padding: 12px 34px 26px; }
.pbind-sheet-foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 34px;
	background: var(--pb-ink);
	color: var(--pb-cream);
	font-size: 12px;
	font-weight: 300;
	letter-spacing: .4px;
}

.pbind-page-title {
	color: var(--pb-deep-text);
	font-size: 24px;
	font-weight: 500;
	margin: 8px 0 18px;
	letter-spacing: .1px;
}
.pbind-sub {
	color: var(--pb-deep-text);
	font-size: 16px;
	font-weight: 600;
	margin: 26px 0 12px;
	padding-bottom: 7px;
	border-bottom: 2px solid var(--pb-cream);
}

.pbind-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.pbind-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) { .pbind-grid, .pbind-grid-3 { grid-template-columns: 1fr; } }

.pbind-field { display: block; margin: 0 0 6px; }
.pbind-label { display: block; font-size: 13px; font-weight: 500; color: var(--pb-muted); margin-bottom: 5px; letter-spacing: .1px; }
.pbind-label em, .pbind-declare em { color: var(--pb-teal-dark); font-style: normal; }

.pbind select {
	width: 100%;
	padding: 11px 36px 11px 13px;
	border: 1.5px solid var(--pb-line);
	border-radius: 0;
	background-color: var(--pb-cream-2);
	font-family: inherit;
	font-size: 15px;
	color: var(--pb-body);
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23003F32' stroke-width='1.6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 13px center;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.pbind select:focus {
	outline: none;
	border-color: var(--pb-teal);
	box-shadow: 0 0 0 3px rgba(0, 185, 149, .18);
	background-color: #fff;
}

.pbind input[type="text"],
.pbind input[type="email"],
.pbind input[type="tel"],
.pbind input[type="number"],
.pbind textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1.5px solid var(--pb-line);
	border-radius: 0;             /* square, like the site */
	background: var(--pb-cream-2);
	font-family: inherit;
	font-size: 15px;
	color: var(--pb-body);
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.pbind input:focus, .pbind textarea:focus {
	outline: none;
	border-color: var(--pb-teal);
	box-shadow: 0 0 0 3px rgba(0, 185, 149, .18);
	background: #fff;
}
.pbind input.pbind-invalid, .pbind textarea.pbind-invalid { border-color: var(--pb-error); }

.pbind-control { display: flex; align-items: stretch; }
.pbind-prefix {
	display: inline-flex; align-items: center;
	padding: 0 12px;
	border: 1.5px solid var(--pb-line); border-right: 0;
	background: var(--pb-cream);
	color: var(--pb-deep-text);
	font-weight: 600;
}

.pbind-hint { display: block; font-size: 12.5px; color: var(--pb-muted); margin-top: 4px; font-weight: 300; }
.pbind-err { display: none; font-size: 12.5px; color: var(--pb-error); margin-top: 4px; font-weight: 500; }
.pbind-err.is-visible { display: block; }

/* segmented yes/no + title pills — square site style */
.pbind-seg { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.pbind-seg label { cursor: pointer; }
.pbind-seg input { position: absolute; opacity: 0; pointer-events: none; }
.pbind-seg span {
	display: inline-block;
	padding: 8px 20px;
	border: 1.5px solid var(--pb-line);
	border-radius: 0;
	font-size: 14px;
	font-weight: 400;
	color: var(--pb-muted);
	background: #fff;
	transition: all .15s ease;
}
.pbind-seg input:checked + span {
	background: var(--pb-deep);
	border-color: var(--pb-deep);
	color: var(--pb-cream);
	font-weight: 500;
}
.pbind-seg input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 185, 149, .25); }
.pbind-yn { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--pb-line); flex-wrap: wrap; }
.pbind-yn .pbind-label { margin: 0; flex: 1 1 320px; font-size: 14.5px; color: var(--pb-body); font-weight: 400; }

/* days grid */
.pbind-days { display: grid; gap: 8px; }
.pbind-day-row { display: grid; grid-template-columns: 110px 1fr 1fr auto; gap: 10px; align-items: center; }
.pbind-day-name { font-size: 14px; font-weight: 500; color: var(--pb-deep-text); }
.pbind-day-off { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--pb-muted); cursor: pointer; white-space: nowrap; padding: 0 2px; }
.pbind-day-off input { width: 16px; height: 16px; accent-color: var(--pb-teal); }
.pbind select:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 640px) { .pbind-day-row { grid-template-columns: 90px 1fr 1fr; } .pbind-day-off { grid-column: 2 / 4; justify-self: start; } }

/* checkboxes */
.pbind-checks { display: flex; gap: 26px; flex-wrap: wrap; }
.pbind-checks label { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; cursor: pointer; }
.pbind-checks input, .pbind-declare input { width: 18px; height: 18px; accent-color: var(--pb-teal); }

/* procedures */
.pbind-proc-row { display: grid; grid-template-columns: 1fr 180px; gap: 10px; margin-bottom: 10px; }
.pbind-proc-fee { display: flex; }
@media (max-width: 520px) { .pbind-proc-row { grid-template-columns: 1fr 130px; } }

/* change-of-address letter preview */
.pbind-letter {
	border: 1.5px solid var(--pb-line);
	background: var(--pb-cream-2);
	padding: 24px 28px;
	font-size: 15px;
}
.pbind-letter p { margin: 0 0 16px; }
.pbind-letter-rows { border-top: 2px solid var(--pb-cream); margin-top: 4px; }
.pbind-letter-rows > div {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 14px;
	padding: 10px 0;
	border-bottom: 1px dashed var(--pb-line);
	align-items: baseline;
}
.pbind-letter-rows span { color: var(--pb-muted); font-size: 13.5px; }
.pbind-letter-rows strong { color: var(--pb-deep-text); font-weight: 600; }
.pbind-sig-placeholder { color: var(--pb-teal-dark); font-style: normal; font-size: 13.5px; font-weight: 500; }
@media (max-width: 560px) { .pbind-letter-rows > div { grid-template-columns: 1fr; gap: 2px; } }

/* direct debit + declaration */
.pbind-secure {
	background: var(--pb-cream-2);
	border: 1.5px solid var(--pb-line);
	border-left: 4px solid var(--pb-teal);
	padding: 13px 16px;
	font-size: 14px;
	color: var(--pb-deep-text);
}
.pbind-lock { margin-right: 4px; }
.pbind-declare { display: flex; gap: 12px; align-items: flex-start; background: var(--pb-cream-2); border: 1.5px solid var(--pb-line); border-left: 4px solid var(--pb-teal); padding: 15px 17px; font-size: 14.5px; cursor: pointer; margin-top: 18px; }
.pbind-declare input { flex: 0 0 auto; margin-top: 2px; }

/* review */
.pbind-review { display: grid; gap: 10px; }
.pbind-review .pbind-rev-group { border: 1.5px solid var(--pb-line); padding: 14px 18px; }
.pbind-review h4 { margin: 0 0 8px; font-size: 13px; color: var(--pb-deep-text); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.pbind-review dl { display: grid; grid-template-columns: 230px 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
.pbind-review dt { color: var(--pb-muted); font-weight: 300; }
.pbind-review dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 560px) { .pbind-review dl { grid-template-columns: 1fr; } .pbind-review dd { margin-bottom: 6px; } }

/* nav + buttons — square teal, arrow prefix, like "→ Request a call back" */
.pbind-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.pbind-btn {
	appearance: none;
	border: 1.5px solid var(--pb-teal);
	background: var(--pb-teal);
	color: #EDE9D7;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: .2px;
	padding: 13px 26px;
	border-radius: 0;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease, transform .1s ease;
	margin-left: auto;
}
.pbind-btn:hover { background: var(--pb-teal-dark); border-color: var(--pb-teal-dark); }
.pbind-btn:active { transform: translateY(1px); }
.pbind-btn[disabled] { opacity: .6; cursor: wait; }
.pbind-arrow { display: inline-block; margin-right: 8px; font-weight: 400; }
.pbind-btn-ghost { background: transparent; color: var(--pb-deep-text); border: 1.5px solid var(--pb-deep); margin-left: 0; margin-right: auto; }
.pbind-btn-ghost:hover { background: var(--pb-deep); color: var(--pb-cream); }
.pbind-btn-ghost .pbind-arrow { margin-right: 8px; }

/* messages & panels */
.pbind-msg { margin-top: 18px; padding: 13px 16px; font-size: 14.5px; background: #FDECEA; color: var(--pb-error); border: 1.5px solid #F5C6C2; }
.pbind-panel {
	background: #fff;
	border-top: 4px solid var(--pb-deep);
	box-shadow: 0 14px 34px rgba(0, 21, 16, .13);
	padding: 46px 42px;
	text-align: center;
	max-width: 640px;
	margin: 0 auto;
	font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
.pbind-panel h3 { color: #003F32; font-size: 25px; font-weight: 500; margin: 14px 0 10px; }
.pbind-panel p { color: #55655E; font-size: 15.5px; font-weight: 300; }
.pbind-panel a { color: #00A283; }
.pbind-panel-icon {
	width: 56px; height: 56px;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 26px; font-weight: 600;
}
.pbind-success .pbind-panel-icon { background: #D3F4E9; color: #003F32; }
.pbind-warn .pbind-panel-icon { background: #F5EBD3; color: #7A5C00; }

/* honeypot */
.pbind-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* page intros — guidance for doctors completing the form unaided */
.pbind-intro { margin: -6px 0 18px; padding: 12px 16px; background: var(--pb-cream-2); border-left: 3px solid var(--pb-teal); font-size: 14px; color: var(--pb-body); font-weight: 300; line-height: 1.5; }
.pbind-intro strong { font-weight: 600; color: var(--pb-deep-text); }

/* treatment sites — repeatable blocks */
.pbind-site { border: 1.5px solid var(--pb-line); border-left: 3px solid var(--pb-teal); padding: 16px 18px 14px; margin-bottom: 14px; }
.pbind-site-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.pbind-site-head h5 { margin: 0; font-size: 14px; font-weight: 600; color: var(--pb-deep-text); letter-spacing: .2px; }
.pbind-site-remove { appearance: none; background: none; border: 0; color: var(--pb-muted); font-family: inherit; font-size: 13px; cursor: pointer; padding: 4px 6px; text-decoration: underline; }
.pbind-site-remove:hover { color: var(--pb-error); }
.pbind-site .pbind-grid { gap: 12px 20px; }
.pbind-sessions-label { display: block; font-size: 13px; font-weight: 500; color: var(--pb-muted); margin: 12px 0 6px; }
.pbind-site-days { display: grid; gap: 8px; }
.pbind-site-day { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 10px; align-items: center; }
.pbind-site-day select { padding: 9px 30px 9px 11px; font-size: 14px; }
.pbind-site.is-adhoc .pbind-site-days { opacity: .45; }
.pbind select.pbind-invalid { border-color: var(--pb-error); }
@media (max-width: 640px) { .pbind-site-day { grid-template-columns: 78px 1fr 1fr; gap: 8px; } .pbind-site-day select { padding: 9px 22px 9px 8px; font-size: 13.5px; background-position: right 6px center; } .pbind-site-day .pbind-day-name { font-size: 13px; } }
.pbind-adhoc { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--pb-body); cursor: pointer; }
.pbind-adhoc input { width: 17px; height: 17px; accent-color: var(--pb-teal); }
.pbind-btn-small { padding: 10px 18px; font-size: 14px; }

/* billing types — one yes/no row per type, with inline follow-up fields */
.pbind-billing .pbind-yn:last-of-type { border-bottom: 0; }
.pbind-followup { margin: 10px 0 6px; padding: 14px 16px; background: var(--pb-cream-2); border: 1.5px solid var(--pb-line); }
.pbind-followup .pbind-label { color: var(--pb-deep-text); }

/* top five procedures — code only */
.pbind-codes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.pbind-codes label { display: block; }
.pbind-codes .pbind-label { text-align: center; }
.pbind-codes input { text-transform: uppercase; text-align: center; letter-spacing: .5px; }
@media (max-width: 640px) { .pbind-codes { grid-template-columns: repeat(3, 1fr); } }

@media (max-width: 640px) {
	.pbind-testmode { font-size: 11.5px; padding: 7px 12px; }
	.pbind-head { padding: 18px 20px 22px; padding-top: calc(14px + var(--pbind-topgap, 0px)); }
	.pbind-head h2 { font-size: 26px; margin: 10px 0 6px; }
	.pbind-head p { font-size: 13.5px; line-height: 1.45; }
	.pbind-progress { padding: 10px 14px; }
	.pbind-form { padding: 18px 14px; }
	.pbind-sheet-head, .pbind-sheet-foot { padding-left: 20px; padding-right: 20px; }
	.pbind-sheet-body { padding: 10px 20px 22px; }
	.pbind-dot-label { display: none; }
}
