.thirtyone-rx-wrap,
.thirtyone-rx-account,
.thirtyone-rx-detail {
	--rx-green: #16834a;
	--rx-border: #e2e7e4;
	--rx-soft: #f4faf6;
	max-width: 980px;
	margin-inline: auto;
}

.thirtyone-rx-form {
	padding: clamp(20px, 4vw, 42px);
	border: 1px solid var(--rx-border);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .05);
}

.thirtyone-rx-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin-bottom: 28px;
}

.thirtyone-rx-form label {
	display: flex;
	flex-direction: column;
	gap: 7px;
	font-weight: 600;
}

.thirtyone-rx-form label.full {
	margin-bottom: 20px;
}

.thirtyone-rx-form input,
.thirtyone-rx-form select,
.thirtyone-rx-form textarea {
	width: 100%;
	min-height: 44px;
	border: 1px solid #cfd8d2;
	border-radius: 6px;
	padding: 10px 12px;
	background: #fff;
}

.thirtyone-rx-form .thirtyone-rx-consent {
	flex-direction: row;
	align-items: flex-start;
	margin: 24px 0;
	font-weight: 400;
}

.thirtyone-rx-consent input {
	width: auto;
	min-height: 0;
	margin-top: 4px;
}

.thirtyone-rx-hp {
	position: absolute !important;
	left: -10000px !important;
}

.thirtyone-rx-notice {
	margin-bottom: 20px;
	padding: 14px 18px;
	border-radius: 6px;
}

.thirtyone-rx-notice.success {
	color: #0b5b30;
	background: #e8f7ee;
}

.thirtyone-rx-notice.error {
	color: #8a1c1c;
	background: #fdecec;
}

.thirtyone-rx-heading,
.thirtyone-rx-summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 24px;
}

.thirtyone-rx-summary > div {
	flex: 1;
	padding: 18px;
	border: 1px solid var(--rx-border);
	border-radius: 8px;
	background: var(--rx-soft);
}

.thirtyone-rx-summary small,
.thirtyone-rx-summary strong {
	display: block;
}

.rx-status {
	display: inline-block;
	padding: 4px 9px;
	border-radius: 999px;
	background: #eef1ef;
	font-size: .9em;
}

.rx-status-completed,
.rx-status-approved {
	color: #096735;
	background: #e3f5e9;
}

.rx-status-rejected,
.rx-status-cancelled {
	color: #8b2020;
	background: #fae8e8;
}

.thirtyone-rx-timeline {
	border-left: 2px solid var(--rx-border);
	list-style: none;
	padding-left: 22px;
}

.thirtyone-rx-timeline li {
	position: relative;
	margin-bottom: 22px;
}

.thirtyone-rx-timeline li::before {
	position: absolute;
	top: 5px;
	left: -29px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--rx-green);
	content: "";
}

.thirtyone-rx-timeline time {
	display: block;
	color: #65726a;
	font-size: .88em;
}

@media (max-width: 700px) {
	.thirtyone-rx-grid {
		grid-template-columns: 1fr;
	}

	.thirtyone-rx-heading,
	.thirtyone-rx-summary {
		align-items: stretch;
		flex-direction: column;
	}

	.thirtyone-rx-summary > div {
		width: 100%;
	}
}

/* Multi-step prescription experience */
.thirtyone-rx-form-page .page-heading {
	display: none;
}

.thirtyone-rx-form-page .content-page {
	padding-top: 20px;
}

.thirtyone-rx-wrap {
	--rx-green: #137a46;
	--rx-green-dark: #0b5831;
	--rx-green-soft: #eaf7ef;
	--rx-ink: #16221b;
	--rx-muted: #647168;
	--rx-border: #dce6df;
	--rx-soft: #f7faf8;
	overflow: hidden;
	max-width: 940px;
	margin: 36px auto 60px;
	border: 1px solid var(--rx-border);
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 22px 70px rgba(23, 70, 43, .1);
	color: var(--rx-ink);
}

.thirtyone-rx-hero {
	padding: clamp(28px, 6vw, 54px);
	background:
		radial-gradient(circle at 90% 10%, rgba(255, 255, 255, .17), transparent 28%),
		linear-gradient(135deg, var(--rx-green-dark), var(--rx-green));
	color: #fff;
	text-align: center;
}

.thirtyone-rx-eyebrow {
	display: inline-flex;
	margin-bottom: 14px;
	padding: 6px 12px;
	border: 1px solid rgba(255, 255, 255, .24);
	border-radius: 999px;
	background: rgba(255, 255, 255, .1);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.thirtyone-rx-hero h2 {
	margin: 0 0 12px;
	color: #fff;
	font-size: clamp(30px, 5vw, 46px);
	line-height: 1.08;
}

.thirtyone-rx-hero p {
	max-width: 650px;
	margin: 0 auto;
	color: rgba(255, 255, 255, .88);
	font-size: clamp(15px, 2vw, 18px);
	line-height: 1.6;
}

.thirtyone-rx-trust {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 22px;
	margin-top: 24px;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
}

.thirtyone-rx-progress {
	display: grid;
	grid-template-columns: 1fr 56px 1fr 56px 1fr;
	align-items: center;
	padding: 28px clamp(20px, 6vw, 60px) 10px;
	background: #fff;
}

.thirtyone-rx-progress button {
	display: grid;
	grid-template-columns: 38px 1fr;
	grid-template-rows: auto auto;
	align-items: center;
	min-width: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--rx-muted);
	text-align: left;
	cursor: pointer;
}

.thirtyone-rx-progress button > span {
	grid-row: 1 / 3;
	display: grid;
	width: 38px;
	height: 38px;
	border: 2px solid var(--rx-border);
	border-radius: 50%;
	place-items: center;
	background: #fff;
	font-weight: 800;
	transition: .2s ease;
}

.thirtyone-rx-progress strong,
.thirtyone-rx-progress small {
	overflow: hidden;
	margin-left: 10px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.thirtyone-rx-progress strong {
	color: var(--rx-ink);
	font-size: 14px;
}

.thirtyone-rx-progress small {
	color: var(--rx-muted);
	font-size: 11px;
}

.thirtyone-rx-progress button.is-active > span,
.thirtyone-rx-progress button.is-complete > span {
	border-color: var(--rx-green);
	background: var(--rx-green);
	color: #fff;
	box-shadow: 0 0 0 5px var(--rx-green-soft);
}

.thirtyone-rx-progress button.is-complete > span {
	font-size: 0;
}

.thirtyone-rx-progress button.is-complete > span::after {
	content: "✓";
	font-size: 16px;
}

.thirtyone-rx-progress i {
	height: 2px;
	margin: 0 8px;
	background: var(--rx-border);
}

.thirtyone-rx-form {
	min-height: 520px;
	padding: clamp(24px, 5vw, 52px);
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.thirtyone-rx-panel {
	margin: 0;
	padding: 0;
	border: 0;
	animation: rx-panel-in .28s ease both;
}

.thirtyone-rx-panel[hidden] {
	display: none !important;
}

@keyframes rx-panel-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

.thirtyone-rx-panel-heading {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 30px;
}

.thirtyone-rx-panel-icon {
	display: grid;
	flex: 0 0 50px;
	width: 50px;
	height: 50px;
	border-radius: 15px;
	place-items: center;
	background: var(--rx-green-soft);
	color: var(--rx-green);
	font-size: 24px;
}

.thirtyone-rx-panel legend {
	display: block;
	margin: 0;
	padding: 0;
	color: var(--rx-ink);
	font-size: clamp(21px, 3vw, 28px);
	font-weight: 750;
	line-height: 1.2;
}

.thirtyone-rx-panel-heading p {
	margin: 5px 0 0;
	color: var(--rx-muted);
	font-size: 14px;
}

.thirtyone-rx-form label > span {
	color: #34453a;
	font-size: 13px;
	font-weight: 700;
}

.thirtyone-rx-form label > span b {
	color: #d04444;
}

.thirtyone-rx-form input,
.thirtyone-rx-form select,
.thirtyone-rx-form textarea {
	min-height: 50px;
	border: 1.5px solid var(--rx-border);
	border-radius: 10px;
	padding: 12px 14px;
	color: var(--rx-ink);
	font-size: 16px;
	transition: border-color .18s, box-shadow .18s;
}

.thirtyone-rx-form textarea {
	resize: vertical;
	line-height: 1.55;
}

.thirtyone-rx-form input:focus,
.thirtyone-rx-form select:focus,
.thirtyone-rx-form textarea:focus {
	border-color: var(--rx-green);
	outline: 0;
	box-shadow: 0 0 0 4px rgba(19, 122, 70, .11);
}

.thirtyone-rx-actions {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 34px;
	padding-top: 24px;
	border-top: 1px solid var(--rx-border);
}

.thirtyone-rx-next,
.thirtyone-rx-submit,
.thirtyone-rx-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 12px 22px;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 750;
	cursor: pointer;
	transition: transform .18s, box-shadow .18s, background .18s;
}

.thirtyone-rx-next,
.thirtyone-rx-submit {
	border: 1px solid var(--rx-green);
	background: var(--rx-green);
	color: #fff;
	box-shadow: 0 8px 22px rgba(19, 122, 70, .2);
}

.thirtyone-rx-back {
	border: 1px solid var(--rx-border);
	background: #fff;
	color: var(--rx-ink);
	box-shadow: none;
}

.thirtyone-rx-next:hover,
.thirtyone-rx-submit:hover {
	transform: translateY(-1px);
	background: var(--rx-green-dark);
	box-shadow: 0 10px 26px rgba(19, 122, 70, .27);
	color: #fff;
}

.thirtyone-rx-dropzone {
	position: relative;
	display: flex !important;
	align-items: center;
	padding: 28px 20px;
	border: 2px dashed #a9cbb8;
	border-radius: 14px;
	background: var(--rx-soft);
	text-align: center;
	cursor: pointer;
	transition: .2s ease;
}

.thirtyone-rx-dropzone:hover,
.thirtyone-rx-dropzone:focus-within {
	border-color: var(--rx-green);
	background: var(--rx-green-soft);
}

.thirtyone-rx-dropzone input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.thirtyone-rx-upload-icon {
	display: grid;
	width: 48px;
	height: 48px;
	margin-bottom: 6px;
	border-radius: 50%;
	place-items: center;
	background: #fff;
	color: var(--rx-green);
	box-shadow: 0 5px 18px rgba(19, 122, 70, .12);
	font-size: 25px;
	font-weight: 800;
}

.thirtyone-rx-dropzone strong {
	color: var(--rx-green-dark);
	font-size: 16px;
}

.thirtyone-rx-dropzone small {
	color: var(--rx-muted);
	font-weight: 400;
}

.thirtyone-rx-dropzone em {
	margin-top: 7px;
	color: var(--rx-muted);
	font-size: 11px;
	font-style: normal;
	font-weight: 500;
}

.thirtyone-rx-file-list {
	display: grid;
	gap: 8px;
	margin: 12px 0 22px;
}

.thirtyone-rx-file-list > div {
	display: grid;
	grid-template-columns: 28px 1fr auto;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border: 1px solid var(--rx-border);
	border-radius: 9px;
}

.thirtyone-rx-file-list > div > span {
	display: grid;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	place-items: center;
	background: var(--rx-green-soft);
	color: var(--rx-green);
}

.thirtyone-rx-file-list small {
	color: var(--rx-muted);
}

.thirtyone-rx-review,
.thirtyone-rx-security-note {
	margin-top: 22px;
	padding: 16px 18px;
	border-radius: 12px;
	background: var(--rx-soft);
}

.thirtyone-rx-review > strong {
	color: var(--rx-green-dark);
}

.thirtyone-rx-review p {
	display: grid;
	gap: 3px;
	margin: 7px 0 0;
	color: var(--rx-muted);
	font-size: 13px;
}

.thirtyone-rx-consent {
	flex-direction: row !important;
	align-items: flex-start;
	margin: 22px 0 0 !important;
	padding: 16px;
	border: 1px solid var(--rx-border);
	border-radius: 12px;
	background: #fff;
}

.thirtyone-rx-consent input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 1px 3px 0 0;
}

.thirtyone-rx-consent > span {
	font-weight: 500 !important;
	line-height: 1.5;
}

.thirtyone-rx-security-note {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	background: #f1f8f4;
	color: #395046;
}

.thirtyone-rx-security-note p {
	margin: 0;
	font-size: 12px;
	line-height: 1.55;
}

.thirtyone-rx-security-note strong {
	color: var(--rx-green-dark);
	font-size: 13px;
}

@media (max-width: 700px) {
	.thirtyone-rx-wrap {
		margin: 12px 0 36px;
		border-radius: 16px;
	}

	.thirtyone-rx-hero {
		padding: 30px 20px;
	}

	.thirtyone-rx-trust {
		gap: 7px 13px;
		font-size: 11px;
	}

	.thirtyone-rx-progress {
		grid-template-columns: 1fr 20px 1fr 20px 1fr;
		padding: 22px 14px 4px;
	}

	.thirtyone-rx-progress button {
		justify-items: center;
		grid-template-columns: 1fr;
		grid-template-rows: auto auto;
		text-align: center;
	}

	.thirtyone-rx-progress button > span {
		grid-row: auto;
		width: 34px;
		height: 34px;
	}

	.thirtyone-rx-progress strong {
		margin: 7px 0 0;
		font-size: 11px;
	}

	.thirtyone-rx-progress small {
		display: none;
	}

	.thirtyone-rx-progress i {
		margin: 0;
		transform: translateY(-10px);
	}

	.thirtyone-rx-form {
		min-height: 0;
		padding: 26px 18px;
	}

	.thirtyone-rx-panel-heading {
		align-items: flex-start;
		gap: 12px;
		margin-bottom: 24px;
	}

	.thirtyone-rx-panel-icon {
		flex-basis: 42px;
		width: 42px;
		height: 42px;
		border-radius: 12px;
		font-size: 20px;
	}

	.thirtyone-rx-grid {
		gap: 14px;
	}

	.thirtyone-rx-actions {
		position: sticky;
		bottom: 0;
		z-index: 2;
		margin: 28px -18px -26px;
		padding: 14px 18px;
		background: rgba(255, 255, 255, .96);
		box-shadow: 0 -8px 20px rgba(22, 34, 27, .06);
		backdrop-filter: blur(8px);
	}

	.thirtyone-rx-next,
	.thirtyone-rx-submit,
	.thirtyone-rx-back {
		min-height: 48px;
		padding: 10px 14px;
		font-size: 13px;
	}

	.thirtyone-rx-actions > span:first-child {
		display: none;
	}

	.thirtyone-rx-actions > span:first-child + .thirtyone-rx-next {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.thirtyone-rx-panel,
	.thirtyone-rx-next,
	.thirtyone-rx-submit {
		animation: none;
		transition: none;
	}
}

/* 31 Medicals brand polish */
.thirtyone-rx-form-page .content-page {
	padding-top: 150px;
}

.thirtyone-rx-wrap {
	--rx-blue: #1468b3;
	--rx-cyan: #05a9dc;
	--rx-green: #12a957;
	--rx-lime: #78c943;
	--rx-green-dark: #087b47;
	--rx-green-soft: #eaf9f1;
	--rx-ink: #15354a;
	--rx-muted: #627785;
	--rx-border: #d9e8ed;
	--rx-soft: #f4faff;
	width: calc(100% - 32px);
	max-width: 1180px;
	margin: 24px auto 70px;
	border-color: rgba(20, 104, 179, .14);
	border-radius: 28px;
	box-shadow: 0 28px 80px rgba(24, 81, 111, .13);
}

.thirtyone-rx-hero {
	position: relative;
	overflow: hidden;
	padding: clamp(38px, 5vw, 62px) clamp(24px, 6vw, 70px);
	background:
		radial-gradient(circle at 10% 8%, rgba(255, 255, 255, .22), transparent 26%),
		radial-gradient(circle at 91% 95%, rgba(120, 201, 67, .35), transparent 34%),
		linear-gradient(125deg, #075ca8 0%, #079cc9 49%, #0aa85b 100%);
}

.thirtyone-rx-hero::before,
.thirtyone-rx-hero::after {
	position: absolute;
	width: 170px;
	height: 170px;
	border: 30px solid rgba(255, 255, 255, .055);
	border-radius: 50%;
	content: "";
}

.thirtyone-rx-hero::before { top: -105px; left: -75px; }
.thirtyone-rx-hero::after { right: -65px; bottom: -125px; }

.thirtyone-rx-hero > * { position: relative; z-index: 1; }

.thirtyone-rx-eyebrow {
	padding: 7px 14px;
	border-color: rgba(255, 255, 255, .38);
	background: rgba(255, 255, 255, .14);
	box-shadow: inset 0 1px rgba(255, 255, 255, .16);
}

.thirtyone-rx-hero h2 {
	font-size: clamp(34px, 5vw, 52px);
	letter-spacing: -.035em;
}

.thirtyone-rx-progress {
	padding-top: 34px;
	background: linear-gradient(180deg, #f9fdff, #fff);
}

.thirtyone-rx-progress button.is-active > span,
.thirtyone-rx-progress button.is-complete > span {
	border-color: transparent;
	background: linear-gradient(135deg, var(--rx-blue), var(--rx-green));
	box-shadow: 0 0 0 5px rgba(5, 169, 220, .1), 0 6px 14px rgba(20, 104, 179, .2);
}

.thirtyone-rx-progress button.is-active strong { color: var(--rx-blue); }

.thirtyone-rx-progress i {
	background: linear-gradient(90deg, rgba(20, 104, 179, .18), rgba(18, 169, 87, .2));
}

.thirtyone-rx-form {
	min-height: 510px;
	padding: clamp(34px, 5vw, 60px) clamp(28px, 7vw, 78px);
}

.thirtyone-rx-panel-heading { align-items: flex-start; }

.thirtyone-rx-panel-icon {
	background: linear-gradient(145deg, #e9f6ff, #e9faef);
	color: var(--rx-blue);
	box-shadow: inset 0 0 0 1px rgba(20, 104, 179, .06);
}

.thirtyone-rx-panel-icon svg,
.thirtyone-rx-upload-icon svg,
.thirtyone-rx-security-note svg {
	width: 25px;
	height: 25px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.thirtyone-rx-panel legend {
	color: var(--rx-ink);
	font-size: clamp(23px, 3vw, 30px);
	font-weight: 750;
	letter-spacing: -.025em;
	line-height: 1.15;
	text-transform: none !important;
}

.thirtyone-rx-form input,
.thirtyone-rx-form select,
.thirtyone-rx-form textarea {
	border-color: #cedfe5;
	border-radius: 12px;
	background: #fcfeff;
	transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.thirtyone-rx-form input:focus,
.thirtyone-rx-form select:focus,
.thirtyone-rx-form textarea:focus {
	border-color: var(--rx-cyan);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(5, 169, 220, .11);
	outline: 0;
}

.thirtyone-rx-upload-options {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-top: 8px;
}

.thirtyone-rx-upload-card {
	position: relative;
	display: flex !important;
	min-height: 154px;
	align-items: center;
	justify-content: center;
	gap: 5px !important;
	padding: 24px 18px;
	border: 1.5px dashed #9bcddc;
	border-radius: 18px;
	background: linear-gradient(145deg, #f3faff, #f6fcf9);
	color: var(--rx-ink);
	text-align: center;
	cursor: pointer;
	transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.thirtyone-rx-upload-card.is-primary {
	border-style: solid;
	border-color: rgba(20, 104, 179, .22);
	background: linear-gradient(145deg, #edf7ff, #eefbf3);
}

.thirtyone-rx-upload-card:hover,
.thirtyone-rx-upload-card:focus-within {
	border-color: var(--rx-cyan);
	box-shadow: 0 12px 28px rgba(20, 104, 179, .12);
	transform: translateY(-2px);
}

.thirtyone-rx-upload-card input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.thirtyone-rx-upload-icon {
	display: grid;
	width: 50px;
	height: 50px;
	margin-bottom: 5px;
	border-radius: 15px;
	place-items: center;
	background: #fff;
	color: var(--rx-blue);
	box-shadow: 0 7px 20px rgba(20, 104, 179, .12);
}

.thirtyone-rx-upload-card:not(.is-primary) .thirtyone-rx-upload-icon { color: var(--rx-green); }
.thirtyone-rx-upload-card strong { color: var(--rx-ink); font-size: 16px; }
.thirtyone-rx-upload-card small { color: var(--rx-muted); font-weight: 500; }

.thirtyone-rx-file-help {
	margin: 11px 0 4px;
	color: var(--rx-muted);
	font-size: 12px;
	text-align: center;
}

.thirtyone-rx-next,
.thirtyone-rx-submit {
	border: 0;
	background: linear-gradient(110deg, var(--rx-blue), var(--rx-cyan) 52%, var(--rx-green));
	box-shadow: 0 10px 24px rgba(20, 104, 179, .2);
}

.thirtyone-rx-security-note {
	background: linear-gradient(135deg, #eff8ff, #effbf3);
	color: #456374;
}

.thirtyone-rx-security-note svg { flex: 0 0 23px; color: var(--rx-blue); }

@media (max-width: 700px) {
	.thirtyone-rx-form-page .content-page { padding-top: 76px; }
	.thirtyone-rx-wrap { width: calc(100% - 20px); margin-top: 10px; border-radius: 20px; }
	.thirtyone-rx-hero { padding: 34px 20px 36px; }
	.thirtyone-rx-hero h2 { font-size: 33px; }
	.thirtyone-rx-hero p { font-size: 14px; line-height: 1.55; }
	.thirtyone-rx-progress { padding-top: 24px; }
	.thirtyone-rx-form { padding: 30px 18px; }
	.thirtyone-rx-panel legend { font-size: 22px; }
	.thirtyone-rx-upload-options { grid-template-columns: 1fr; gap: 12px; }
	.thirtyone-rx-upload-card { min-height: 126px; padding: 18px; }
}
