/**
 * Wegovy Tablets — screening-form styles + a handful of tablets-specific
 * additions that don't exist in wegovy.css.
 *
 * The marketing sections of the page (hero, why-cards, included-cards,
 * FAQ, signup band) use the .wegovy-* classes from css/wegovy.css directly.
 * Nothing marketing-related is redefined here — only the form and the
 * few genuinely new patterns.
 *
 * All colours consume the theme's design tokens (--primary-teal,
 * --primary-blue, --bg-cream, --border-light, etc. — defined in
 * responsive.css:6–30).
 */

/* ═══ New patterns not in wegovy.css ═════════════════════════════════ */

/* Placeholder card for the hero product image slot when no image is set.
   Gradient card that reads as a product tile rather than a broken image. */
.wegovy-product-placeholder {
	aspect-ratio: 1 / 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 2rem;
	border-radius: 1rem;
	background: linear-gradient(135deg, #E0F7F5 0%, #B3E4DC 50%, #7ECBBB 100%);
	color: var(--text-dark);
	text-align: center;
}
.wegovy-product-placeholder-brand {
	font-family: 'Playfair Display', serif;
	font-weight: 700;
	font-size: clamp(2rem, 4vw, 2.75rem);
	color: var(--primary-teal);
	line-height: 1;
}
.wegovy-product-placeholder-form {
	font-family: 'Playfair Display', serif;
	font-weight: 700;
	font-size: clamp(1.5rem, 3vw, 2rem);
	color: var(--text-dark);
	line-height: 1;
}
.wegovy-product-placeholder-strengths {
	font-family: 'Nunito Sans', sans-serif;
	font-weight: 700;
	font-size: 0.9375rem;
	color: var(--text-gray);
	letter-spacing: 0.05em;
	margin-top: 0.5rem;
}

/* Card-image placeholder for the "How it works" step cards when no image
   is uploaded — matches the .wegovy-card-image dimensions (14rem tall). */
.wegovy-card-image-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--white);
}
.wegovy-card-image-placeholder svg {
	width: 4rem;
	height: 4rem;
	opacity: 0.9;
}
.wegovy-placeholder-gradient-1 {
	background: linear-gradient(135deg, #00b5a4 0%, #009689 100%);
}
.wegovy-placeholder-gradient-2 {
	background: linear-gradient(135deg, #ffa178 0%, #ff7e5f 100%);
}
.wegovy-placeholder-gradient-3 {
	background: linear-gradient(135deg, #0077b6 0%, #005a8b 100%);
}

/* Safety section — reuses the wegovy trust-banner recipe with a warning
   variant (warm accent-orange instead of teal) for genuine warnings. */
.wegovy-safety-section {
	background: var(--bg-cream);
}
.wegovy-safety-callout {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	padding: 1.5rem 1.75rem;
	background: rgba(0, 150, 137, 0.08);
	border-left: 4px solid var(--primary-teal);
	border-radius: 0.5rem;
	margin-bottom: 1rem;
}
.wegovy-safety-callout--warning {
	background: rgba(255, 161, 120, 0.12);
	border-left-color: var(--accent-orange);
}
.wegovy-safety-callout--warning .wegovy-safety-callout-icon,
.wegovy-safety-callout--warning h3 {
	color: #b8410f;
}
.wegovy-safety-callout-icon {
	color: var(--primary-teal);
	flex-shrink: 0;
	margin-top: 0.125rem;
}
.wegovy-safety-callout-icon svg {
	width: 1.5rem;
	height: 1.5rem;
}
.wegovy-safety-callout-body h3 {
	font-family: 'Playfair Display', serif;
	font-weight: 700;
	font-size: 1.125rem;
	color: var(--text-dark);
	margin: 0 0 0.5rem;
}
.wegovy-safety-callout-body p {
	font-family: 'Nunito Sans', sans-serif;
	font-size: 0.9375rem;
	line-height: 1.65;
	color: var(--text-dark);
	margin: 0;
}
.wegovy-safety-callout-body a {
	color: var(--primary-blue);
	font-weight: 700;
	text-decoration: underline;
}
.wegovy-safety-callout-body a:hover {
	color: var(--primary-teal);
}

/* Screening section — tinted band around the form, with wegovy-style header. */
.wegovy-screening-section {
	background: linear-gradient(180deg, #ffffff 0%, var(--bg-cream) 100%);
}
.wegovy-screening-header {
	text-align: center;
	max-width: 48rem;
	margin: 0 auto 3rem;
}
.wegovy-screening-header h2 {
	font-family: 'Playfair Display', serif;
	font-weight: 700;
	font-size: clamp(2rem, 4vw, 3rem);
	color: var(--text-dark);
	margin: 1rem 0 1rem;
	line-height: 1.2;
}
.wegovy-screening-header p {
	font-family: 'Nunito Sans', sans-serif;
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--text-gray);
	max-width: 42rem;
	margin: 0 auto;
}
.wegovy-screening-form-wrapper {
	max-width: 52rem;
	margin: 0 auto;
}


/* ═══ Screening form internals — recoloured to tokens ═══════════════ */

.sp-tablets-form {
	background: var(--white);
	padding: 2rem;
	border-radius: 1.5rem;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
	font-family: 'Nunito Sans', sans-serif;
	color: var(--text-dark);
}

.sp-tablets-progress {
	height: 6px;
	background: var(--border-light);
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 2rem;
}
.sp-tablets-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #00b5a4 0%, var(--primary-blue) 100%);
	transition: width 0.3s ease;
	width: 0;
}

.sp-tablets-section {
	border: none;
	padding: 0 0 2rem;
	margin: 0 0 2rem;
	border-bottom: 1px solid var(--border-light);
}
.sp-tablets-section:last-of-type {
	border-bottom: none;
}
.sp-tablets-section legend {
	font-family: 'Playfair Display', serif;
	font-size: 1.375rem;
	font-weight: 700;
	color: var(--text-dark);
	padding: 0;
	margin-bottom: 1rem;
}
.sp-tablets-section .sp-question {
	margin-bottom: 1.5rem;
}
.sp-tablets-section .sp-question-title {
	font-weight: 700;
	color: var(--text-dark);
	margin: 0 0 0.75rem;
}

.sp-note-text {
	color: var(--text-gray);
	font-size: 0.9375rem;
	margin: 0 0 1rem;
}

.sp-tablets-terms {
	background: var(--bg-cream);
	border-radius: 1rem;
	padding: 1.25rem 1.5rem;
	margin-bottom: 1.5rem;
}
.sp-tablets-terms p {
	margin: 0 0 0.5rem;
	color: var(--text-dark);
	font-size: 0.9375rem;
}
.sp-tablets-terms p:last-child { margin-bottom: 0; }

/* Option cards (radios styled as cards) */
.sp-option-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
	margin-bottom: 1rem;
}
.sp-option-card {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 1.25rem 1rem;
	border: 2px solid var(--border-light);
	border-radius: 1rem;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
	background: var(--white);
	position: relative;
}
.sp-option-card:hover {
	border-color: var(--primary-teal);
	background: rgba(0, 150, 137, 0.03);
}
.sp-option-card input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.sp-option-card:has(input:checked) {
	border-color: var(--primary-teal);
	background: rgba(0, 150, 137, 0.06);
}
.sp-option-title {
	font-weight: 700;
	color: var(--text-dark);
	font-size: 1rem;
}
.sp-option-sub {
	color: var(--text-gray);
	font-size: 0.875rem;
}

/* Radio / checkbox lists */
.sp-radio-list,
.sp-checkbox-list {
	display: grid;
	gap: 0.5rem;
	margin-bottom: 1rem;
}
.sp-radio-label,
.sp-checkbox-label {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.875rem 1rem;
	background: var(--bg-cream);
	border: 1px solid var(--border-light);
	border-radius: 0.5rem;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}
.sp-radio-label:hover,
.sp-checkbox-label:hover {
	border-color: var(--primary-teal);
	background: rgba(0, 150, 137, 0.04);
}
.sp-radio-label input,
.sp-checkbox-label input {
	width: 1.125rem;
	height: 1.125rem;
	accent-color: var(--primary-teal);
	flex-shrink: 0;
}
.sp-radio-label:has(input:checked),
.sp-checkbox-label:has(input:checked) {
	border-color: var(--primary-teal);
	background: rgba(0, 150, 137, 0.06);
}
.sp-radio-label span,
.sp-checkbox-label span {
	color: var(--text-dark);
	font-weight: 500;
	font-size: 0.9375rem;
}

/* Inputs */
.sp-input-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.sp-input-row input {
	flex: 1;
}
.sp-input-suffix {
	font-weight: 700;
	color: var(--text-gray);
}
.sp-input-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem 0.75rem;
}
.sp-input-grid > label {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	font-weight: 600;
	color: var(--text-dark);
	font-size: 0.9375rem;
}
.sp-tablets-form input[type="text"],
.sp-tablets-form input[type="email"],
.sp-tablets-form input[type="tel"],
.sp-tablets-form input[type="number"],
.sp-tablets-form input[type="date"],
.sp-tablets-form textarea {
	width: 100%;
	padding: 0.875rem 1rem;
	border: 2px solid var(--border-light);
	border-radius: 0.75rem;
	font-size: 1rem;
	font-family: inherit;
	background: var(--white);
	color: var(--text-dark);
	box-sizing: border-box;
}
.sp-tablets-form input:focus,
.sp-tablets-form textarea:focus {
	outline: none;
	border-color: var(--primary-teal);
	box-shadow: 0 0 0 3px rgba(0, 150, 137, 0.15);
}
.sp-tablets-form textarea {
	resize: vertical;
	min-height: 96px;
}

.sp-tablets-submit-row {
	text-align: center;
	margin-top: 2rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}
.sp-tablets-submit {
	min-width: 260px;
}
.sp-tablets-error {
	background: rgba(255, 161, 120, 0.12);
	border-left: 4px solid var(--accent-orange);
	color: #b8410f;
	padding: 0.875rem 1.25rem;
	border-radius: 0 0.5rem 0.5rem 0;
	margin-top: 1rem;
	font-weight: 600;
}

/* Eligibility panel — appears when a clinical hard-stop is triggered.
   Uses the warm accent-orange tone (same recipe as the safety callouts on
   the marketing page) rather than a plain red error so it reads as
   "we can't help with this specific case", not "you did something wrong". */
.sp-tablets-ineligible {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	background: rgba(255, 161, 120, 0.12);
	border-left: 4px solid var(--accent-orange);
	border-radius: 0 0.75rem 0.75rem 0;
	padding: 1.25rem 1.5rem;
	margin-bottom: 2rem;
}
.sp-tablets-ineligible-icon {
	color: #b8410f;
	flex-shrink: 0;
	margin-top: 0.125rem;
}
.sp-tablets-ineligible-icon svg {
	width: 1.5rem;
	height: 1.5rem;
}
.sp-tablets-ineligible-body h3 {
	font-family: 'Playfair Display', serif;
	font-weight: 700;
	font-size: 1.125rem;
	color: #7a2a06;
	margin: 0 0 0.75rem;
}
.sp-tablets-ineligible-reasons {
	list-style: none;
	padding: 0;
	margin: 0 0 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.sp-tablets-ineligible-reasons li {
	position: relative;
	padding-left: 1.25rem;
	color: var(--text-dark);
	font-size: 0.9375rem;
	line-height: 1.5;
}
.sp-tablets-ineligible-reasons li::before {
	content: '•';
	position: absolute;
	left: 0;
	color: var(--accent-orange);
	font-weight: 700;
	font-size: 1.25rem;
	line-height: 1;
}
.sp-tablets-ineligible-body .sp-note-text {
	margin: 0;
	color: var(--text-gray);
}

/* Disabled submit — greyed and non-interactive when a hard-stop is active.
   Wins against the .cta-button hover state via [disabled] specificity. */
.sp-tablets-submit[disabled],
.sp-tablets-submit[disabled]:hover,
.sp-tablets-submit[disabled]:focus {
	opacity: 0.45;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
	filter: grayscale(0.4);
}

/* Fieldsets below the triggering hard-stop question — hidden entirely
   so ineligible users can't waste time answering more questions. The
   triggering question itself stays interactive so a mis-click can be
   corrected. Uses !important to beat any .sp-conditional inline logic. */
.sp-hardstop-hidden {
	display: none !important;
}

/* Honeypot — visually hidden from real users, still catches bots that
   fill every input. position:absolute keeps it out of layout; the
   negative offset + zero size ensures no screen readers announce it. */
.sp-honeypot {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

/* Confirmation panel */
.sp-tablets-confirmation {
	max-width: 42rem;
	margin: 0 auto;
	background: rgba(0, 150, 137, 0.08);
	border: 2px solid var(--primary-teal);
	border-radius: 1.5rem;
	padding: 2.5rem 2rem;
	text-align: center;
}
.sp-tablets-confirmation h2 {
	color: var(--text-dark);
	margin: 0 0 1rem;
	font-family: 'Playfair Display', serif;
}
.sp-tablets-confirmation p {
	color: var(--text-dark);
	margin: 0 0 1rem;
}
.sp-tablets-confirmation .cta-button {
	margin: 0.5rem auto 1rem;
}

/* Mobile */
@media (max-width: 47.9375rem) {
	.sp-tablets-form {
		padding: 1.25rem;
		border-radius: 1rem;
	}
	.sp-option-grid,
	.sp-input-grid {
		grid-template-columns: 1fr;
	}
	.sp-tablets-section legend {
		font-size: 1.125rem;
	}
	.wegovy-product-placeholder {
		padding: 1.5rem;
	}
}
