/*
 * The classic layout's components (VT-02 tickets 02, 03, 06 and 07): the slideshow, the click-to-load embed (N6), the
 * photo strip, the site-hosted video player, the before-and-after slider and the forms' look (N17).
 * Loaded only where the classic page template renders (class-classic-embed.php). Colours are role tokens only;
 * every box's place and size is set by the page's own section styles (bdental-base classic.css), which place these
 * boxes; the forms' inner spacing is the moved site's form widget's own, and lives with its look.
 */

/* ---------------------------------------------------------------- Slideshow */

.bdental-slideshow {
	position: relative;
	overflow: hidden;
}

.bdental-slideshow__slides {
	display: grid;
	height: 100%;
}

/* Faded, never hidden: a slide's words stay in the accessibility tree (components.js). */
.bdental-slideshow__slide {
	grid-area: 1 / 1;
	position: relative;
	opacity: 0;
	pointer-events: none;
	transition: opacity 1s ease-in-out;
}

.bdental-slideshow__slide:first-child,
.bdental-slideshow.is-ready .bdental-slideshow__slide.is-current {
	opacity: 1;
	pointer-events: auto;
}

.bdental-slideshow.is-ready .bdental-slideshow__slide:first-child:not(.is-current) {
	opacity: 0;
	pointer-events: none;
}

.bdental-slideshow__prev,
.bdental-slideshow__next {
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--icon);
	cursor: pointer;
}

/* The arrows' hit area grows to 44px wide without moving anything. */
.bdental-slideshow__prev::after,
.bdental-slideshow__next::after {
	content: "";
	position: absolute;
	inset: 50% auto auto 50%;
	width: max(100%, 44px);
	height: max(100%, 44px);
	transform: translate(-50%, -50%);
}

.bdental-slideshow__prev svg,
.bdental-slideshow__next svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: currentColor;
}

.bdental-slideshow__next svg {
	transform: scaleX(-1);
}

.bdental-slideshow__nav {
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: center;
}

.bdental-slideshow__prev[hidden],
.bdental-slideshow__next[hidden],
.bdental-slideshow__nav[hidden] {
	display: none;
}

.bdental-slideshow__dot,
.bdental-slideshow__pause {
	position: relative;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

/* The current slide's dot is filled; the others are rings: a difference of shape, not of colour alone. */
.bdental-slideshow__dot::before {
	content: "";
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	border: 1.5px solid var(--wp--preset--color--icon);
	border-radius: 50%;
}

.bdental-slideshow__dot[aria-current="true"]::before {
	border-color: var(--wp--preset--color--body-secondary);
	background-color: var(--wp--preset--color--body-secondary);
}

/* Each control's hit area grows without moving anything, as wide as the gap to its neighbour allows
   (--bdental-slideshow-hit, set where the slideshow is placed). */
.bdental-slideshow__dot::after,
.bdental-slideshow__pause::after {
	content: "";
	position: absolute;
	inset: 50% auto auto 50%;
	width: var(--bdental-slideshow-hit, 24px);
	height: 24px;
	transform: translate(-50%, -50%);
}

.bdental-slideshow__pause {
	color: var(--wp--preset--color--icon);
}

.bdental-slideshow__pause svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: currentColor;
}

.bdental-slideshow__pause .bdental-slideshow__play-icon,
.bdental-slideshow__pause.is-paused .bdental-slideshow__pause-icon {
	display: none;
}

.bdental-slideshow__pause.is-paused .bdental-slideshow__play-icon {
	display: block;
}

.bdental-slideshow :focus-visible {
	outline: 2px solid var(--wp--preset--color--focus-ring);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.bdental-slideshow__slide,
	.bdental-slideshow .bdental-slideshow__slide.is-current,
	.bdental-slideshow__slide:first-child {
		transition: none;
	}
}

/* ---------------------------------------------------------------- Click-to-load embed (N6) */

.bdental-embed {
	position: relative;
	overflow: hidden;
}

.bdental-embed--video {
	background-color: var(--wp--preset--color--body);
}

.bdental-embed__still,
.bdental-embed__frame {
	display: block;
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.bdental-embed__still {
	object-fit: cover;
}

.bdental-embed__load {
	position: absolute;
	inset: 0;
	z-index: 1;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.bdental-embed__load:focus-visible {
	outline: 3px solid var(--wp--preset--color--focus-ring);
	outline-offset: -3px;
}

/* Video: a dark play badge at the bottom left, where the provider's own player draws its button. */
.bdental-embed--video .bdental-embed__label {
	position: absolute;
	left: 10px;
	bottom: 10px;
	width: 56px;
	height: 32px;
	border-radius: 4px;
	background-color: color-mix(in srgb, var(--wp--preset--color--body) 90%, transparent);
	font-size: 0;
}

.bdental-embed--video .bdental-embed__label::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	border-style: solid;
	border-width: 7px 0 7px 12px;
	border-color: transparent transparent transparent var(--wp--preset--color--page-background);
	transform: translate(-40%, -50%);
}

.bdental-embed--video .bdental-embed__load:hover .bdental-embed__label {
	background-color: var(--wp--preset--color--button-primary-bg);
}

/* Map: a white control at the top left, where the provider's map draws its own. */
.bdental-embed--map .bdental-embed__label {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 10px 14px;
	border-radius: 2px;
	background-color: var(--wp--preset--color--page-background);
	box-shadow: 0 1px 4px -1px color-mix(in srgb, var(--wp--preset--color--body) 30%, transparent);
	color: var(--wp--preset--color--body);
	font-family: var(--bdental-classic-font-alt, inherit);
	font-size: 15px;
	font-weight: 500;
	line-height: 20px;
}

.bdental-embed--map .bdental-embed__load:hover .bdental-embed__label {
	background-color: var(--wp--preset--color--section-surface);
}

.bdental-embed__credit {
	position: absolute;
	right: 0;
	bottom: 0;
	z-index: 2;
	margin: 0;
	padding: 1px 6px;
	background-color: color-mix(in srgb, var(--wp--preset--color--page-background) 85%, transparent);
	color: var(--wp--preset--color--body);
	font-size: 11px;
	line-height: 16px;
	pointer-events: none;
}

/* Reviews: a drawn panel with its heading at the top left and the button in the middle. */
.bdental-embed--reviews .bdental-embed__heading {
	margin: 0;
}

.bdental-embed--reviews .bdental-embed__load {
	display: flex;
	align-items: center;
	justify-content: center;
}

.bdental-embed--reviews .bdental-embed__label {
	padding: 12px 24px;
	background-color: var(--wp--preset--color--button-primary-bg);
	color: var(--wp--preset--color--button-primary-fg);
	font-size: 17px;
	line-height: 24px;
}

.bdental-embed--reviews .bdental-embed__load:hover .bdental-embed__label {
	background-color: var(--wp--preset--color--button-primary-hover);
}

.bdental-embed--reviews.is-loaded {
	background: none;
}

/* ---------------------------------------------------------------- Strip arrows (VT-02 ticket 03) */

/* The arrows sit over a photo: the icon grey inside a solid 1px pale outline, so the glyph meets 3:1 against the
   outline on a dark photo and the photo itself on a light one (WCAG 1.4.11). */
.bdental-strip__prev,
.bdental-strip__next {
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--icon);
	filter: drop-shadow(1px 0 0 var(--wp--preset--color--page-background)) drop-shadow(-1px 0 0 var(--wp--preset--color--page-background)) drop-shadow(0 1px 0 var(--wp--preset--color--page-background)) drop-shadow(0 -1px 0 var(--wp--preset--color--page-background));
	cursor: pointer;
}

.bdental-strip__prev::after,
.bdental-strip__next::after {
	content: "";
	position: absolute;
	inset: 50% auto auto 50%;
	width: max(100%, 44px);
	height: max(100%, 44px);
	transform: translate(-50%, -50%);
}

.bdental-strip__prev svg,
.bdental-strip__next svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: currentColor;
}

.bdental-strip__next svg {
	transform: scaleX(-1);
}

.bdental-strip__prev[hidden],
.bdental-strip__next[hidden] {
	display: none;
}

/* Over a photo the focus ring carries a pale ring outside it, so it reads on a dark photo too. */
.bdental-strip .bdental-strip__prev:focus-visible,
.bdental-strip .bdental-strip__next:focus-visible {
	outline: 2px solid var(--wp--preset--color--focus-ring);
	outline-offset: 0;
	box-shadow: 0 0 0 4px var(--wp--preset--color--page-background);
}

/* ---------------------------------------------------------------- Player (VT-02 ticket 03) */

.bdental-player {
	position: relative;
	background-color: var(--wp--preset--color--body);
}

.bdental-player video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background-color: var(--wp--preset--color--body);
}

/* One centred play button, the size the section sets (--bdental-player-icon). */
.bdental-player__play {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--dark-body);
	cursor: pointer;
}

.bdental-player__play[hidden] {
	display: none;
}

.bdental-player__play svg {
	display: block;
	width: var(--bdental-player-icon, 50px);
	height: var(--bdental-player-icon, 50px);
}

.bdental-player__play:hover svg {
	opacity: 0.8;
}

/* ---------------------------------------------------------------- Before-and-after (VT-02 ticket 06) */

/* Two photos of one size, the "before" drawn over the "after" as far as the handle, at `--pos` (a percentage the
   content sets). A range input over the whole box moves it, and components.js keeps --pos in step with it. A pointer,
   a finger or the arrow keys all move it, and a screen reader hears a slider. Where the device can hover, a veil
   darkens the photos on hover and names each side, from the content's own words (`data-before`, `data-after`), as the
   moved site's slider does. It also shows while the slider has keyboard focus, and hides while the handle is dragged
   and after Escape (`is-quiet`, WCAG 1.4.13). Every size is in --bdental-before-after-u (1px by default), so a layout
   that scales its pictures scales the handle too. */
.bdental-before-after {
	position: relative;
	overflow: hidden;
}

.bdental-before-after__image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bdental-before-after__image--before {
	clip-path: inset(0 calc(100% - var(--pos, 50) * 1%) 0 0);
}

/* A handle's width wider than the box on each side, so the thumb's centre runs from the box's left edge to its right
   edge, under the drawn handle. Invisible: the handle below is what shows. A vertical swipe on the photos still
   scrolls the page. */
.bdental-before-after__range {
	position: absolute;
	top: 0;
	left: calc(-22 * var(--bdental-before-after-u, 1px));
	z-index: 3;
	width: calc(100% + 44 * var(--bdental-before-after-u, 1px));
	height: 100%;
	margin: 0;
	padding: 0;
	background: none;
	opacity: 0;
	cursor: ew-resize;
	appearance: none;
	touch-action: pan-y;
}

.bdental-before-after__range::-webkit-slider-runnable-track {
	height: 100%;
	background: none;
}

.bdental-before-after__range::-webkit-slider-thumb {
	width: calc(44 * var(--bdental-before-after-u, 1px));
	height: 100%;
	appearance: none;
}

.bdental-before-after__range::-moz-range-thumb {
	width: calc(44 * var(--bdental-before-after-u, 1px));
	height: 100%;
	border: 0;
}

.bdental-before-after__veil {
	position: absolute;
	inset: 0;
	z-index: 1;
	transition: background-color 0.5s;
}

/* The names: white on a dark chip. The moved site's chip is white at 20%, 2.85:1 at worst (a white photo under its
   veil); here black at 20%, 5.74:1 at worst (WCAG 1.4.3; R3, the smallest change that passes). */
.bdental-before-after__veil::before,
.bdental-before-after__veil::after {
	position: absolute;
	top: 50%;
	max-width: 40%;
	padding: calc(15 * var(--bdental-before-after-u, 1px)) calc(20 * var(--bdental-before-after-u, 1px));
	border-radius: calc(2 * var(--bdental-before-after-u, 1px));
	background-color: color-mix(in srgb, var(--wp--preset--color--body) 20%, transparent);
	font-size: calc(15 * var(--bdental-before-after-u, 1px));
	line-height: 1.2;
	color: var(--wp--preset--color--page-background);
	opacity: 0;
	transform: translateY(-50%);
	transition: opacity 0.5s;
}

.bdental-before-after__veil::before {
	content: attr(data-before) / "";
	left: calc(10 * var(--bdental-before-after-u, 1px));
}

.bdental-before-after__veil::after {
	content: attr(data-after) / "";
	right: calc(10 * var(--bdental-before-after-u, 1px));
}

.bdental-before-after .bdental-before-after__range:focus-visible ~ .bdental-before-after__veil {
	background-color: color-mix(in srgb, var(--wp--preset--color--body) 50%, transparent);
}

.bdental-before-after .bdental-before-after__range:focus-visible ~ .bdental-before-after__veil::before,
.bdental-before-after .bdental-before-after__range:focus-visible ~ .bdental-before-after__veil::after {
	opacity: 1;
}

@media (hover: hover) {
	.bdental-before-after:hover .bdental-before-after__veil {
		background-color: color-mix(in srgb, var(--wp--preset--color--body) 50%, transparent);
	}

	.bdental-before-after:hover .bdental-before-after__veil::before,
	.bdental-before-after:hover .bdental-before-after__veil::after {
		opacity: 1;
	}
}

/* While the handle is dragged, and after Escape, the veil and the names step aside. */
.bdental-before-after.is-dragging .bdental-before-after__veil,
.bdental-before-after.is-quiet .bdental-before-after__veil {
	background-color: transparent;
}

.bdental-before-after.is-dragging .bdental-before-after__veil::before,
.bdental-before-after.is-dragging .bdental-before-after__veil::after,
.bdental-before-after.is-quiet .bdental-before-after__veil::before,
.bdental-before-after.is-quiet .bdental-before-after__veil::after {
	opacity: 0;
}

/* The handle: a line the box's full height at --pos, broken by a ring with an arrow either side. */
.bdental-before-after__handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(var(--pos, 50) * 1%);
	z-index: 2;
	width: calc(3 * var(--bdental-before-after-u, 1px));
	margin-left: calc(-1.5 * var(--bdental-before-after-u, 1px));
	pointer-events: none;
}

.bdental-before-after__handle::before,
.bdental-before-after__handle::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	background-color: var(--wp--preset--color--page-background);
}

.bdental-before-after__handle::before {
	top: 0;
	bottom: calc(50% + 22 * var(--bdental-before-after-u, 1px));
	box-shadow: 0 calc(3 * var(--bdental-before-after-u, 1px)) 0 var(--wp--preset--color--page-background), 0 0 calc(12 * var(--bdental-before-after-u, 1px)) color-mix(in srgb, var(--wp--preset--color--body) 40%, transparent);
}

.bdental-before-after__handle::after {
	top: calc(50% + 22 * var(--bdental-before-after-u, 1px));
	bottom: 0;
	box-shadow: 0 calc(-3 * var(--bdental-before-after-u, 1px)) 0 var(--wp--preset--color--page-background), 0 0 calc(12 * var(--bdental-before-after-u, 1px)) color-mix(in srgb, var(--wp--preset--color--body) 40%, transparent);
}

.bdental-before-after__ring {
	position: absolute;
	top: 50%;
	left: 50%;
	width: calc(38 * var(--bdental-before-after-u, 1px));
	height: calc(38 * var(--bdental-before-after-u, 1px));
	margin: calc(-22 * var(--bdental-before-after-u, 1px)) 0 0 calc(-22 * var(--bdental-before-after-u, 1px));
	border: calc(3 * var(--bdental-before-after-u, 1px)) solid var(--wp--preset--color--page-background);
	border-radius: 50%;
	box-shadow: 0 0 calc(12 * var(--bdental-before-after-u, 1px)) color-mix(in srgb, var(--wp--preset--color--body) 40%, transparent);
}

.bdental-before-after__arrow {
	position: absolute;
	top: 50%;
	width: 0;
	height: 0;
	margin-top: calc(-6 * var(--bdental-before-after-u, 1px));
	border: calc(6 * var(--bdental-before-after-u, 1px)) inset transparent;
}

.bdental-before-after__arrow--before {
	left: 50%;
	margin-left: calc(-17 * var(--bdental-before-after-u, 1px));
	border-right: calc(6 * var(--bdental-before-after-u, 1px)) solid var(--wp--preset--color--page-background);
}

.bdental-before-after__arrow--after {
	right: 50%;
	margin-right: calc(-17 * var(--bdental-before-after-u, 1px));
	border-left: calc(6 * var(--bdental-before-after-u, 1px)) solid var(--wp--preset--color--page-background);
}

/* Over a photo the focus ring sits on the white ring with a pale ring outside it, so it reads on any photo (as the
   photo strip's buttons, ticket 03). */
.bdental-before-after .bdental-before-after__range:focus-visible ~ .bdental-before-after__handle .bdental-before-after__ring {
	outline: 2px solid var(--wp--preset--color--focus-ring);
	outline-offset: 0;
	box-shadow: 0 0 0 4px var(--wp--preset--color--page-background);
}

@media (prefers-reduced-motion: reduce) {
	.bdental-before-after__veil,
	.bdental-before-after__veil::before,
	.bdental-before-after__veil::after {
		transition: none;
	}
}


/* ---------------------------------------------------------------- Forms (VT-02 ticket 07, N17)

   A form the install lists as its own (bdental_clinic_form_ids), drawn as the moved site's form widget drew it:
   `--panel` on the form surface with labels above the fields, `--card` white with the labels as placeholders. Opt-in:
   only a wrapper carrying `bdental-classic-form` is touched, and Fluent Forms' own rules are overridden inside it
   alone. Fluent hides a hidden label with display: none, which takes it out of the accessibility tree; here it is
   clipped instead, so every field keeps its name. Fluent's own focus style removes the outline; here every control
   keeps the focus ring. The box's place and height are the page's (sections.css) or the footer's (classic.css). */

.bdental-classic-form {
	--fu: var(--bdental-classic-u, 1px);
	--bdental-classic-form-side: calc(14 * var(--fu));
	--bdental-classic-form-foot: calc(45 * var(--fu));
	box-sizing: border-box;
	position: relative;
	padding: calc(21 * var(--fu)) var(--bdental-classic-form-side) calc(var(--bdental-classic-form-foot) + 67 * var(--fu));
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: calc(4 * var(--fu));
	font-family: var(--bdental-classic-text);
	font-weight: var(--bdental-classic-text-weight);
	color: var(--wp--preset--color--body);
	background-color: var(--wp--preset--color--page-background);
}

.bdental-classic-form--panel {
	background-color: var(--wp--preset--color--form-surface, var(--wp--preset--color--section-surface));
}

.bdental-classic-form .fluentform :where(p, h2) {
	margin: 0;
}

.bdental-classic-form .fluentform .ff-el-group {
	margin-bottom: calc(22 * var(--fu));
}

.bdental-classic-form .fluentform .bdental-classic-form__title {
	margin-bottom: calc(16 * var(--fu));
	font-family: var(--bdental-classic-text);
	font-size: calc(28 * var(--fu));
	font-weight: var(--bdental-classic-text-weight);
	line-height: calc(40 * var(--fu));
	letter-spacing: normal;
	text-align: center;
	text-transform: none;
	color: var(--wp--preset--color--body);
}

/* Labels: the widget's bold label, its required mark first. */
.bdental-classic-form .fluentform .ff-el-input--label {
	margin-bottom: calc(7 * var(--fu));
	padding: 0;
}

.bdental-classic-form .fluentform .ff-el-input--label label,
.bdental-classic-form .fluentform .bdental-classic-form__group-label {
	display: inline-block;
	margin: 0;
	font-family: inherit;
	font-size: calc(16 * var(--fu));
	font-weight: 600;
	line-height: calc(22.86 * var(--fu));
	color: inherit;
}

.bdental-classic-form .fluentform .ff-el-input--label.ff-el-is-required.asterisk-left label::before,
.bdental-classic-form .fluentform .bdental-classic-form__star {
	margin-right: calc(1 * var(--fu));
	content: "*";
	content: "*" / "";
	color: var(--wp--preset--color--form-required, var(--wp--preset--color--error));
}

.bdental-classic-form .fluentform .bdental-classic-form__star-after .ff-el-input--label.ff-el-is-required.asterisk-left label::before {
	content: none;
}

.bdental-classic-form .fluentform .bdental-classic-form__star-after .ff-el-input--label.ff-el-is-required label::after {
	content: "*";
	content: "*" / "";
	color: var(--wp--preset--color--form-required, var(--wp--preset--color--error));
}

.bdental-classic-form .fluentform .ff-el-group.bdental-classic-form__group {
	margin-bottom: calc(14 * var(--fu));
}

.bdental-classic-form .fluentform .ff-el-group.bdental-classic-form__group--ruled {
	margin-bottom: calc(29 * var(--fu));
}

/* A label the widget showed only as a placeholder stays the field's name, out of sight. */
.bdental-classic-form .fluentform div.ff-el-form-hide_label > .ff-el-input--label {
	display: block;
	visibility: visible;
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Fields. */
.bdental-classic-form .fluentform .ff-el-form-control {
	box-sizing: border-box;
	height: calc(32 * var(--fu));
	padding: calc(6 * var(--fu)) calc(12 * var(--fu));
	border: 1px solid var(--wp--preset--color--form-border, var(--wp--preset--color--border-control));
	border-radius: calc(4 * var(--fu));
	font-family: inherit;
	font-size: calc(16 * var(--fu));
	font-weight: var(--bdental-classic-text-weight);
	line-height: calc(18 * var(--fu));
	color: var(--wp--preset--color--body);
	background-color: var(--wp--preset--color--page-background);
}

.bdental-classic-form .fluentform select.ff-el-form-control:not([size]):not([multiple]) {
	height: calc(32 * var(--fu));
	padding: calc(5 * var(--fu)) calc(10 * var(--fu));
	appearance: none;
}

.bdental-classic-form .fluentform textarea.ff-el-form-control {
	height: calc(50 * var(--fu));
	min-height: calc(50 * var(--fu));
	resize: vertical;
}

.bdental-classic-form .fluentform .bdental-classic-form__counted textarea.ff-el-form-control {
	height: calc(62 * var(--fu));
}

.bdental-classic-form .fluentform .bdental-classic-form__tall textarea.ff-el-form-control {
	height: calc(135 * var(--fu));
}

.bdental-classic-form .fluentform .ff-el-form-control::placeholder {
	color: var(--wp--preset--color--form-placeholder, var(--wp--preset--color--body-secondary));
	opacity: 1;
}

.bdental-classic-form .fluentform .ff-el-form-control:focus,
.bdental-classic-form .fluentform .ff-el-form-check-input:focus-visible,
.bdental-classic-form .fluentform .ff-btn-submit:focus-visible {
	outline: 2px solid var(--wp--preset--color--focus-ring);
	outline-offset: 2px;
}

/* Two fields side by side: the widget's half widths, 30px apart; one above the other on a phone. */
.bdental-classic-form .frm-fluent-form .ff-t-container.bdental-classic-form__pair {
	gap: calc(30 * var(--fu));
}

.bdental-classic-form .frm-fluent-form .ff-t-container.bdental-classic-form__pair > .ff-t-cell {
	/* Fluent prints each cell's flex-basis inline (50%); shrinking takes the gap out of both evenly. */
	flex-grow: 0;
	flex-shrink: 1;
	min-width: 0;
	padding: 0;
}

.bdental-classic-form .fluentform .bdental-classic-form__pair--gap .ff-t-cell:last-child .ff-el-group,
.bdental-classic-form .fluentform .ff-el-group.bdental-classic-form__spaced-after {
	margin-bottom: calc(37 * var(--fu));
}

/* Ticks: one a row, 36px apart, as the widget's. */
.bdental-classic-form .fluentform .ff-el-form-check {
	margin: 0;
}

.bdental-classic-form .fluentform .ff-el-form-check label.ff-el-form-check-label {
	display: flex;
	align-items: center;
	gap: calc(8 * var(--fu));
	min-height: calc(32 * var(--fu));
	margin: 0 0 calc(4 * var(--fu));
	font-size: calc(16 * var(--fu));
	font-weight: var(--bdental-classic-text-weight);
	line-height: calc(22.86 * var(--fu));
	color: inherit;
}

.bdental-classic-form .fluentform .ff-el-form-check-label .ff-el-form-check-input {
	top: 0;
	width: calc(13 * var(--fu));
	height: calc(13 * var(--fu));
	margin: 0;
}

.bdental-classic-form .fluentform .bdental-classic-form__permissions .ff-el-input--label {
	display: block;
	margin-bottom: calc(10 * var(--fu));
}

.bdental-classic-form .fluentform .bdental-classic-form__permissions .ff-el-input--label label {
	display: block;
	font-weight: var(--bdental-classic-text-weight);
	line-height: calc(19 * var(--fu));
}

.bdental-classic-form .fluentform .bdental-classic-form__permissions .ff-el-input--label strong {
	font-weight: 600;
}

.bdental-classic-form .fluentform .bdental-classic-form__permissions {
	margin-bottom: calc(11 * var(--fu));
}

/* Lines of words inside the form. */
.bdental-classic-form .fluentform .bdental-classic-form__note {
	margin-bottom: calc(10 * var(--fu));
	font-size: calc(16 * var(--fu));
	line-height: calc(19 * var(--fu));
}

.bdental-classic-form .fluentform .bdental-classic-form__note p {
	font-size: inherit;
	line-height: inherit;
}

.bdental-classic-form .fluentform .bdental-classic-form__note--loose {
	margin-bottom: calc(22 * var(--fu));
	line-height: calc(26 * var(--fu));
}

.bdental-classic-form .fluentform .ff-el-group.bdental-classic-form__tight {
	margin-bottom: calc(15 * var(--fu));
}

.bdental-classic-form .fluentform .ff-el-group.bdental-classic-form__ticks {
	margin-bottom: calc(32 * var(--fu));
}

.bdental-classic-form .fluentform .bdental-classic-form__rule {
	height: 0;
	margin: 0 0 calc(30 * var(--fu));
	border: 0;
	border-top: 1px solid var(--wp--preset--color--hairline);
}

.bdental-classic-form .fluentform .bdental-classic-form__count {
	margin: calc(1 * var(--fu)) 0 0;
	font-size: calc(12 * var(--fu));
	font-weight: 600;
	line-height: calc(14 * var(--fu));
}

.bdental-classic-form .fluentform .ff-el-group.bdental-classic-form__counted {
	margin-bottom: calc(24 * var(--fu));
}

/* The button: right-aligned at the foot of the box, as the widget's. A fieldset's inner box does not stretch, so the
   button is placed from the box's foot rather than pushed there; the box's bottom padding keeps its room. */
.bdental-classic-form .fluentform .ff-el-group.ff_submit_btn_wrapper {
	position: absolute;
	right: var(--bdental-classic-form-side);
	bottom: var(--bdental-classic-form-foot);
	margin: 0;
	text-align: right;
}

.bdental-classic-form .fluentform .ff-btn-submit {
	min-height: calc(45 * var(--fu));
	padding: calc(10 * var(--fu)) calc(15 * var(--fu));
	border: 1px solid var(--wp--preset--color--page-background);
	border-radius: calc(4 * var(--fu));
	font-family: inherit;
	font-size: calc(16 * var(--fu));
	font-weight: 600;
	line-height: calc(22.86 * var(--fu));
	color: var(--wp--preset--color--page-background);
	background-color: var(--wp--preset--color--form-button, var(--wp--preset--color--button-primary-bg));
	opacity: 1;
}

.bdental-classic-form .fluentform .ff-btn-submit:hover {
	text-decoration: underline;
	opacity: 1;
}

.bdental-classic-form .fluentform .ff-el-turnstile {
	margin-bottom: calc(22 * var(--fu));
}

/* The card: the widget's small grey type, the placeholders as labels. */
.bdental-classic-form--card .fluentform {
	color: var(--wp--preset--color--heading-light, var(--wp--preset--color--body-secondary));
}

.bdental-classic-form--card .fluentform .ff-el-group {
	margin-bottom: calc(15 * var(--fu));
}

/* Padding, not margin: a margin here would fold into the group's above. */
.bdental-classic-form--card .fluentform .ff-el-group.bdental-classic-form__spaced {
	padding-top: calc(15 * var(--fu));
}

.bdental-classic-form--card .fluentform .ff-el-form-control,
.bdental-classic-form--card .fluentform .ff-el-form-check label.ff-el-form-check-label,
.bdental-classic-form--card .fluentform .bdental-classic-form__note,
.bdental-classic-form--card .fluentform .bdental-classic-form__permissions .ff-el-input--label label {
	font-size: calc(12 * var(--fu));
	color: var(--wp--preset--color--heading-light, var(--wp--preset--color--body-secondary));
}

.bdental-classic-form--card .fluentform .ff-el-group.bdental-classic-form__permissions {
	margin-bottom: calc(11 * var(--fu));
	padding-top: calc(7 * var(--fu));
}

.bdental-classic-form--card .fluentform .bdental-classic-form__permissions .ff-el-input--label label,
.bdental-classic-form--card .fluentform .bdental-classic-form__note {
	line-height: calc(14 * var(--fu));
}

.bdental-classic-form--card .fluentform .ff-el-form-check label.ff-el-form-check-label {
	line-height: calc(17.14 * var(--fu));
}

/* The widget's intro paragraphs inside one label: a block each, 10 apart. */
.bdental-classic-form .fluentform .bdental-classic-form__para {
	display: block;
}

.bdental-classic-form .fluentform .bdental-classic-form__para + .bdental-classic-form__para {
	margin-top: calc(10 * var(--fu));
}

.bdental-classic-form--card .fluentform .ff-btn-submit {
	min-height: calc(39 * var(--fu));
	font-size: calc(12 * var(--fu));
	line-height: calc(17.14 * var(--fu));
}

/* The button reaches a 44px hit area without moving anything (P-004 FR-079), as the classic buttons do. */
.bdental-classic-form .fluentform .ff-btn-submit {
	position: relative;
}

.bdental-classic-form .fluentform .ff-btn-submit::after {
	content: "";
	position: absolute;
	inset: 50% 0 auto;
	height: max(100%, 44px);
	transform: translateY(-50%);
}

/* A field the visitor got wrong: Fluent's own red fails AA on white and on the panel, so its message, its edge and a
   tick's words take the brand's error role (6.59:1 on white, 5.52:1 on the form surface for this brand). */
.bdental-classic-form .fluentform .text-danger,
.bdental-classic-form .fluentform .error,
.bdental-classic-form .fluentform .ff-el-is-error .ff-el-form-check-label,
.bdental-classic-form .fluentform .ff-el-is-error .ff-el-form-check-label a {
	color: var(--wp--preset--color--error);
}

.bdental-classic-form .fluentform .ff-el-is-error .ff-el-form-control {
	border-color: var(--wp--preset--color--error);
}

.bdental-classic-form .fluentform .text-danger,
.bdental-classic-form .fluentform .error {
	margin-top: calc(4 * var(--fu));
	font-size: calc(14 * var(--fu));
	line-height: 1.4;
}

/* A title the widget shrank to fit its phone width (its fit-text), at the size it showed. */
.bdental-classic-form .fluentform .bdental-classic-form__title.bdental-classic-form__title--fit {
	font-size: calc(26 * var(--fu));
	line-height: calc(37.14 * var(--fu));
}

/* From 1240px the widget is drawn in pixels; below, in the moved site's phone units, as the page around it. */
@media (min-width: 1240px) {
	.bdental-classic-form {
		--fu: 1px;
		--bdental-classic-form-side: 45.7px;
		--bdental-classic-form-foot: 76.9px;
		padding-top: 52.7px;
	}

	.bdental-classic-form .fluentform .bdental-classic-form__title.bdental-classic-form__title--fit {
		font-size: 28px;
		line-height: 40px;
	}
}
