/*
 * Patient pages outside the booking wizard — confirmations, payment, identity
 * check, follow-up booking, intake, and the cancel / confirm email links.
 *
 * One card that looks exactly like the wizard on index.php: every value here
 * is copied from css/index.css (.booking-wizard, .booking-form-content,
 * .booking-step-title, .booking-form-input, .booking-btn …), so a patient who
 * moves from the booking form to any of these pages sees the same page.
 * If you change the wizard's look, change the matching rule here too.
 *
 * Colours are written var(--sk-<role>, <Classic value>) like index.css, so the
 * colour skin chosen in Settings → Booking Form reaches these pages as well
 * (Classic loads no skin file and gets the fallback). Text sizes use the
 * css/type-scale.css tokens with the value repeated as the fallback.
 *
 * No page background is set anywhere: it is white, as on index.php, and a skin
 * tints it through css/skins/skin-base.css. Solid colours only, no gradients.
 *
 * Loaded by all_css_files.php.
 *
 * Page anatomy:
 *   <main class="container pb-60 pt-60">
 *     <div class="pp-card">
 *       <div class="pp-body [pp-center]">
 *         <div class="pp-icon is-ok">✓</div>      (optional, result pages)
 *         <h1 class="pp-title">…</h1>
 *         <p class="pp-subtitle">…</p>
 *         … pp-summary / pp-note / pp-field / pp-actions …
 */

/* ── Card ─────────────────────────────────────────────────────────────── */
.pp-card {
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
	width: 100%;
	max-width: 880px;
	margin: 0 auto;
	overflow: hidden; /* fallback for browsers without overflow: clip */
	overflow: clip visible;
	color: #2c3e50;
	text-align: left;
}

/* Optional top band — the same strip index.php uses for its step circles. */
.pp-band {
	background: var(--sk-surface-soft, #EAF4F5);
	padding: 20px 15px 10px;
	border-bottom: 1px solid var(--sk-line, #e9ecef);
	border-radius: 20px 20px 0 0;
}

.pp-body {
	padding: 40px;
}

.pp-center {
	text-align: center;
}

/* Two cards on one page (e.g. a form and its "done" card). */
.pp-card + .pp-card {
	margin-top: 30px;
}

/* ── Headings and text ────────────────────────────────────────────────── */
.pp-title {
	font-size: var(--fs-title, 32px);
	line-height: 1.25;
	color: #2c3e50;
	margin: 0 0 8px;
	font-weight: 600;
}

.pp-subtitle {
	font-size: var(--fs-read, 18px);
	line-height: 1.55;
	color: #4b5563;
	margin: 0 0 25px;
}

.pp-section-title {
	margin: 30px 0 14px;
	font-size: var(--fs-section, 24px);
	font-weight: 700;
	line-height: 1.3;
	color: var(--sk-heading, #2A7178);
}

.pp-section-title:first-child {
	margin-top: 0;
}

.pp-text {
	font-size: var(--fs-read, 18px);
	line-height: 1.6;
	color: #374151;
	margin: 0 0 12px;
}

.pp-center .pp-text,
.pp-center .pp-subtitle {
	max-width: 620px;
	margin-left: auto;
	margin-right: auto;
}

.pp-text a,
.pp-subtitle a,
.pp-note a,
.pp-muted a {
	color: var(--sk-accent, #2A7178);
	font-weight: 600;
	word-break: break-word;
}

.pp-muted {
	font-size: var(--fs-read, 18px);
	line-height: 1.6;
	color: #6b7280;
	margin: 20px 0 0;
}

/* "Booking reference: …" under a result — a short label, so the tag size. */
.pp-ref {
	margin-top: 22px;
	font-size: var(--fs-tag, 16px);
	color: #6b7280;
}

.pp-mono {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	letter-spacing: 0.02em;
}

.pp-divider {
	height: 1px;
	border: 0;
	background: var(--sk-line, #e9ecef);
	margin: 30px 0;
	opacity: 1;
}

/* ── Result icon (confirmed / warning / error) ────────────────────────── */
.pp-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 18px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 30px;
	font-weight: 700;
	line-height: 1;
	background: var(--sk-surface-soft, #EAF4F5);
	color: var(--sk-accent, #2A7178);
	border: 1px solid var(--sk-line, #b2d8db);
}

.pp-icon.is-warn {
	background: #fff7ed;
	color: #c2410c;
	border-color: #fed7aa;
}

.pp-icon.is-danger {
	background: #fdecec;
	color: #b42318;
	border-color: #f3c1bd;
}

/* ── Summary list (label left, value right) — index.php's order summary ─ */
.pp-summary {
	margin: 0 0 24px;
	padding: 8px 20px;
	background: var(--sk-card, #F7FAFA);
	border: 1px solid var(--sk-line, #D6E6E8);
	border-radius: 12px;
	text-align: left;
}

.pp-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	padding: 10px 0;
	font-size: var(--fs-read, 18px);
	line-height: 1.45;
	color: #334155;
}

.pp-row + .pp-row {
	border-top: 1px solid var(--sk-line, #E2ECEE);
}

.pp-row-label {
	color: #4b5563;
	flex: 0 1 auto;
}

.pp-row-value {
	color: #1f2f33;
	font-weight: 600;
	text-align: right;
	overflow-wrap: anywhere;
}

.pp-row.is-strong {
	font-size: var(--fs-label, 19px);
	font-weight: 700;
	color: #1f2f33;
}

.pp-row.is-strong .pp-row-label {
	color: #1f2f33;
}

/* ── Notes (info / done / warning / error) ────────────────────────────── */
.pp-note {
	margin: 0 0 20px;
	padding: 14px 18px;
	border-radius: 10px;
	font-size: var(--fs-read, 18px);
	line-height: 1.55;
	background: var(--sk-surface-soft, #eef4f5);
	border: 1px solid var(--sk-line, #cfe0e2);
	color: #2c3e50;
	text-align: left;
}

.pp-note.is-ok {
	background: #d4edda;
	border-color: #c3e6cb;
	color: #155724;
}

.pp-note.is-warn {
	background: #fff7ed;
	border-color: #fed7aa;
	color: #7c2d12;
}

.pp-note.is-danger {
	background: #f8d7da;
	border-color: #f5c6cb;
	color: #721c24;
}

.pp-note-title {
	display: block;
	margin-bottom: 6px;
	font-size: var(--fs-label, 19px);
	font-weight: 700;
	color: var(--sk-heading, #2A7178);
}

.pp-note.is-ok .pp-note-title,
.pp-note.is-warn .pp-note-title,
.pp-note.is-danger .pp-note-title {
	color: inherit;
}

.pp-note > :last-child {
	margin-bottom: 0;
}

/* Ticked list ("What's next?"). */
.pp-checklist {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pp-checklist li {
	position: relative;
	padding: 5px 0 5px 30px;
	font-size: var(--fs-read, 18px);
	line-height: 1.55;
	color: #374151;
}

.pp-checklist li::before {
	content: "\2713";
	position: absolute;
	left: 4px;
	top: 5px;
	color: var(--sk-accent, #2A7178);
	font-weight: 700;
}

/* Numbered list ("What happens next?"). */
.pp-numbered {
	margin: 0;
	padding-left: 26px;
}

.pp-numbered li {
	padding: 4px 0;
	font-size: var(--fs-read, 18px);
	line-height: 1.55;
	color: #374151;
}

/* ── Form fields — index.php's .booking-form-label / .booking-form-input ─ */
.pp-field {
	margin-bottom: 18px;
	text-align: left;
}

.pp-label {
	display: block;
	margin-bottom: 6px;
	color: #495057;
	font-weight: 600;
	font-size: var(--fs-label, 19px);
}

.pp-input {
	display: block;
	width: 100%;
	padding: 10px 16px;
	border: 2px solid var(--sk-line, #e9ecef);
	border-radius: 10px;
	font-size: var(--fs-read, 18px);
	font-family: inherit;
	color: #495057;
	background-color: var(--sk-card, #f8f9fa);
	min-height: 48px;
	line-height: 1.4;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

textarea.pp-input {
	min-height: 100px;
	resize: vertical;
}

.pp-input:focus {
	outline: none;
	border-color: var(--sk-accent, #2A7178);
	background-color: #fff;
	box-shadow: 0 0 0 4px rgba(42, 113, 120, 0.1);
}

.pp-input::placeholder {
	color: #9aa5b1;
}

.pp-help {
	margin-top: 6px;
	font-size: var(--fs-read, 18px);
	line-height: 1.5;
	color: #6b7280;
}

/* Tick-to-agree row — index.php's .order-summary-ack. */
.pp-check {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0 0 20px;
	padding: 12px 16px;
	background: #FFF8EC;
	border: 1px solid #E9C98B;
	border-radius: 10px;
	cursor: pointer;
	font-size: var(--fs-read, 18px);
	line-height: 1.5;
	color: #374151;
	text-align: left;
}

.pp-check input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 3px 0 0;
	accent-color: var(--sk-accent, #2A7178);
}

/* ── Buttons — index.php's .booking-btn / -next / -prev ──────────────── */
.pp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 10px 24px;
	border: none;
	border-radius: 10px;
	font-family: inherit;
	font-size: var(--fs-read, 18px);
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.pp-btn:disabled,
.pp-btn.is-disabled {
	opacity: 0.5;
	cursor: not-allowed;
	box-shadow: none;
}

.pp-btn-primary,
.pp-btn-primary:visited {
	background: var(--sk-cta, #2A7178);
	color: var(--sk-cta-ink, #fff);
}

.pp-btn-primary:hover:not(:disabled),
.pp-btn-primary:focus-visible {
	background: var(--sk-cta-hover, #1f5a5f);
	color: var(--sk-cta-ink, #fff);
	box-shadow: 0 4px 12px var(--sk-cta-glow, rgba(42, 113, 120, 0.4));
	text-decoration: none;
}

.pp-btn-secondary,
.pp-btn-secondary:visited {
	background: #e9ecef;
	color: #495057;
}

.pp-btn-secondary:hover:not(:disabled),
.pp-btn-secondary:focus-visible {
	background: #dee2e6;
	color: #495057;
	text-decoration: none;
}

/* Cancelling something — the one place a button is red. */
.pp-btn-danger,
.pp-btn-danger:visited {
	background: #c82333;
	color: #fff;
}

.pp-btn-danger:hover:not(:disabled),
.pp-btn-danger:focus-visible {
	background: #a71d2a;
	color: #fff;
	text-decoration: none;
}

.pp-btn:focus-visible {
	outline: 3px solid var(--sk-accent, #2A7178);
	outline-offset: 2px;
}

.pp-btn-block {
	display: flex;
	width: 100%;
}

.pp-btn-link {
	background: none;
	border: none;
	padding: 0;
	font-family: inherit;
	font-size: var(--fs-read, 18px);
	font-weight: 600;
	color: var(--sk-accent, #2A7178);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.pp-btn-link:hover {
	color: var(--sk-accent-hover, #1f5a5f);
}

/* Button row: main action on the right like the wizard; centred on result pages. */
.pp-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin-top: 30px;
}

.pp-center .pp-actions,
.pp-actions.is-center {
	justify-content: center;
}

/* A lone "Continue" sits on the right, like the wizard's Next button. */
.pp-actions.is-end {
	justify-content: flex-end;
}

.pp-actions .pp-btn {
	min-width: min(240px, 100%);
}

/* Small spinner inside a busy button. */
.pp-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: currentColor;
	border-radius: 50%;
	animation: pp-spin 0.7s linear infinite;
	vertical-align: middle;
}

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

/* ── Phones — the same breakpoint and values as the wizard ────────────── */
@media (max-width: 768px) {
	.pp-card {
		border-radius: 0;
	}

	.pp-band {
		padding: 15px;
		border-radius: 0;
	}

	.pp-body {
		padding: 20px 15px;
	}

	.pp-title {
		font-size: var(--fs-title-sm, 28px);
	}

	.pp-actions {
		flex-direction: column;
	}

	.pp-actions .pp-btn {
		width: 100%;
	}

	.pp-summary {
		padding: 6px 14px;
	}

	.pp-row {
		flex-wrap: wrap;
		gap: 2px 16px;
	}
}

@media print {
	.pp-card {
		box-shadow: none;
	}

	.pp-actions {
		display: none;
	}
}
