/*
 * Novacare Site Core — styles for this plugin's own output:
 * contact details, opening hours, the pharmacy identity panel, the preview
 * request screens and the preview banner.
 *
 * Colours come from the active theme's design tokens. Each has a fallback so
 * the blocks stay readable with any other theme. With the Novacare theme the
 * same tokens carry the Dark appearance, so nothing here may assume a light
 * page: a label on a filled button uses the "base" token (white in Light,
 * deep slate in Dark), never a literal white.
 */

.nc-ico {
	flex: 0 0 auto;
	width: 1.25rem;
	height: 1.25rem;
}

/* Phone and fax numbers stay on one line. */
.nc-nowrap,
a[href^="tel:"] {
	white-space: nowrap;
}

/* --------------------------------- Hours summary (bound text): one line per group of days */
.nc-hours-line {
	display: block;
}

/* ------------------------------------------------- Contact details */
.nc-contact__list {
	display: grid;
	gap: 0.9rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nc-contact__item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin: 0;
	line-height: 1.45;
}

.nc-contact__item .nc-ico {
	margin-top: 0.2rem;
	color: var(--wp--custom--icon--color, #1d5698);
}

.nc-contact__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.nc-contact__label {
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--wp--preset--color--text-muted, #56636f);
}

.nc-footer .nc-contact__label {
	color: inherit;
}

.nc-contact--no-labels .nc-contact__item .nc-ico {
	margin-top: 0.15rem;
}

.nc-contact__value {
	overflow-wrap: break-word;
}

.nc-contact__value a {
	display: inline-block;
	padding-block: 0.15rem;
	font-weight: 600;
}

/* On dark backgrounds (footer) everything inherits the surrounding colour. */
.nc-footer .nc-contact__item .nc-ico {
	color: inherit;
	opacity: 0.85;
}

/* --------------------------------------------------- Opening hours */
.nc-hours__table {
	--nc-hours-highlight: color-mix(in srgb, var(--wp--preset--color--brand, #2466a1) 12%, var(--wp--preset--color--base, #fff));
	--nc-hours-highlight-radius: 0.5rem;
	--nc-hours-row-inset: 0.625rem;
	font-variant-numeric: tabular-nums;
}

.nc-hours__table,
.nc-hours__table tbody {
	display: block;
}

/* The two cells can stack when their text and the padding need more room. */
.nc-hours__table tr {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.2rem 0.75rem;
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--wp--preset--color--border, #d3dfec);
}

.nc-hours__table tr:last-child {
	border-bottom: 0;
}

.nc-hours__table th,
.nc-hours__table td {
	padding: 0;
	text-align: start;
	line-height: 1.4;
	white-space: nowrap;
}

.nc-hours__table th {
	font-weight: 600;
}

.nc-hours--compact .nc-hours__table tr {
	padding-block: 0.3rem;
	border-bottom: 0;
}

.nc-hours__note {
	margin: 0.75rem 0 0;
	font-size: 0.9375rem;
	line-height: 1.45;
	opacity: 0.85;
}

.nc-footer .nc-hours__table tr {
	border-bottom-color: rgba(255, 255, 255, 0.16);
}

.nc-footer .nc-hours__table {
	--nc-hours-highlight: rgb(255 255 255 / 0.12);
}

.nc-hours__table .is-today {
	padding-inline: var(--nc-hours-row-inset);
	border-radius: var(--nc-hours-highlight-radius);
	background: var(--nc-hours-highlight);
}

.nc-hours {
	container-type: inline-size;
}

@container (max-width: 19.5em) {
	/* Keep all rows aligned when the hours column is narrow. */
	.nc-hours__table tr {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* ------------------------------------------------ Pharmacy identity */
.nc-identity__intro {
	margin: 0 0 0.5rem;
	font-weight: 600;
}

.nc-identity__note {
	margin: 0 0 1rem;
	color: var(--wp--preset--color--text-muted, #56636f);
	font-size: 0.9375rem;
}

.nc-identity__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: 0 2rem;
	margin: 0;
}

.nc-identity__row {
	padding: 0.85rem 0;
	border-top: 1px solid var(--wp--preset--color--border, #dce2e8);
}

.nc-identity__row dt {
	margin: 0 0 0.2rem;
	color: var(--wp--preset--color--text-muted, #56636f);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.35;
}

.nc-identity__row dd {
	margin: 0;
	color: var(--wp--preset--color--text, #263749);
	font-weight: 600;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.nc-identity__row dd a {
	display: inline-block;
	padding-block: 0.15rem;
}

/* A detail the pharmacy has not confirmed yet: quiet, but never hidden. */
.nc-pending {
	color: var(--wp--preset--color--text-muted, #56636f);
	font-style: italic;
	font-weight: 400;
	text-decoration: underline dotted;
	text-underline-offset: 0.2em;
}

/* Compact (footer of every page) */
.nc-identity--compact {
	font-size: 0.875rem;
	line-height: 1.5;
}

.nc-identity--compact .nc-identity__intro {
	margin: 0 0 0.35rem;
	font-weight: 700;
}

.nc-identity__inline {
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem 1.75rem;
	margin: 0;
}

.nc-identity__inline > div {
	display: flex;
	flex-wrap: wrap;
	gap: 0 0.4rem;
}

.nc-identity__inline dt::after {
	content: ":";
}

.nc-identity__inline dd {
	margin: 0;
	font-weight: 600;
}

.nc-footer .nc-pending {
	color: inherit;
}

/* ------------------------------------------- Preview request screens */
.nc-form {
	padding: clamp(1.1rem, 2.4vw, 1.6rem);
	border: 1px solid var(--wp--preset--color--border, #d3dfec);
	border-radius: var(--wp--custom--radius--lg, 22px);
	background: var(--wp--preset--color--base, #fff);
	box-shadow: var(--wp--preset--shadow--soft, 0 1px 2px rgba(23, 59, 103, 0.06));
	color: var(--wp--preset--color--text, #213247);
	scroll-margin-top: 7rem;
}

.nc-form__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin-bottom: 1rem;
}

.nc-form__title {
	order: -1;
	margin: 0;
	color: var(--wp--preset--color--brand-dark, #173b67);
	font-size: var(--wp--preset--font-size--large, 1.25rem);
	font-weight: 800;
	line-height: 1.25;
}

.nc-form--phone-only .nc-form__title {
	margin-bottom: 1rem;
}

/* "Preview only — …" (and, in phone-only mode, "Online requests are not offered…"): one quiet notice before any field. */
.nc-form__notice {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	margin: 0 0 1.25rem;
	padding: 0.85rem 1rem;
	border-inline-start: 3px solid var(--wp--preset--color--brand, #2466a1);
	border-radius: var(--wp--custom--radius--sm, 4px);
	background: var(--wp--preset--color--surface-muted, #edf4f8);
	color: var(--wp--preset--color--text, #263749);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.nc-form__notice .nc-ico {
	flex: 0 0 auto;
	width: 1.15rem;
	height: 1.15rem;
	margin-top: 0.15rem;
	color: var(--wp--preset--color--brand, #2466a1);
}

.nc-form__fields {
	min-width: 0;
	margin: 0 0 1rem;
	padding: 1rem;
	border: 1.5px dashed var(--wp--preset--color--border-strong, #74869c);
	border-radius: var(--wp--custom--radius--md, 14px);
	background:
		repeating-linear-gradient(
			135deg,
			transparent 0,
			transparent 11px,
			rgba(116, 134, 156, 0.07) 11px,
			rgba(116, 134, 156, 0.07) 12px
		),
		var(--wp--preset--color--surface, #f7f9fc);
}

.nc-form__legend {
	padding: 0 0.5rem;
	color: var(--wp--preset--color--text-muted, #4a5b70);
	font-size: 0.875rem;
	font-weight: 700;
}

.nc-field {
	min-width: 0;
	margin: 0 0 1rem;
	padding: 0;
	border: 0;
}

.nc-field:last-child {
	margin-bottom: 0;
}

.nc-field__label {
	display: block;
	margin: 0 0 0.35rem;
	padding: 0;
	color: var(--wp--preset--color--text, #213247);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.35;
}

.nc-field__required {
	margin-inline-start: 0.35em;
	color: var(--wp--preset--color--text-muted, #4a5b70);
	font-weight: 400;
}

.nc-field__input {
	display: block;
	width: 100%;
	min-height: 3rem;
	padding: 0.6rem 0.8rem;
	border: 1.5px solid var(--wp--preset--color--border-strong, #74869c);
	border-radius: var(--wp--custom--radius--sm, 8px);
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--text, #213247);
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
	transition: border-color 0.15s ease;
}

.nc-field__input:hover:not(:disabled) {
	border-color: var(--wp--preset--color--brand, #2466a1);
}

/* Focus: the theme's focus ring, plus a brand border so the active field is clear even at a glance. */
.nc-field__input:focus {
	border-color: var(--wp--preset--color--brand, #2466a1);
}

/*
 * Details the browser filled in for the visitor: the same field colours as
 * typed text (some browsers otherwise paint a pale yellow or blue box that is
 * hard to read on a dark page), with a soft tint so it is still clear which
 * fields were filled automatically.
 */
.nc-field__input:-webkit-autofill,
.nc-field__input:-webkit-autofill:hover,
.nc-field__input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--wp--preset--color--text, #213247);
	caret-color: var(--wp--preset--color--text, #213247);
	box-shadow: inset 0 0 0 100rem var(--wp--preset--color--surface-muted, #edf4f8);
	transition: background-color 600000s 0s;
}

.nc-field__input:autofill {
	box-shadow: inset 0 0 0 100rem var(--wp--preset--color--surface-muted, #edf4f8);
}

textarea.nc-field__input {
	min-height: 6.5rem;
	resize: vertical;
}

.nc-field__input::placeholder {
	color: var(--wp--preset--color--text-muted, #4a5b70);
	opacity: 1;
}

/* Disabled example fields: clearly inert, still readable. */
.nc-form__fields:disabled .nc-field__input,
.nc-field__input:disabled {
	border-style: dashed;
	background: var(--wp--preset--color--surface, #f7f6f3);
	color: var(--wp--preset--color--text-muted, #4a5b70);
	cursor: not-allowed;
	opacity: 1;
}

.nc-field__hint {
	margin: 0.35rem 0 0;
	color: var(--wp--preset--color--text-muted, #4a5b70);
	font-size: 1.125rem;
	line-height: 1.45;
}

/* States for a future, approved, active form (not used while preview only). */
.nc-field__input[aria-invalid="true"] {
	border-color: var(--wp--preset--color--danger, #b42318);
	border-width: 2px;
}

.nc-field__error {
	display: flex;
	gap: 0.4rem;
	margin: 0.35rem 0 0;
	color: var(--wp--preset--color--danger, #b42318);
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.45;
}

/*
 * One radio option ("nc-choice" belongs to the theme's guided choices): a
 * full-width row that is easy to tap, with a clear selected state. The label
 * is stretched over the whole row, so a tap anywhere on it picks the option.
 */
.nc-option {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin-top: 0.5rem;
	padding: 0.75rem 0.9rem;
	border: 1.5px solid var(--wp--preset--color--border-strong, #74869c);
	border-radius: var(--wp--custom--radius--sm, 8px);
	background: var(--wp--preset--color--base, #fff);
	line-height: 1.4;
}

.nc-option input {
	flex: 0 0 auto;
	width: 1.25rem;
	height: 1.25rem;
	margin: 0.1rem 0 0;
	accent-color: var(--wp--preset--color--brand, #1d5698);
}

.nc-option label {
	color: var(--wp--preset--color--text-muted, #4a5b70);
	cursor: pointer;
}

.nc-option label::after {
	content: "";
	position: absolute;
	inset: 0;
}

.nc-option:hover {
	border-color: var(--wp--preset--color--brand, #2466a1);
	background: var(--wp--preset--color--surface, #f7f9fc);
}

/* Keyboard focus on the radio itself shows around the whole row. */
.nc-option:has(input:focus-visible) {
	outline: 3px solid var(--wp--preset--color--focus, #0b2545);
	outline-offset: 2px;
}

.nc-option input:focus-visible {
	outline: none;
	box-shadow: none;
}

/* Selected: the filled circle, plus a heavier brand border and a tint. */
.nc-option:has(input:checked) {
	border-color: var(--wp--preset--color--brand, #1d5698);
	background: var(--wp--preset--color--surface-muted, #eaf4fc);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--brand, #1d5698);
}

/* On the inert review screens: the same rows, clearly not usable. */
.nc-form__fields:disabled .nc-option {
	border-style: dashed;
	background: var(--wp--preset--color--surface, #f7f6f3);
}

.nc-form__fields:disabled .nc-option label {
	cursor: not-allowed;
}

.nc-form__note {
	margin: 0 0 1rem;
	color: var(--wp--preset--color--text-muted, #4a5b70);
	font-size: 1.125rem;
	line-height: 1.5;
}

.nc-form__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.nc-form__call,
.nc-form__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	min-height: 3.25rem;
	padding: 0.8rem 1.375rem;
	border: 1.5px solid var(--wp--preset--color--brand, #2466a1);
	border-radius: 999px;
	font: inherit;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.nc-form__call {
	background: var(--wp--preset--color--brand, #1d5698);
	color: var(--wp--preset--color--base, #fff);
}

.nc-form__call:hover {
	border-color: var(--wp--preset--color--brand-dark, #173b67);
	background: var(--wp--preset--color--brand-dark, #173b67);
	color: var(--wp--preset--color--base, #fff);
}

.nc-form__call:active,
.nc-form__submit:active {
	box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.2);
}

.nc-form__submit {
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--brand, #1d5698);
}

.nc-form__submit:hover {
	border-color: var(--wp--preset--color--brand-dark, #173b67);
	background: var(--wp--preset--color--surface-muted, #eaf4fc);
	color: var(--wp--preset--color--brand-dark, #173b67);
}

.nc-form__status {
	margin-top: 1rem;
	border: 2px solid var(--wp--preset--color--brand-dark, #173b67);
	border-radius: var(--wp--custom--radius--md, 14px);
	background: var(--wp--preset--color--surface-muted, #eaf4fc);
	color: var(--wp--preset--color--text, #213247);
}

.nc-form__status[hidden] {
	display: none;
}

.nc-form__status p {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	margin: 0;
	padding: 0.9rem 1rem;
	line-height: 1.5;
}

.nc-form__status .nc-ico {
	margin-top: 0.15rem;
	color: var(--wp--preset--color--brand-dark, #173b67);
}

.nc-form__status a {
	font-weight: 700;
	white-space: nowrap;
}

.nc-form__status:focus {
	outline: 3px solid var(--wp--preset--color--focus, #0b2545);
	outline-offset: 3px;
}

@media (max-width: 29.99em) {
	.nc-form__actions {
		flex-direction: column;
	}

	.nc-form__call,
	.nc-form__submit {
		width: 100%;
	}
}

/* -------------- Working request forms (test mode; the live site only once approved) */
.nc-request {
	padding: clamp(1.1rem, 2.4vw, 1.6rem);
	border: 1px solid var(--wp--preset--color--border, #dce2e8);
	border-radius: var(--wp--custom--radius--lg, 22px);
	background: var(--wp--preset--color--base, #fff);
	box-shadow: var(--wp--preset--shadow--soft, 0 1px 2px rgba(23, 59, 103, 0.06));
	color: var(--wp--preset--color--text, #263749);
	scroll-margin-top: 7rem;
}

.wp-block-group.nc-path > .nc-request {
	margin-block-start: 2.5rem;
}

/*
 * Prescription request pathways are one centered column. The earlier wide
 * grid put the form in a narrow side column beside the call steps.
 */
.nc-flow--rx .wp-block-group.nc-path:has(> .nc-request) {
	width: 100%;
	max-width: none;
	margin-inline: 0;
}

.nc-flow--rx .wp-block-group.nc-path > .nc-request {
	width: 100%;
	margin-block-start: 0.5rem;
}

.nc-request--rx {
	padding: 0;
	overflow: hidden;
}

.nc-request--rx .nc-request__body {
	padding: clamp(1.1rem, 2.2vw, 1.45rem);
}

.nc-form__section {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 1.35rem 0 0.85rem;
	color: var(--nc-brand, #2466a1);
	font-family: var(--wp--preset--font-family--body, inherit);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.3;
	text-transform: uppercase;
}

.nc-form__section::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: var(--nc-border, #dce2e8);
}

.nc-request__body > .nc-request__form > .nc-form__section:first-of-type,
.nc-request__branch > .nc-form__section:first-child {
	margin-top: 0.15rem;
}

.nc-request--rx .nc-form__foot {
	margin-top: 0.35rem;
	padding-top: 1.05rem;
	border-top: 1px solid var(--nc-border, #dce2e8);
}

.nc-request--rx .nc-form__foot .nc-form__note {
	margin: 0 0 0.55rem;
}

.nc-request--rx .nc-option {
	position: relative;
	align-items: center;
	cursor: pointer;
}

.nc-request--rx .nc-option:has(input:checked) {
	border-color: var(--nc-brand, #2466a1);
	background: var(--nc-soft, #edf4f8);
}

.nc-request--rx .nc-option label::after {
	content: "";
	position: absolute;
	inset: 0;
}

.nc-request--rx .nc-rx__add::before {
	content: "";
	width: 0.8rem;
	height: 0.8rem;
	margin-inline-end: 0.45rem;
	background:
		linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat,
		linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}

.nc-request__title {
	margin: 0 0 1rem;
	color: var(--wp--custom--heading--color, var(--wp--preset--color--brand-dark, #173a63));
	font-size: var(--wp--preset--font-size--large, 1.25rem);
	line-height: 1.3;
}

/* "Test mode", in the heading itself, before the form's name and before any field. */
.nc-request__badge {
	display: table;
	margin: 0 0 0.45rem;
	padding: 0.15rem 0.6rem;
	border: 1px solid var(--wp--preset--color--warning, #8a5a00);
	border-radius: 999px;
	background: var(--wp--preset--color--warning-surface, #fff4d6);
	color: var(--wp--preset--color--warning, #8a5a00);
	font-family: var(--wp--preset--font-family--body, inherit);
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.4;
}

.nc-request__name {
	display: block;
}

/* The test-mode label: amber, so it never reads like the live service. */
.nc-form__notice--test {
	border-inline-start-color: var(--wp--preset--color--warning, #8a5a00);
	background: var(--wp--preset--color--warning-surface, #fff4d6);
}

.nc-form__notice--test .nc-ico {
	color: var(--wp--preset--color--warning, #8a5a00);
}

.nc-request__form[hidden],
.nc-request [data-nc-fields][hidden] {
	display: none !important;
}

.nc-request__form .nc-field__label {
	color: var(--wp--preset--color--text, #263749);
}

.nc-request__form .nc-option label {
	color: var(--wp--preset--color--text, #263749);
}

.nc-request__form .nc-field--choices {
	margin-bottom: 1.25rem;
}

/* Spam trap: kept out of sight and out of the tab order; people never see it. */
.nc-hp {
	position: absolute !important;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* A field with a problem: a bar down the side, as well as the message (not colour alone). */
.nc-field--error {
	padding-inline-start: 0.9rem;
	border-inline-start: 4px solid var(--wp--preset--color--danger, #b42318);
}

.nc-field--choices.nc-field--error {
	padding-inline-start: 0.9rem;
}

/*
 * A required question that appears after an earlier answer: a bordered, tinted
 * group so it is hard to miss. The legend floats so the border is not cut by it.
 * Its "(required)" marker is text, as on every other field.
 */
.nc-request__form .nc-field--reveal,
.nc-request .nc-field--reveal {
	margin: 0.25rem 0 1.5rem;
	padding: 1rem 1.1rem 0.5rem;
	border: 2px solid var(--wp--preset--color--brand, #2466a1);
	border-radius: 8px;
	background: var(--wp--preset--color--surface-muted, #edf4f8);
}

.nc-field--reveal > legend {
	float: left;
	width: 100%;
	margin: 0 0 0.35rem;
	padding: 0;
}

.nc-field--reveal > legend ~ * {
	clear: both;
}

.nc-field--reveal > legend:focus {
	outline: 3px solid var(--wp--preset--color--focus, #0b2545);
	outline-offset: 3px;
}

.nc-field--reveal > legend:focus:not(:focus-visible) {
	outline: none;
}

.nc-field--reveal.nc-field--error {
	border-inline-start-width: 6px;
	border-inline-start-color: var(--wp--preset--color--danger, #b42318);
}

/* "Service: Medication review" at the top of a form a service link opened. */
.nc-form__chosen {
	margin: 0 0 1.25rem;
	padding: 0.75rem 1rem;
	border-inline-start: 4px solid var(--wp--preset--color--brand, #2466a1);
	border-radius: 4px;
	background: var(--wp--preset--color--surface-muted, #edf4f8);
	color: var(--wp--preset--color--text, #263749);
	font-size: 1.125rem;
	line-height: 1.45;
}

.nc-form__chosen strong {
	font-weight: 700;
}

.nc-field__error {
	display: block;
	margin: 0.35rem 0 0.4rem;
}

.nc-form__submit--send,
.nc-request .nc-form__submit--send {
	border-radius: 999px;
	background: var(--wp--preset--color--brand, #2466a1);
	border-color: var(--wp--preset--color--brand, #2466a1);
	color: var(--wp--preset--color--base, #fff);
}

.nc-form__submit--send:hover,
.nc-request .nc-form__submit--send:hover {
	background: var(--wp--preset--color--brand-dark, #173a63);
	border-color: var(--wp--preset--color--brand-dark, #173a63);
	color: var(--wp--preset--color--base, #fff);
}

.nc-request .nc-request__submit {
	display: inline-grid;
	place-items: center;
}

.nc-request__submit > span {
	grid-area: 1 / 1;
}

.nc-request__submit:disabled {
	cursor: progress;
}

.nc-request__submit:disabled [data-nc-submit-label] {
	visibility: hidden;
}

.nc-request__submit:disabled .nc-request__sending {
	visibility: visible;
}

.nc-request__sending {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	visibility: hidden;
}

.nc-request__sending::before {
	content: "";
	width: 1rem;
	height: 1rem;
	flex: 0 0 auto;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
}

@media (prefers-reduced-motion: no-preference) {
	.nc-request__submit:disabled .nc-request__sending::before {
		animation: nc-spin 0.8s linear infinite;
	}
}

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

.nc-error-summary,
.nc-request__result {
	margin: 0 0 1.25rem;
	padding: 1rem 1.15rem;
	border: 3px solid var(--wp--preset--color--danger, #b42318);
	border-radius: var(--wp--custom--radius--md, 14px);
	background: var(--wp--preset--color--base, #fff);
}

/* When focus moves to a result or a field, keep it clear of the sticky header. */
.nc-error-summary,
.nc-request__result,
.nc-request__region,
.nc-request .nc-field,
.nc-request .nc-field__input {
	scroll-margin-top: calc(var(--nc-header-h, 5rem) + 1.5rem);
}

.nc-request .nc-form__submit {
	background: var(--wp--preset--color--brand, #2466a1);
	color: var(--wp--preset--color--base, #fff);
}

.nc-request .nc-field__label,
.nc-request .nc-field--choices > legend {
	font-size: 1.125rem;
}

.nc-request .nc-field__input,
.nc-request .nc-option {
	min-height: 3.25rem;
	font-size: 1.125rem;
}

.nc-form__field-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 1rem;
}

.nc-form__field-grid > :is(.nc-field-pair, .nc-form__section, .nc-form__note, .nc-request__branch, fieldset, .nc-field--check, .nc-field:has(textarea)) {
	grid-column: 1 / -1;
}

/* Align physician labels, controls and feedback across each desktop row. */
@media (width > 640px) {
	.nc-form__field-grid > .nc-field:not(:is(fieldset, .nc-field--check, :has(textarea))),
	.nc-form__field-grid .nc-field-pair > .nc-field {
		display: grid;
		grid-template-rows: subgrid;
		grid-row: span 4;
		align-items: start;
	}

	.nc-form__field-grid .nc-field-pair {
		grid-template-rows: repeat(4, auto);
	}

	.nc-form__field-grid .nc-field > .nc-field__label {
		grid-row: 1;
		align-self: end;
	}

	.nc-form__field-grid .nc-field > :is(.nc-field__input, .nc-rx__line) {
		grid-row: 2;
	}

	.nc-form__field-grid .nc-field > .nc-field__hint {
		grid-row: 3;
	}

	.nc-form__field-grid .nc-field > .nc-field__error {
		grid-row: 4;
	}
}

.nc-field-pair {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 1rem;
	align-items: start;
}

.nc-field-pair > .nc-field {
	display: flex;
	flex-direction: column;
}

.nc-field-pair > .nc-field > .nc-field__label {
	order: 1;
	display: block;
	align-content: end;
	min-height: 2.8rem;
	margin-bottom: 0.35rem;
}

.nc-field-pair > .nc-field > .nc-field__input,
.nc-field-pair > .nc-field > .nc-rx__line {
	order: 2;
}

.nc-field-pair > .nc-field > .nc-field__hint,
.nc-field-pair > .nc-field > .nc-field__error {
	order: 3;
}

.nc-field-pair .nc-field__input {
	height: 3.25rem;
	min-height: 3.25rem;
	box-sizing: border-box;
}

.nc-rx__line {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.nc-rx__add,
.nc-rx__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	padding: 0.45rem 1rem;
	border: 1.5px solid var(--wp--preset--color--brand, #2466a1);
	border-radius: 999px;
	background: transparent;
	color: var(--wp--preset--color--brand, #2466a1);
	font: inherit;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
}

.nc-rx__add:hover,
.nc-rx__remove:hover {
	background: var(--wp--preset--color--surface-muted, #eaf4fc);
}

.nc-rx__remove {
	flex: 0 0 auto;
}

.nc-request .nc-option {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin: 0 0 0.55rem;
	padding: 0.75rem 0.9rem;
	border: 1.5px solid var(--wp--preset--color--border-strong, #74869c);
	border-radius: 0.85rem;
	background: var(--wp--preset--color--base, #fff);
}

.nc-request .nc-option input {
	width: 1.35rem;
	height: 1.35rem;
	margin-top: 0.15rem;
	flex: 0 0 auto;
}

.nc-request .nc-option label {
	font-size: 1.125rem;
	line-height: 1.4;
}

.nc-request__reference {
	display: inline-block;
	margin: 0.75rem 0;
	padding: 0.75rem 1rem;
	border: 1px solid var(--wp--preset--color--border, #d5deea);
	border-radius: 0.85rem;
	background: var(--wp--preset--color--surface, #f7f6f3);
}

.nc-request__reference strong {
	font-size: 1.25rem;
	letter-spacing: 0.04em;
}

.cf-turnstile {
	margin: 0.5rem 0 1rem;
}

@media (max-width: 40em) {
	.nc-form__field-grid,
	.nc-field-pair {
		grid-template-columns: minmax(0, 1fr);
	}

	.nc-field-pair > .nc-field > .nc-field__label {
		min-height: 0;
	}

	.nc-field-pair > .nc-field:last-child {
		margin-bottom: 1rem;
	}

	.nc-request .nc-form__actions {
		flex-direction: column;
		align-items: stretch;
	}
}

.nc-error-summary:focus,
.nc-request__result:focus {
	outline: 3px solid var(--wp--preset--color--focus, #0b2545);
	outline-offset: 3px;
}

.nc-error-summary__title,
.nc-request__result-title {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 0 0 0.6rem;
	font-family: inherit;
	font-size: 1.125rem;
	font-weight: 800;
	line-height: 1.35;
}

.nc-error-summary__title {
	color: var(--wp--preset--color--danger, #b42318);
}

.nc-error-summary__list {
	margin: 0;
	padding-inline-start: 1.25rem;
}

.nc-error-summary__list li + li {
	margin-top: 0.35rem;
}

.nc-error-summary__list a {
	color: var(--wp--preset--color--danger, #b42318);
	font-weight: 700;
}

.nc-request__result p {
	margin: 0 0 0.6rem;
	line-height: 1.55;
}

.nc-request__result > :last-child {
	margin-bottom: 0;
}

.nc-request__result-title .nc-ico {
	flex: 0 0 auto;
	width: 1.35rem;
	height: 1.35rem;
	margin-top: 0.05rem;
}

.nc-request__result--failed .nc-request__result-title {
	color: var(--wp--preset--color--danger, #b42318);
}

/*
 * "Request received" only means the pharmacy's system has the request; the
 * wording (and this calm treatment) never suggests a refill is approved or an
 * appointment booked.
 */
.nc-request__result--sent {
	border-color: var(--wp--preset--color--success, #1a6b43);
	background: var(--wp--preset--color--surface-muted, #edf4f8);
}

.nc-request__result--sent .nc-request__result-title {
	color: var(--wp--preset--color--success, #1a6b43);
}

.nc-request__result--preview {
	border-color: var(--wp--preset--color--border-strong, #74869c);
	background: var(--wp--preset--color--surface, #f7f6f3);
}

.nc-request__result--preview .nc-request__result-title {
	color: var(--wp--custom--heading--color, #173a63);
}

.nc-request__reference strong {
	font-size: 1.125rem;
	letter-spacing: 0.04em;
}

.nc-request__duplicate {
	font-weight: 700;
}

.nc-request__test {
	margin: 0.75rem 0;
	padding: 0.6rem 0.8rem;
	border: 1px dashed var(--wp--preset--color--warning, #8a5a00);
	border-radius: var(--wp--custom--radius--sm, 8px);
	background: var(--wp--preset--color--warning-surface, #fff4d6);
}

.nc-request__test summary {
	min-height: 2.75rem;
	display: flex;
	align-items: center;
	cursor: pointer;
	font-weight: 700;
}

.nc-request__mail {
	margin-top: 0.5rem;
	padding: 0.75rem 0.9rem;
	border-inline-start: 3px solid var(--wp--preset--color--border-strong, #7a8794);
	background: var(--wp--preset--color--base, #fff);
	font-size: 0.9375rem;
}

.nc-request__call a,
.nc-request__result a[href^="tel:"] {
	font-weight: 700;
}

.nc-request__again {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	font-weight: 700;
}

@media (forced-colors: active) {
	.nc-error-summary,
	.nc-request__result,
	.nc-field--error {
		border-color: CanvasText;
	}

	.nc-form__notice--test,
	.nc-request__badge {
		border: 1px solid CanvasText;
	}
}

/* Prescription photo upload. Large targets, stacked on a narrow phone. */
fieldset.nc-photo {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	height: auto;
	aspect-ratio: auto;
	min-width: 0;
	min-height: 0;
	margin: 0 0 1rem;
	padding: 0;
	border: 0;
	background: transparent;
}

.nc-photo > legend {
	margin-block-end: 0.5rem;
	padding: 0;
}

.nc-photo__panel {
	min-width: 0;
	padding: 0.85rem 1rem 1rem;
	border-radius: 12px;
	background: var(--wp--preset--color--surface-muted, #edf4f8);
	overflow: visible;
}

.nc-photo__actions {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 0.75rem;
	width: 100%;
	margin-block: 0.75rem 0.5rem;
}

.nc-photo__btn {
	position: relative;
	display: inline-flex;
	flex: 1 1 15rem;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	box-sizing: border-box;
	width: auto;
	min-height: 56px;
	padding: 0.75rem 1rem;
	border: 2px solid var(--nc-navy, #173a63);
	border-radius: 999px;
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--brand-dark, #173a63);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
	white-space: nowrap;
	cursor: pointer;
}

.nc-photo__btn:hover {
	background: var(--nc-soft, #edf4f8);
}

.nc-photo__btn svg {
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
}

.nc-photo__input {
	position: fixed;
	top: 0;
	left: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	opacity: 0;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.nc-photo__btn:focus-within {
	outline: 3px solid var(--nc-focus, #2466a1);
	outline-offset: 3px;
}

.nc-photo__list:empty,
.nc-photo__live:empty {
	display: none;
	margin: 0;
}

.nc-photo__list {
	display: grid;
	gap: 0.75rem;
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
}

.nc-photo__item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.nc-photo__thumb,
.nc-photo__pdf {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 6px;
	background: var(--wp--preset--color--surface-muted, #edf4f8);
}

.nc-photo__pdf {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
}

.nc-photo__name {
	flex: 1 1 auto;
	min-width: 0;
	overflow-wrap: anywhere;
	font-size: 1.125rem;
}

.nc-photo__remove {
	min-width: 48px;
	min-height: 48px;
	padding: 0.5rem 0.9rem;
	border: 2px solid currentColor;
	border-radius: 8px;
	background: transparent;
	color: inherit;
	font-size: 1.125rem;
	font-weight: 700;
}

@media (max-width: 30em) {
	.nc-photo__panel {
		padding-inline: 0.75rem;
	}

	.nc-photo__actions {
		flex-direction: column;
	}

	.nc-photo__btn {
		flex: 1 1 auto;
		width: 100%;
		padding-inline: 0.5rem;
	}
}

/* Editor sidebar note */
.novacare-editor-note {
	margin-top: 1rem;
	color: #50575e;
	font-size: 12px;
	line-height: 1.5;
}
