/**
 * BuyTides — "See A Prescriber" modal (page side).
 *
 * The assessment opens full-screen: the frame fills the window and the card
 * inside fills the frame. The scrim only shows during the fade-in, so its
 * colour and blur still match the restock reminder's .bt-modal__scrim.
 *
 * No viewport units here on purpose: past 2100px the page is zoomed
 * (responsive.css), and zoom multiplies vh/vw. inset:0 on a fixed box follows
 * the viewport at any zoom, and the script measures that box.
 */

.bt-rxm {
	position: fixed;
	inset: 0;
	z-index: 100000;
	overflow: hidden;
}

.bt-rxm[hidden] {
	display: none;
}

.bt-rxm__scrim {
	position: absolute;
	inset: 0;
	background: rgba(43, 55, 84, 0.62);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.bt-rxm.is-open .bt-rxm__scrim {
	opacity: 1;
}

.bt-rxm__loader {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 44px;
	height: 44px;
	margin: -22px 0 0 -22px;
	border: 3px solid rgba(255, 255, 255, 0.35);
	border-top-color: #61ddeb;
	border-radius: 50%;
	animation: bt-rxm-spin 0.8s linear infinite;
}

.bt-rxm.is-loaded .bt-rxm__loader {
	display: none;
}

/* Full-screen: the frame is the window. */
.bt-rxm__box {
	position: absolute;
	inset: 0;
}

.bt-rxm__frame {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: transparent;
	color-scheme: light;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.bt-rxm.is-open.is-loaded .bt-rxm__frame {
	opacity: 1;
	transform: none;
}

/* The theme sets colour, padding and shape on every <button>; this has to win
   from outside that, hence the html prefix and the !important on colour. */
html .bt-rxm button.bt-rxm__close {
	position: absolute;
	top: 18px;
	right: 18px;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #eef2f4;
	color: #2b3754 !important;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

html .bt-rxm button.bt-rxm__close:hover {
	background: #eaf7fb;
}

html .bt-rxm button.bt-rxm__close:focus-visible {
	outline: 3px solid #61ddeb;
	outline-offset: 2px;
}

/* The page behind stays put while the modal is open. */
html.bt-rxm-open {
	overflow: hidden;
}

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

@media (prefers-reduced-motion: reduce) {
	.bt-rxm__scrim,
	.bt-rxm__frame {
		transition: none;
	}

	.bt-rxm__loader {
		animation-duration: 2.4s;
	}
}
