@import url("https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&family=Exo:ital,wght@0,100..900;1,100..900&family=Figtree:ital,wght@0,300..900;1,300..900&family=IBM+Plex+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Manrope:wght@200..800&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Noto+Sans+Bengali:wght@100..900&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Sora:wght@100..800&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap");

* {
	margin: 0;
	padding: 0;
	text-decoration: none;
	list-style: none;
	box-sizing: border-box;
}

body {
	background-color: #f0f3f7 !important;

	a.wp-has-current-submenu:after {
		border-right-color: #f0f3f7 !important;
	}

	&.better-body-dark {
		background-color: #141d28 !important;

		a.wp-has-current-submenu:after {
			border-right-color: #141d28 !important;
		}
	}
}

.better-payment {
	background-color: #f0f3f7 !important;
	width: 100%;

	&.better-payment-dark {
		background-color: #141d28 !important;
	}

	p {
		line-height: 1.5;
	}

	img {
		width: 100%;
		height: auto;
	}

	h1,
	h2,
	h3,
	h4,
	h5,
	h6,
	a,
	span,
	li,
	button,
	p {
		margin: 0;
		padding: 0;
	}

	label,
	span {
		display: inline-block;
	}

	a {
		display: block;
		cursor: pointer;
		z-index: 998;
		word-break: break-word;
		position: relative;

		&:focus {
			box-shadow: none;
			outline: none;
		}
	}

	button {
		border: none;
		background-color: transparent;
		cursor: pointer;
	}

	a,
	button {
		transition: all 0.3s;
	}

	.setting-tab-content,
	.bp-mode_tabs-content,
	.tab-content {
		display: none;
	}

	.position-relative {
		position: relative;
	}

	.bp-tab_active {
		display: block;
	}

	/*
     * Tab content eases in instead of snapping.
     *
     * This covers all three kinds of tab in one rule, because all three are
     * switched the same way (`display: none` → `.bp-tab_active`): the page tabs
     * (`.tab-content` — Dashboard / Transactions / Analytics / Campaigns /
     * Settings / License), the Settings sidebar panels (`.setting-tab-content`),
     * and the gateways' Live/Test panels (`.bp-mode_tabs-content`).
     *
     * SCOPED TO THE CONTENT CONTAINERS ON PURPOSE — do not move this onto bare
     * `.bp-tab_active`. That class is also on the Settings sidebar nav items and
     * the header nav; adding an `animation` there would re-run it on every click
     * and make the item you just pressed flash at you.
     *
     * OPACITY ONLY — deliberately no `transform`. `.bp-data_setting-wrapper` (the
     * campaigns row menu) is `position: fixed` and renders INSIDE `.tab-content`
     * (Campaigns.js imports `createPortal` but never calls it), and the
     * `.bp-popup-overlay` modals are fixed too. Any transform here — even one
     * ending at `none` — makes this element the containing block for those while
     * it runs, which moves a fixed overlay off its viewport anchor. A fade needs
     * no compositing tricks to look smooth, and it can't break layout.
     *
     * The page tabs mount a fresh element per navigation, so the animation runs on
     * insert. The Settings/mode panels are all mounted at once and only toggle the
     * class, so it runs when `.bp-tab_active` lands — same effect, no extra state.
     * A re-render of an already-visible tab does NOT re-run it, which is what we
     * want: data resolving inside a tab must not re-fade the whole page.
     *
     * A Live/Test panel nests inside a Settings panel, so opening a gateway tab
     * runs both at once and their opacities multiply — a slightly steeper curve
     * over the same 260ms. That is accepted: the alternative is no fade when you
     * switch Live↔Test, which is the more visible half of the trade.
     *
     * `.bp-transaction_details-page` is not a tab, but it is tab-LIKE: opening a
     * transaction early-returns it in place of the whole Transactions tab, so
     * list → details → back is the same kind of navigation. Without it, that one
     * route would be the only place in the admin that still snaps.
     */
	/*
     * `backwards` for the same reason as the content fade below — see the long
     * note there. `both` left a forwards fill in place permanently, making every
     * active tab a stacking context and trapping the `position: fixed` things
     * inside it (the row action menus, the `.bp-popup-overlay` modals) so they
     * could never rise above anything painted after the tab. Same fade, no
     * lingering stacking context.
     */
	.tab-content.bp-tab_active,
	.setting-tab-content.bp-tab_active,
	.bp-mode_tabs-content.bp-tab_active,
	.bp-transaction_details-page {
		animation: bp-tab-fade-in 260ms ease-out backwards;
	}

	@keyframes bp-tab-fade-in {
		from {
			opacity: 0;
		}

		to {
			opacity: 1;
		}
	}

	/*
     * Content easing in as it replaces a skeleton.
     *
     * The tab rule above only fires on navigation — the tab element itself
     * survives a data load, so nothing there covers the skeleton → content swap,
     * which is the moment the user actually watches. These are the elements that
     * take a placeholder's place; they are inserted at the instant the data
     * lands, so a mount animation is exactly the hook we need and no JS state has
     * to be threaded through to drive it.
     *
     * Short (180ms) and opacity-only. The skeleton already reserved the space, so
     * there is no motion to smooth over — the only job is to stop the swap
     * reading as a flicker. Anything longer starts to feel like the data is still
     * loading after it has arrived.
     *
     * Table rows are included, so a refilter fades its new rows in rather than
     * hard-cutting them. They re-run per insert, which is correct: those really
     * are new elements each time.
     */
	/*
     * `backwards`, NOT `both` — this one word decides whether the row action
     * menus work.
     *
     * `both` keeps the forwards fill applied forever after the 180ms ends, and an
     * element with a forwards-filled animation on `opacity` is a **permanent
     * stacking context**. Every table row therefore became its own stacking
     * context, which traps anything positioned inside it: the three-dot menu is
     * `position: fixed; z-index: 9999`, but 9999 only ranked it *within its own
     * row*, so every later row — and the pagination below the list — painted
     * straight over it. It looked like the menu was sliding under the rows.
     * Both the Campaigns and Transactions lists use this class, so both broke.
     *
     * `backwards` still applies the `from` keyframe before the animation starts,
     * so the fade-in is visually identical and rows never flash in at full
     * opacity. It just stops filling once the animation is over, and the row
     * drops back to being a plain, non-stacking element. Nothing is lost because
     * `to { opacity: 1 }` is already the row's natural opacity — the forwards
     * fill was holding a value the element had anyway.
     *
     * Do not "tidy" this back to `both`.
     *
     * Pro's dashboard Analytics amounts and charts (`.bp-transaction_value`,
     * `.bp-analytics_graph-box canvas`) use the same keyframes; their selectors
     * ship with Better Payment Pro (src/admin/styles/pro-features.scss).
     */
	.bp-transaction_ret h2,
	.bp-information_value,
	.bp-transactions_list-table_data {
		animation: bp-content-fade-in 180ms ease-out backwards;
	}

	@keyframes bp-content-fade-in {
		from {
			opacity: 0;
		}

		to {
			opacity: 1;
		}
	}

	@media (prefers-reduced-motion: reduce) {
		.bp-transaction_ret h2,
		.bp-information_value,
		.bp-transactions_list-table_data {
			animation: none;
		}
	}

	// Honour the OS setting — an entrance animation is decoration, and this one
	// has no informational value to lose.
	@media (prefers-reduced-motion: reduce) {
		.tab-content.bp-tab_active,
		.setting-tab-content.bp-tab_active,
		.bp-mode_tabs-content.bp-tab_active,
		.bp-transaction_details-page {
			animation: none;
		}
	}

	.bp-overflow_hidden {
		overflow: hidden;
	}

	.line-height_0 {
		line-height: 0;
	}

	.display-block {
		display: block;
	}

	.gap-8 {
		gap: 8px;
	}

	.border-none {
		border: none !important;
	}

	.margin-0 {
		margin: 0 !important;
	}

	.margin-left_4 {
		margin-left: 4px;
	}

	.margin-left-24 {
		margin-left: 24px;
	}

	.margin-bottom_8 {
		margin-bottom: 8px;
	}

	.margin-bottom_12 {
		margin-bottom: 12px;
	}

	.margin-bottom_20 {
		margin-bottom: 20px;
	}

	.margin-bottom_40 {
		margin-bottom: 40px;
	}

	.margin-bottom_24 {
		margin-bottom: 24px;
	}

	.padding-20 {
		padding: 20px;
	}

	.padding-24 {
		padding: 24px;
	}

	.padding-32 {
		padding: 32px;
	}

	.border-radius_12 {
		border-radius: 12px;
	}

	.bp-full-width {
		width: 100%;
	}

	.bp-flex {
		display: flex;
	}

	.gap-8 {
		gap: 8px;
	}

	.gap-12 {
		gap: 12px;
	}

	.align-items_center {
		align-items: center;
	}

	.justify-content-center {
		justify-content: center;
	}

	.justify-content-space_between {
		justify-content: space-between;
	}

	.justify-content_flex-end {
		justify-content: flex-end;
	}

	.bp-font_inter {
		font-family: "Inter", serif;
	}

	.bp-font_ibm {
		font-family: "IBM Plex Sans", serif;
	}

	.bp-font-figtree {
		font-family: "Figtree", sans-serif;
	}

	.bp-font-rubik {
		font-family: "Rubik", sans-serif;
	}

	.bp-font-dm {
		font-family: "DM Sans", sans-serif;
	}

	.font-weight-500 {
		font-weight: 500;
	}

	.cursor-pointer {
		cursor: pointer;
	}

	.bp-position_relative {
		position: relative;
	}

	.fx-1 {
		font-size: 24px;
		font-weight: 600;

		@media (max-width: 992px) {
			font-size: 20px;
		}

		@media (max-width: 600px) {
			font-size: 18px;
		}
	}

	.fx-2 {
		font-size: 20px;
		font-weight: 600;

		@media (max-width: 992px) {
			font-size: 18px;
		}

		@media (max-width: 600px) {
			font-size: 16px;
		}
	}

	.fx-3 {
		font-size: 18px;
		font-weight: 600;

		@media (max-width: 992px) {
			font-size: 16px;
		}

		@media (max-width: 600px) {
			font-size: 14px;
		}
	}

	.fx-7 {
		font-size: 16px;
		font-weight: 500;

		@media (max-width: 992px) {
			font-size: 14px;
		}

		@media (max-width: 600px) {
			font-size: 12px;
		}
	}

	.fx-4 {
		font-size: 14px;
		font-weight: 400;

		@media (max-width: 992px) {
			font-size: 12px;
		}
	}

	.fx-5 {
		font-size: 14px;
		font-weight: 300;

		@media (max-width: 992px) {
			font-size: 12px;
		}
	}

	.fx-6 {
		font-size: 12px;
		font-weight: 400;
		// @media (max-width: 992px) {
		//     font-size  : 12px;
		// }
	}

	.bp-btn {
		border: none;
		background-color: #6b59ee;
		border-radius: 8px;
		cursor: pointer;
		font-weight: 400;

		&:hover {
			background-color: #5234c8;
		}
	}

	.bp-card_btn,
	.bp-btn {
		&:focus,
		&:active {
			box-shadow: none;
			border: none;
			outline: none;
		}
	}

	.bp-btn_2 {
		border: 1px solid #b9bfca;
		color: #6a758c;
		border-radius: 4px;
		padding: 7px 12px;

		&:hover {
			background-color: #6b59ee;
			color: #f7f8fa;
		}
	}

	.bp-custome_col-9 {
		flex: 0 0 78%;
		max-width: 78%;
	}

	.bp-custome_col-3 {
		flex: 0 0 22%;
		max-width: 22%;
	}

	.bp-custome_col-10 {
		flex: 0 0 81%;
		max-width: 81%;
	}

	.bp-custome_col-2 {
		flex: 0 0 19%;
		max-width: 19%;
	}

	.bp-down-arrow-select-wrapper {
		position: relative;
		display: flex;
		align-items: center;
		cursor: pointer;

		.bp-down-arrow {
			appearance: none;
			-webkit-appearance: none;
			-moz-appearance: none;
			background-image: none;
			cursor: pointer;
			color: #222b3d !important;

			// The base color is `!important`, so the dark override must be too.
			@include mode("dark") {
				color: $bp-dark-secondary-text-color !important;
			}
		}

		&::after {
			content: "";
			position: absolute;
			right: 21px;
			height: 7px;
			width: 14px;
			background-image: url("data:image/svg+xml;utf8,<svg width='16' height='8' viewBox='0 0 16 8' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M15 1L8 7L1 1' stroke='%231C274C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
			background-repeat: no-repeat;
			background-size: cover;
			pointer-events: none;

			// Light-stroked chevron so it stays visible on the dark background.
			@include mode("dark") {
				background-image: url("data:image/svg+xml;utf8,<svg width='16' height='8' viewBox='0 0 16 8' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M15 1L8 7L1 1' stroke='%23B9BFCA' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
			}
		}
	}

	.bp-width_156 {
		width: 156px;
		padding: 17px 13px;
	}

	.bp-width_226 {
		width: 226px;
		padding: 17px 13px;
	}

	.bp-width_96 {
		width: 100px;
		padding: 17px 13px;
	}

	.bp-width_116 {
		width: 116px;
		padding: 17px 13px;
	}

	.bp-width_214 {
		width: 214px;
		padding: 17px 13px;
	}

	.bp-width_114 {
		width: 114px;
		padding: 17px 13px;
	}

	// Transactions → Campaign column. A long campaign title is clipped to one line; the
	// full title is the cell's `title`.
	.bp-width_180 {
		width: 180px;
		padding: 17px 13px;
	}

	.bp-payment-errors {
		margin-bottom: 16px;
		padding: 12px 16px;
		border: 1px solid #fcd34d;
		border-radius: 8px;
		background: #fffbeb;
		color: #92400e;
		font-size: 13px;

		summary {
			cursor: pointer;
			font-weight: 600;
		}

		ul {
			margin: 12px 0;
		}

		li {
			display: flex;
			flex-wrap: wrap;
			gap: 4px 12px;
			padding: 8px 0;
			border-top: 1px solid #fde68a;

			p {
				flex: 0 0 100%;
				margin: 0;
				word-break: break-word;
			}
		}

		button {
			padding: 4px 12px;
			border: 1px solid #d97706;
			border-radius: 6px;
			background: transparent;
			color: inherit;
			cursor: pointer;
		}

		// Dark mode: the light panel's cream fill glared against the dark
		// dashboard. Keep the amber as an accent (tint, edge, heading) on a
		// surface that matches the other dark cards, and body text in the
		// dashboard's own text colours.
		@include mode("dark") {
			border-color: rgba(245, 158, 11, 0.35);
			border-left: 3px solid #f59e0b;
			background: rgba(245, 158, 11, 0.06);
			color: $bp-dark-primary-text-color;

			summary {
				color: #fbbf24;
			}

			li {
				border-top-color: rgba(245, 158, 11, 0.18);

				strong {
					color: #fcd34d;
				}

				a {
					color: #a5b4fc;

					&:hover,
					&:focus {
						color: #c7d2fe;
					}
				}

				span {
					color: $bp-dark-secondary-text-color;
				}

				p {
					color: $bp-dark-primary-text-color;
				}
			}

			button {
				border-color: rgba(251, 191, 36, 0.55);
				color: #fcd34d;

				&:hover,
				&:focus-visible {
					background: rgba(251, 191, 36, 0.12);
				}
			}
		}
	}

	.bp-transaction_campaign {
		min-width: 0;

		> a,
		> span {
			display: block;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
		}
	}

	.bp-width_200 {
		width: 200px;
		padding: 17px 13px;
	}

	@media (max-width: 992px) {
		.bp-row_active-992 {
			display: flex;
			flex-wrap: wrap;
			margin-left: -12px;
			margin-right: -12px;
		}

		.bp-col_50-active_992 {
			flex: 0 0 50% !important;
			max-width: 50% !important;
		}

		.bp-custome_col-10 {
			flex: 0 0 73%;
			max-width: 73%;
		}

		.bp-custome_col-2 {
			flex: 0 0 27%;
			max-width: 27%;
		}

		.bp-custome_col-9 {
			flex: 0 0 100%;
			max-width: 100%;
		}

		.bp-custome_col-3 {
			flex: 0 0 100%;
			max-width: 100%;
		}

		.bp-col_active-992 {
			padding-left: 12px;
			padding-right: 12px;
			flex: 1; // Default behavior
		}

		.bp-custome_col-6_active-992 {
			flex: 0 0 50%;
			max-width: 50%;
		}

		.bp-custome_col-100 {
			flex: 0 0 100%;
			max-width: 100%;
		}
	}

	@media (max-width: 600px) {
		.bp-custome_col-6_active-992 {
			flex: 0 0 100%;
			max-width: 100%;
		}

		.bp-custome_col-10 {
			flex: 0 0 65%;
			max-width: 65%;
		}

		.bp-custome_col-2 {
			flex: 0 0 35%;
			max-width: 35%;
		}
	}

	@media (max-width: 1180px) {
		.bp-visible-xs {
			display: block !important;
		}

		.bp-hidden-xs {
			display: none !important;
		}
	}

	@media (max-width: 992px) {
		.justify-content-space_between-active_992 {
			justify-content: space-between;
		}

		.justify-content-center-active_992 {
			justify-content: center;
		}
	}

	@media (max-width: 800px) {
		.bp-col_100-active_800 {
			flex: 0 0 50% !important;
			max-width: 50% !important;
		}
	}

	@media (max-width: 600px) {
		.bp-col_100-active_600 {
			flex: 0 0 100% !important;
			max-width: 100% !important;
		}
	}

	.bp-dismissible_video-popup_bg {
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.65);
		backdrop-filter: blur(4px);
		z-index: 9999;
		display: none;
		justify-content: center;
		align-items: center;
		padding: 20px;
	}

	/* Popup box */
	.bp-dismissible_video-popup {
		position: relative;
		width: 100%;
		max-width: 800px;
		aspect-ratio: 16 / 9;
		background: #000;
		border-radius: 12px;
		overflow: hidden;
		box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
		animation: popupScale 0.3s ease;
	}

	.bp-dismissible_video-popup iframe {
		width: 100%;
		height: 100%;
		border: none;
		display: block;
	}

	@keyframes popupScale {
		from {
			transform: scale(0.85);
			opacity: 0;
		}

		to {
			transform: scale(1);
			opacity: 1;
		}
	}

	.bp-dismissible_close-btn {
		position: absolute;
		top: 10px;
		right: 10px;
		background: rgba(255, 255, 255, 0.8);
		border: none;
		border-radius: 50%;
		width: 32px;
		height: 32px;
		cursor: pointer;
		font-size: 18px;
		font-weight: bold;
		color: #000;
		transition: background 0.2s;
	}

	.bp-dismissible_close-btn:hover {
		background: #fff;
	}

	// The Transactions / Subscriptions date filter's popup (components/DateRangeFilter.js), in
	// the look of Pro's Analytics date range (2.5.1): divided presets incl. All Time, brand-colour
	// selection, typed dates, Reset + Apply. Its `left` / `right` are set inline (popupPosition).
	.bp-date-range-dropdown {
		position: absolute;
		top: 100%;
		z-index: 1000;
		margin-top: 8px;
		overflow: hidden;
		background-color: #fff;
		border-radius: 8px;
		box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
		cursor: default;

		span {
			display: flex !important;
		}

		.rdrDateDisplayWrapper {
			background-color: transparent !important;
		}

		// A day of the next or previous month is not part of the picture: the
		// library hides its selection band, and the `span { display: flex }`
		// above brought it back as a band with unreadable numbers.
		.rdrDayPassive .rdrInRange,
		.rdrDayPassive .rdrStartEdge,
		.rdrDayPassive .rdrEndEdge,
		.rdrDayPassive .rdrSelected,
		.rdrDayPassive .rdrDayStartPreview,
		.rdrDayPassive .rdrDayInPreview,
		.rdrDayPassive .rdrDayEndPreview {
			display: none !important;
		}

		.rdrStaticRange {
			border-bottom: 1px solid #eff2f7 !important;

			span {
				padding: 10px 20px;
			}
		}

		// The two typed dates. The library's boxes were 37px over a 60px month
		// row: shorter here, so the calendar itself starts higher.
		.rdrDateDisplay {
			margin: 10px 10px 4px;
		}

		.rdrDateDisplayItem input {
			height: 30px;
			min-height: 0;
			padding: 0 8px;
			font-size: 13px;
			line-height: 30px;
		}

		// The navigator's title names the month, so the library's own month
		// label under it ("Nov 2026") said it twice.
		.rdrMonthName {
			display: none;
		}

		.rdrMonth {
			padding-bottom: 10px;
		}

		// The calendar's header (components/CalendarNavigator.js): previous,
		// a title that opens the month grid and then the year grid, next. It
		// stands in for the library's two native selects, whose year list ran
		// the height of the screen.
		.bp-cal-nav {
			display: flex;
			align-items: center;
			justify-content: space-between;
			gap: 8px;
			padding: 4px 10px;

			button {
				display: inline-flex;
				align-items: center;
				justify-content: center;
				height: 30px;
				margin: 0;
				// The popup's preset rule draws a line under every button.
				border: 0 !important;
				border-radius: 6px;
				background: transparent;
				color: #1d2939;
				font-family: inherit;
				cursor: pointer;
				transition:
					background 0.15s ease,
					color 0.15s ease;

				&:hover:not(:disabled) {
					background: #eff2f7;
				}

				&:focus-visible {
					outline: 2px solid #6b59ee;
					outline-offset: 1px;
				}

				&:disabled {
					opacity: 0.35;
					cursor: default;
				}
			}
		}

		.bp-cal-nav__arrow {
			width: 30px;
			padding: 0;
			color: #6a758c !important;
		}

		.bp-cal-nav__title {
			gap: 6px;
			padding: 0 10px;
			font-size: 14px;
			font-weight: 600;
			line-height: 1;

			svg {
				color: #8f9ab0;
				transition: transform 0.15s ease;
			}
		}

		.bp-cal-nav.is-open .bp-cal-nav__title {
			background: #f3f1ff;
			color: #6b59ee;

			svg {
				color: #6b59ee;
				transform: rotate(180deg);
			}
		}

		// The month grid and the year grid take the days' place, at the days'
		// size (five weeks), so the popup does not jump when one opens.
		.rdrCalendarWrapper:has(.bp-cal-grid) .rdrMonths {
			display: none;
		}

		.bp-cal-grid {
			display: grid;
			grid-template-columns: repeat(3, 1fr);
			grid-template-rows: repeat(4, 1fr);
			gap: 6px;
			box-sizing: border-box;
			width: 332px;
			height: 222px;
			padding: 6px 10px 10px;
		}

		.bp-cal-grid__cell {
			margin: 0;
			padding: 0;
			border: 1px solid transparent !important;
			border-radius: 8px;
			background: transparent;
			color: #1d2939;
			font-family: inherit;
			font-size: 13px;
			font-weight: 500;
			cursor: pointer;
			transition:
				background 0.15s ease,
				color 0.15s ease;

			&:hover:not(:disabled):not(.is-current) {
				background: #eff2f7;
			}

			&:focus-visible {
				outline: 2px solid #6b59ee;
				outline-offset: 1px;
			}

			&:disabled {
				opacity: 0.35;
				cursor: default;
			}

			// This month, or this year.
			&.is-today {
				border-color: #c9c2fa !important;
				color: #6b59ee;
			}

			// The month, or the year, the calendar is on.
			&.is-current {
				border-color: #6b59ee !important;
				background: #6b59ee;
				color: #fff;
			}
		}

		@media (prefers-reduced-motion: reduce) {
			.bp-cal-nav button,
			.bp-cal-nav__title svg,
			.bp-cal-grid__cell {
				transition: none;
			}
		}

		// A typed date the calendar cannot read. The library adds a small
		// warning sign to the box and never takes it away, so the popup keeps
		// its own flag (`has-unread-date`, utils/calendarTypedDates.js), raised
		// when the sign appears and lowered by the next change.
		// `!important`: the popup's own rule makes every span a flex box.
		.rdrDateInput .rdrWarning {
			display: none !important;
		}

		&.has-unread-date .rdrDateDisplayItem:has(.rdrWarning) {
			border-color: #d92d20;
			box-shadow: 0 0 0 1px #d92d20;
		}

		&.has-unread-date .rdrDateInput .rdrWarning {
			display: block !important;
			top: 50%;
			right: 8px;
			font-size: 14px;
			line-height: 1;
			color: #d92d20;
			transform: translateY(-50%);
		}

		// A day after today cannot be picked (`maxDate`): plain, not a grey slab.
		.rdrDayDisabled {
			background-color: transparent;
			cursor: default;

			.rdrDayNumber span {
				color: #c3c9d4;
			}
		}

		// A phone: the popup is 558px wide with the presets beside the calendar,
		// wider than the screen. The presets go above it, as one wrapping row.
		@media (max-width: 600px) {
			max-width: calc(100vw - 16px);
			overflow-x: auto;

			.rdrDateRangePickerWrapper {
				display: flex;
				flex-direction: column;
			}

			.rdrDefinedRangesWrapper {
				width: 100%;
				border-right: 0;
				border-bottom: 1px solid #eff2f7;
			}

			.rdrStaticRanges {
				flex-direction: row;
				flex-wrap: wrap;
				padding: 6px 6px 0;
			}

			.rdrStaticRange {
				border-bottom: 0 !important;
				border-radius: 6px;

				span {
					padding: 7px 10px;
				}
			}

			.rdrInputRanges {
				padding: 4px 0 8px;
			}

			.rdrCalendarWrapper {
				align-self: center;
			}
		}

		// The popup takes the focus when it opens, so that Tab starts inside
		// it: no ring around the whole card for that.
		&:focus {
			outline: none;
		}

		// One day is in the tab order and the arrow keys move from it
		// (CalendarNavigator): the focused day has to show, on a picked day
		// too. A ring in the brand colour vanished on the brand-coloured
		// band, so the ring is the text colour (white in dark mode).
		.rdrDay:focus-visible {
			outline: 2px solid #1d2939;
			outline-offset: -2px;
			border-radius: 6px;
		}

		// Today's mark. The library underlines the BROWSER's today
		// (`.rdrDayToday`), in its own blue; an administrator in another
		// timezone saw it on a day the site was not on. The mark is drawn
		// instead on the day CalendarNavigator names as the site's today
		// (`aria-current="date"`), in the brand colour, white on a picked day.
		.rdrDayToday .rdrDayNumber span {
			font-weight: inherit;
		}

		.rdrDayToday .rdrDayNumber span::after {
			content: none;
		}

		.rdrDay[aria-current="date"] .rdrDayNumber span {
			font-weight: 500;
		}

		.rdrDay[aria-current="date"] .rdrDayNumber span::after {
			content: "";
			position: absolute;
			bottom: 4px;
			left: 50%;
			width: 18px;
			height: 2px;
			border-radius: 2px;
			background: #6b59ee;
			transform: translate(-50%, 0);
		}

		.rdrDay[aria-current="date"]:not(.rdrDayPassive)
			.rdrInRange
			~ .rdrDayNumber
			span::after,
		.rdrDay[aria-current="date"]:not(.rdrDayPassive)
			.rdrStartEdge
			~ .rdrDayNumber
			span::after,
		.rdrDay[aria-current="date"]:not(.rdrDayPassive)
			.rdrEndEdge
			~ .rdrDayNumber
			span::after,
		.rdrDay[aria-current="date"]:not(.rdrDayPassive)
			.rdrSelected
			~ .rdrDayNumber
			span::after {
			background: #fff;
		}

		// "days up to today": the library's box is 30px, and All Time over
		// three years is a four-digit number.
		.rdrInputRangeInput {
			width: 46px;
		}

		// What a typed date has to look like, while one cannot be read. It
		// sits between Reset and Apply and is empty the rest of the time, so
		// nothing moves when it appears (shown above the footer it pushed the
		// buttons down as the box was left, out from under a click on Apply).
		.bp-date-range-hint {
			flex: 1 1 0;
			min-width: 0;
			max-height: 36px;
			margin: 0;
			overflow: hidden;
			color: #d92d20;
			font-size: 12px;
			line-height: 1.5;
			text-align: center;
		}

		.bp-date-range-dropdown_footer {
			align-items: center;
		}

		// A right-to-left site. The calendar itself stays left to right: the
		// library rounds a week's ends and draws its range band with `left` /
		// `right`, so mirrored it broke the band at every week's end, and the
		// header's arrows pointed away from the month they led to. The presets
		// beside it follow the page, so their divider moves to their other side.
		.rdrCalendarWrapper {
			direction: ltr;
		}

		@at-root html[dir="rtl"] #{&} .rdrDefinedRangesWrapper {
			border-right: 0;
			border-left: 1px solid #eff2f7;
		}

		@media (max-width: 600px) {
			@at-root html[dir="rtl"] #{&} .rdrDefinedRangesWrapper {
				border-left: 0;
			}
		}

		.bp-date-range-dropdown_footer {
			display: flex;
			justify-content: space-between;
			gap: 8px;
			padding: 12px 16px;
			border-top: 1px solid #e5e7eb;
		}

		.bp-date-range-dropdown_reset,
		.bp-date-range-dropdown_apply {
			padding: 8px 16px;
			border-radius: 4px;
			font-size: 14px;
			font-weight: 500;
			line-height: 1.4;
			cursor: pointer;
			transition:
				background 0.2s ease,
				border-color 0.2s ease;
		}

		.bp-date-range-dropdown_reset {
			color: #6a758c;
			background: transparent;
			border: 1px solid #e5e7eb;

			&:hover,
			&:focus-visible {
				border-color: #b9bfca;
				background: #f9fafb;
			}
		}

		.bp-date-range-dropdown_apply {
			color: #fff;
			background: #6b59ee;
			border: 1px solid #6b59ee;

			&:hover,
			&:focus-visible {
				background: #5a48dd;
				border-color: #5a48dd;
			}
		}

		.bp-date-range-dropdown_reset:focus-visible,
		.bp-date-range-dropdown_apply:focus-visible {
			outline: 2px solid #6b59ee;
			outline-offset: 2px;
		}

		// Dark mode. react-date-range ships a light theme only, so every part it
		// paints is restated here: the popup used to be a white card on the dark
		// page. Each rule sits under the popup's own scope, so it outranks the
		// library's stylesheet whichever of the two the bundle prints first.
		@include mode("dark") {
			background-color: $bp-dark-card-payment-box;
			border: 1px solid #292e39;
			box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);

			.rdrDateRangePickerWrapper,
			.rdrCalendarWrapper,
			.rdrDefinedRangesWrapper {
				background: $bp-dark-card-payment-box;
				color: $bp-dark-primary-text-color;
			}

			.rdrDefinedRangesWrapper {
				border-right-color: #292e39;
			}

			// The base rule is `!important`, so this one must be too.
			.rdrStaticRange {
				background: transparent;
				color: $bp-dark-primary-text-color;
				border-bottom: 1px solid #292e39 !important;

				&:hover .rdrStaticRangeLabel,
				&:focus .rdrStaticRangeLabel {
					background: rgba(255, 255, 255, 0.06);
				}
			}

			// The chosen preset takes the range colour inline (#6B59EE), which
			// is too dim on the dark card: the label carries a lighter one.
			.rdrStaticRangeSelected .rdrStaticRangeLabel {
				color: #a79cf8;
			}

			.rdrInputRangeInput {
				background: $bp-dark-bg-color;
				border-color: #3a414f;
				color: $bp-dark-primary-text-color;

				&:focus,
				&:hover {
					border-color: #586174;
					color: #fff;
				}
			}

			.rdrDateDisplayItem {
				background-color: $bp-dark-bg-color;
				border-color: #3a414f;
				box-shadow: none;

				input {
					background: transparent;
					color: $bp-dark-primary-text-color;
				}
			}

			.rdrDateDisplayItemActive {
				border-color: #6b59ee;
			}

			// The calendar's header and its month / year grids.
			.bp-cal-nav button {
				color: $bp-dark-primary-text-color;

				&:hover:not(:disabled) {
					background: rgba(255, 255, 255, 0.08);
				}
			}

			.bp-cal-nav__arrow {
				color: #b9bfca !important;
			}

			.bp-cal-nav__title svg {
				color: #8f9ab0;
			}

			.bp-cal-nav.is-open .bp-cal-nav__title {
				background: rgba(107, 89, 238, 0.22);
				color: #a79cf8;

				svg {
					color: #a79cf8;
				}
			}

			.bp-cal-grid__cell {
				color: $bp-dark-primary-text-color;

				&:hover:not(:disabled):not(.is-current) {
					background: rgba(255, 255, 255, 0.08);
				}

				&.is-today {
					border-color: #4b3fb0 !important;
					color: #a79cf8;
				}

				&.is-current {
					border-color: #6b59ee !important;
					background: #6b59ee;
					color: #fff;
				}
			}

			.rdrMonthName,
			.rdrWeekDay {
				color: #8f9ab0;
			}

			.rdrDayNumber span {
				color: $bp-dark-primary-text-color;
			}

			.rdrDayPassive .rdrDayNumber span {
				color: #4d5668;
			}

			.rdrDayDisabled {
				background-color: transparent;

				.rdrDayNumber span {
					color: #4d5668;
				}
			}

			@media (max-width: 600px) {
				.rdrDefinedRangesWrapper {
					border-bottom-color: #292e39;
				}
			}

			// A day inside the selection stays white on the brand colour.
			.rdrDay:not(.rdrDayPassive) .rdrInRange ~ .rdrDayNumber span,
			.rdrDay:not(.rdrDayPassive) .rdrStartEdge ~ .rdrDayNumber span,
			.rdrDay:not(.rdrDayPassive) .rdrEndEdge ~ .rdrDayNumber span,
			.rdrDay:not(.rdrDayPassive) .rdrSelected ~ .rdrDayNumber span {
				color: #fff;
			}

			@at-root html[dir="rtl"] #{&} .rdrDefinedRangesWrapper {
				border-left-color: #292e39;
			}

			.bp-date-range-hint {
				color: #f97066;
			}

			.rdrDay:focus-visible {
				outline-color: #fff;
			}

			.bp-date-range-dropdown_footer {
				border-top-color: #292e39;
			}

			.bp-date-range-dropdown_reset {
				color: $bp-dark-secondary-text-color;
				border-color: #3a414f;

				&:hover,
				&:focus-visible {
					border-color: #586174;
					background: #252d3a;
				}
			}
		}
	}
}

#wpfooter {
	.alignright {
		gap: 30px;
		display: flex;
	}

	.alignright,
	.alignleft {
		color: #6a758c;
		font-weight: 400;
		font-family: "IBM Plex Sans", serif;
		font-size: 14px;

		a {
			font-weight: 500;
			font-family: "IBM Plex Sans", serif;
			color: #6b59ee;
		}

		.bp-footer-version {
			padding: 4px 8px;
			background-color: #fcfcfc;
			border-radius: 20px;
			margin: 0 8px;
			color: #6b59ee;
		}

		.bp-footer-version-divider {
			position: relative;

			&::after {
				position: absolute;
				content: "";
				background-color: #b9bfca;
				padding: 1px;
				/* border       : 0; */
				top: 2px;
				bottom: 2px;
				right: -11px;
			}
		}
	}

	.bp-free-version {
		display: flex;
		align-items: center;
		gap: 2px;
	}
}

.better-body-dark {
	.alignright,
	.alignleft {
		color: #cbcfd7 !important;
	}

	.bp-footer-version {
		background-color: #111621 !important;
	}
}

.bp-setting_tab-wrapper {
	margin-top: 24px;
}
