/*
 * The secure imaging form.
 *
 * Deliberately plain: this is a medical intake form, and every element has to
 * read as what it is. It borrows the site's own tokens so it does not look
 * bolted on, but falls back to sensible values if the theme changes.
 */

.adyb-imaging {
	max-width: 44rem;
	margin-inline: auto;
	scroll-margin-top: calc(var(--adyb-header-height, 96px) + 1rem);
}

.adyb-imaging__title {
	margin: 0 0 0.5rem;
	font-family: var(--wp--preset--font-family--display, Georgia, serif);
	font-size: var(--wp--preset--font-size--x-large, 1.75rem);
	font-weight: 400;
	color: var(--wp--preset--color--brand, #1d2b4d);
}

.adyb-imaging__help {
	margin: 0 0 1.5rem;
	color: var(--wp--preset--color--muted, #5a6480);
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	line-height: 1.7;
}

.adyb-imaging__gate,
.adyb-imaging__form {
	padding: clamp(1.5rem, 4vw, 2.5rem);
	border-radius: 18px;
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid rgba(29, 43, 77, 0.1);
	box-shadow: 0 1px 2px rgba(18, 28, 51, 0.04), 0 10px 30px rgba(18, 28, 51, 0.07);
}

.adyb-imaging__field {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	margin: 0 0 1.35rem;
}

.adyb-imaging__field label {
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand, #1d2b4d);
}

.adyb-imaging__field input,
.adyb-imaging__field textarea {
	width: 100%;
	/* The padding must sit inside the 100%, or the field overflows a phone. */
	box-sizing: border-box;
	padding: 0.8rem 0.95rem;
	border: 1px solid var(--wp--preset--color--mist, #d9dfeb);
	border-radius: 10px;
	background: var(--wp--preset--color--base, #fff);
	font: inherit;
	color: inherit;
}

.adyb-imaging__field input:focus-visible,
.adyb-imaging__field textarea:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-strong, #8d6430);
	outline-offset: 1px;
}

/* The code itself: spaced out so it is easy to read back over the phone. */
.adyb-imaging__code {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 1.25rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.adyb-imaging__hint {
	color: var(--wp--preset--color--muted, #5a6480);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	line-height: 1.6;
}

.adyb-imaging__filelist:not(:empty) {
	margin-block-start: 0.35rem;
	padding: 0.65rem 0.85rem;
	border-radius: 10px;
	background: var(--wp--preset--color--surface, #f4f6fa);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	line-height: 1.7;
	color: var(--wp--preset--color--brand, #1d2b4d);
}

.adyb-imaging__filelist b {
	font-weight: 600;
}

.adyb-imaging__filelist .is-rejected {
	color: #9d2235;
}

.adyb-imaging__consent {
	margin: 0 0 1.1rem;
	padding: 1rem 1.15rem;
	border-radius: 12px;
	background: var(--wp--preset--color--sand-surface, #faf6f1);
	border: 1px solid rgba(141, 100, 48, 0.25);
}

.adyb-imaging__consent label {
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	line-height: 1.7;
	color: var(--wp--preset--color--ink, #15192a);
}

.adyb-imaging__consent input {
	flex: 0 0 auto;
	margin-block-start: 0.2rem;
	width: 1.05rem;
	height: 1.05rem;
}

.adyb-imaging__note {
	margin: 0 0 1.5rem;
	color: var(--wp--preset--color--muted, #5a6480);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	line-height: 1.7;
}

/*
 * The button is defined here rather than borrowed from the site plugin: this
 * plugin has to work, and look right, even if the other one is switched off.
 * It uses the same theme tokens, so it matches wherever the theme does.
 */
.adyb-imaging .adyb-button {
	display: inline-block;
	padding: 0.9rem 2rem;
	border: 2px solid var(--wp--preset--color--brand, #1d2b4d);
	border-radius: 999px;
	background: var(--wp--preset--color--brand, #1d2b4d);
	color: var(--wp--preset--color--base, #fff);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.adyb-imaging .adyb-button:hover,
.adyb-imaging .adyb-button:focus-visible {
	background: var(--wp--preset--color--accent, #e2c4a3);
	border-color: var(--wp--preset--color--accent, #e2c4a3);
	color: var(--wp--preset--color--brand, #1d2b4d);
}

.adyb-imaging .adyb-button[disabled] {
	opacity: 0.6;
	cursor: progress;
}

.adyb-imaging__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	margin: 0;
}

.adyb-imaging__reset {
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	color: var(--wp--preset--color--muted, #5a6480);
}

/* The honeypot: present for a bot, gone for everyone else. */
.adyb-imaging__trap {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.adyb-imaging__notice {
	margin: 0 0 1.5rem;
	padding: 1rem 1.2rem;
	border-radius: 12px;
	border-inline-start: 4px solid;
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	line-height: 1.7;
}

.adyb-imaging__notice--success {
	border-color: #2f7d4f;
	background: #eef7f1;
	color: #1d5334;
}

.adyb-imaging__notice--error {
	border-color: #9d2235;
	background: #fdeef0;
	color: #7c1b2a;
}

.adyb-imaging__progress {
	margin-block-start: 1rem;
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	color: var(--wp--preset--color--muted, #5a6480);
}
