/**
 * sqm-checkout.css
 * Inline service checkout + payment-complete screen.
 * Brand-token defaults — refine in the design-system pass.
 *
 * Tokens: charcoal #262626 · orange #FFA500 · yellow #FFBB00
 *         sky #7DC8F7 · blue #3B91B4
 */

/* ── Checkout container ─────────────────────────────────────────────── */
.sqm-checkout {
	max-width: 520px;
	margin: 24px auto;
	font-family: inherit;
}

.sqm-checkout__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	background: #f8f8f8;
	border-radius: 12px;
	padding: 18px 20px;
	margin-bottom: 24px;
}

.sqm-checkout__service {
	display: flex;
	flex-direction: column;
}

.sqm-checkout__service-name {
	font-weight: 600;
	color: #262626;
	font-size: 16px;
}

.sqm-checkout__service-desc {
	color: #777;
	font-size: 13px;
	margin-top: 2px;
}

.sqm-checkout__price {
	font-weight: 700;
	color: #262626;
	font-size: 20px;
	white-space: nowrap;
}

.sqm-checkout__heading {
	font-size: 18px;
	font-weight: 700;
	color: #262626;
	margin: 0 0 16px;
}

/* ── Fields ─────────────────────────────────────────────────────────── */
.sqm-field {
	margin-bottom: 16px;
}

.sqm-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #444;
	margin-bottom: 6px;
}

.sqm-field input {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border: 1px solid #d8d8d8;
	border-radius: 10px;   /* rounded to match the site aesthetic */
	font-size: 15px;
	color: #262626;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.sqm-field input:focus {
	outline: none;
	border-color: #3B91B4;
	box-shadow: 0 0 0 3px rgba(125, 200, 247, 0.3);
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.sqm-checkout__btn {
	display: inline-block;
	width: 100%;
	box-sizing: border-box;
	background: #FFA500;
	color: #262626;
	font-weight: 600;
	font-size: 16px;
	border: none;
	border-radius: 9999px;
	padding: 14px 24px;
	cursor: pointer;
	transition: background .15s ease;
}

.sqm-checkout__btn:hover:not(:disabled) {
	background: #FFBB00;
}

.sqm-checkout__btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

/* ── Messages ───────────────────────────────────────────────────────── */
.sqm-checkout__message,
.sqm-payment-message {
	font-size: 14px;
	margin: 12px 0;
	min-height: 1em;
}

.sqm-checkout__message--error,
.sqm-payment-message--error {
	color: #c0392b;
}

.sqm-payment-message--success {
	color: #1e7e34;
}

#sqm-payment-element {
	margin-bottom: 20px;
}

/* ── Payment-complete screen ────────────────────────────────────────── */
.sqm-complete {
	max-width: 640px;
	margin: 40px auto;
	text-align: center;
	font-family: inherit;
}

.sqm-complete__badge {
	width: 64px;
	height: 64px;
	line-height: 64px;
	border-radius: 50%;
	background: #FFA500;
	color: #fff;
	font-size: 32px;
	font-weight: 700;
	margin: 0 auto 20px;
}

.sqm-complete__title {
	font-size: 28px;
	color: #262626;
	margin: 0 0 12px;
}

.sqm-complete__lead {
	font-size: 16px;
	color: #555;
	line-height: 1.55;
	max-width: 520px;
	margin: 0 auto 28px;
}

.sqm-complete__intake {
	text-align: left;
	background: #f8f8f8;
	border-radius: 16px;
	padding: 28px;
	margin: 28px 0;
}

.sqm-complete__intake h3 {
	margin: 0 0 6px;
	color: #262626;
	font-size: 19px;
}

.sqm-complete__intake p {
	margin: 0 0 18px;
	color: #666;
	font-size: 14px;
}

.sqm-complete__actions {
	margin: 24px 0 12px;
}

.sqm-complete__btn {
	display: inline-block;
	background: #262626;
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	padding: 14px 32px;
	border-radius: 9999px;
	transition: background .15s ease;
}

.sqm-complete__btn:hover {
	background: #3B91B4;
}

.sqm-complete__note {
	font-size: 13px;
	color: #999;
	margin-top: 8px;
}

.sqm-complete--failed .sqm-complete__title { color: #c0392b; }
.sqm-complete--pending .sqm-complete__title { color: #3B91B4; }

/* ── Plan picker (Care Plans) ────────────────────────────────────────── */
.sqm-plans {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 24px;
}

.sqm-plan {
	display: block;
	position: relative;
	cursor: pointer;
}

/* Visually hide the radio but keep it accessible/focusable */
.sqm-plan input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.sqm-plan__body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	border: 2px solid #e2e2e2;
	border-radius: 12px;
	padding: 16px 20px;
	transition: border-color .15s ease, background .15s ease;
}

.sqm-plan:hover .sqm-plan__body {
	border-color: #7DC8F7;
}

.sqm-plan input[type="radio"]:checked + .sqm-plan__body {
	border-color: #FFA500;
	background: #FFF9EF;
}

/* Keyboard focus ring */
.sqm-plan input[type="radio"]:focus-visible + .sqm-plan__body {
	outline: none;
	box-shadow: 0 0 0 3px rgba(125, 200, 247, 0.45);
}

.sqm-plan__name {
	font-weight: 600;
	font-size: 16px;
	color: #262626;
}

.sqm-plan__price {
	font-weight: 700;
	font-size: 18px;
	color: #262626;
	white-space: nowrap;
}

.sqm-checkout__note {
	font-size: 13px;
	color: #888;
	text-align: center;
	margin-top: 12px;
}

/* ── Element-qualified overrides ──────────────────────────────────────────
   These are <button> elements. The theme styles bare buttons with the brand
   colour and its own padding/weight, which overrides a plain class and left
   the label unreadable against its own background. Same fix applied across
   the portal; every property the theme sets is reset explicitly. */
button.sqm-checkout__btn,
button.sqm-checkout__btn:hover,
button.sqm-checkout__btn:focus {
	background: var(--psk-primary, #FFA500) !important;
	color: #262626 !important;
	border: 0 !important;
	box-shadow: none !important;
	font-weight: 700 !important;
	font-size: 15px !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	border-radius: 8px !important;
}
button.sqm-checkout__btn:hover:not(:disabled),
button.sqm-checkout__btn:focus:not(:disabled) {
	background: #FFBB00 !important;
}
button.sqm-checkout__btn:disabled {
	opacity: .55 !important;
	cursor: not-allowed;
}

/* ── Interactive element pass ────────────────────────────────────────────
   The payment-complete screen's button had no element-qualified rule, so it
   would have inherited the theme the first time a real payment completed —
   a bad place to discover an unreadable button. */
a.sqm-complete__btn,
a.sqm-complete__btn:visited,
a.sqm-complete__btn:hover,
a.sqm-complete__btn:focus {
	background: var(--psk-primary, #FFA500) !important;
	color: #262626 !important;
	border: 0 !important;
	box-shadow: none !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	font-weight: 700 !important;
	border-radius: 8px !important;
}
a.sqm-complete__btn:hover { background: #FFBB00 !important; }

/* Checkout form controls — Stripe's own iframe is unaffected, but the
   surrounding fields are ours. */
.sqm-checkout input[type="text"],
.sqm-checkout input[type="email"],
.sqm-checkout select,
.sqm-checkout textarea {
	background: var(--psk-surface, #fff) !important;
	color: var(--psk-text, #262626) !important;
	border: 1px solid var(--psk-border, #e5e5e5) !important;
	font-family: inherit !important;
}
