/**
 * Supplementary admin styling for the Membership Mode / Role-Based Membership pages.
 *
 * This deliberately does NOT redefine the WP Swings design system — it is loaded
 * alongside the plugin's own admin/css/wps-admin.css (same blue #2196f3 accent, same
 * NunitoSans typography, same light-blue body background) and only adds the handful of
 * components that stylesheet doesn't already provide.
 */

.mfw-card {
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0px 2px 5px rgba(63, 71, 86, 0.1);
	padding: 24px 32px;
	margin: 20px 20px 20px 0;
}

.mfw-card + .mfw-card {
	margin-top: 0;
}

.mfw-card h2 {
	font-family: "NunitoSans-ExtraBold", sans-serif;
	font-size: 16px;
	color: #1a1a1a;
	margin-bottom: 16px;
}

.mfw-mode-cards {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-top: 8px;
}

.mfw-mode-card {
	flex: 1 1 260px;
	background: #ffffff;
	border: 1px solid rgba(63, 71, 86, 0.15);
	border-radius: 8px;
	padding: 24px;
	box-shadow: 0px 2px 5px rgba(63, 71, 86, 0.08);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mfw-mode-card:hover {
	border-color: #2196f3;
	box-shadow: 0px 4px 12px rgba(33, 150, 243, 0.15);
}

.mfw-mode-card h2 {
	font-family: "NunitoSans-ExtraBold", sans-serif;
	font-size: 16px;
	color: #2196f3;
	margin-bottom: 8px;
}

.mfw-mode-card p {
	font-family: "NunitoSans-Regular", sans-serif;
	color: #4b4b4b;
	margin-bottom: 16px;
}

/* Buttons: mirrors .wps-btn.wps-btn__filled so we don't depend on class order/specificity
   from the shared stylesheet loading first. */
.mfw-btn {
	display: inline-block;
	border-radius: 30px;
	border: 1px solid #2196f3;
	background-color: #2196f3;
	color: #ffffff !important;
	cursor: pointer;
	font-family: "NunitoSans-Regular", sans-serif;
	font-size: 14px;
	min-width: 140px;
	outline: 0;
	padding: 12px 28px;
	text-align: center;
	text-transform: capitalize;
}

.mfw-btn:hover,
.mfw-btn:focus,
.mfw-btn:active {
	color: #ffffff !important;
	opacity: 0.92;
}

.mfw-btn.mfw-btn__outline {
	background-color: transparent;
	color: #2196f3 !important;
}

/* Compact variant for utility/action rows (Import/Export, etc.) where the default
   min-width:140px + generous padding reads as oversized once several sit side by side. */
.mfw-btn.mfw-btn--sm {
	min-width: 0;
	padding: 8px 18px;
	font-size: 13px;
}

/* A flex row for grouping buttons/inputs that belong together (e.g. a file picker and its
   submit button) so they align on a shared baseline instead of however inline elements
   happen to wrap. */
.mfw-btn-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 8px 0;
}

/* Native <input type="file"> ships as a bare, browser-chrome grey control that clashes
   with everything else on this page — restyle its container and the file-picker button
   portion (::file-selector-button is the modern standard; -webkit-file-upload-button
   covers older WebKit) to match the brand instead of leaving it default grey. */
.mfw-file-input {
	font-family: "NunitoSans-Regular", sans-serif;
	font-size: 13px;
	color: #4b4b4b;
	border: 1px solid rgba(63, 71, 86, 0.25);
	border-radius: 30px;
	padding: 6px 14px 6px 6px;
	background: #ffffff;
}

.mfw-file-input::file-selector-button,
.mfw-file-input::-webkit-file-upload-button {
	font-family: "NunitoSans-Regular", sans-serif;
	font-size: 13px;
	border: none;
	border-radius: 24px;
	background-color: #2196f3;
	color: #ffffff;
	padding: 7px 16px;
	margin-right: 10px;
	cursor: pointer;
}

.mfw-file-input:hover::file-selector-button,
.mfw-file-input:hover::-webkit-file-upload-button {
	opacity: 0.92;
}

/* Pure-CSS toggle switch (no Material Components JS dependency) in the brand blue. */
.mfw-toggle {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	vertical-align: middle;
}

.mfw-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}

.mfw-toggle .mfw-toggle__slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background-color: #cfd8dc;
	transition: 0.2s;
	border-radius: 24px;
}

.mfw-toggle .mfw-toggle__slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: #ffffff;
	transition: 0.2s;
	border-radius: 50%;
}

.mfw-toggle input:checked + .mfw-toggle__slider {
	background-color: #2196f3;
}

.mfw-toggle input:checked + .mfw-toggle__slider:before {
	transform: translateX(20px);
}

.mfw-table-wrap {
	background: #ffffff;
	box-shadow: 0px 2px 5px rgba(63, 71, 86, 0.1);
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 24px;
	overflow-x: auto;
}

.mfw-table-wrap table {
	border: none;
}

.mfw-modal-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(20, 30, 40, 0.5);
	z-index: 100000;
}

.mfw-modal {
	background: #ffffff;
	max-width: 420px;
	margin: 12% auto;
	padding: 28px;
	border-radius: 8px;
}

.mfw-tabs-navbar {
	background: #ffffff;
	margin: 20px 20px 0 0;
	border-radius: 8px 8px 0 0;
}

.mfw-tab-link {
	display: inline-block;
	padding: 18px 0;
	font-family: "NunitoSans-Bold", sans-serif;
	font-size: 14px;
	color: #000000;
	text-decoration: none;
	border-bottom: 2px solid transparent;
}

.mfw-tab-link.active,
.mfw-tab-link:hover {
	color: #2196f3;
	border-bottom-color: #2196f3;
}

.mfw-tab-panel .mfw-card:first-child {
	margin-top: 0;
	border-radius: 0 0 8px 8px;
}

/* Reports: KPI stat tiles */
.mfw-stat-tiles {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 28px;
}

.mfw-stat-tile {
	flex: 1 1 140px;
	background: #f7fafd;
	border: 1px solid rgba(63, 71, 86, 0.1);
	border-radius: 8px;
	padding: 16px 18px;
}

.mfw-stat-tile__value {
	display: block;
	font-family: "NunitoSans-ExtraBold", sans-serif;
	font-size: 26px;
	line-height: 1.2;
	color: #1a1a1a;
}

.mfw-stat-tile__label {
	display: block;
	font-family: "NunitoSans-Regular", sans-serif;
	font-size: 12px;
	color: #6b7280;
	margin-top: 4px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

/* Reports: chart section headers */
.mfw-chart-section {
	margin-bottom: 28px;
}

.mfw-chart-section:last-child {
	margin-bottom: 0;
}

.mfw-chart-section__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 12px;
}

.mfw-chart-section__title {
	font-family: "NunitoSans-Bold", sans-serif;
	font-size: 14px;
	color: #1a1a1a;
}

.mfw-chart-section__summary {
	font-family: "NunitoSans-Regular", sans-serif;
	font-size: 12px;
	color: #6b7280;
}

/* Reports: level-distribution bar chart */
.mfw-bar-chart__row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 5px 4px;
	border-radius: 4px;
}

.mfw-bar-chart__row:hover {
	background: #f7fafd;
}

.mfw-bar-chart__label {
	flex: 0 0 150px;
	font-size: 13px;
	color: #333333;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mfw-bar-chart__track {
	flex: 1 1 auto;
	background: #eef1f4;
	border-radius: 8px;
	height: 16px;
	overflow: hidden;
}

.mfw-bar-chart__fill {
	display: block;
	height: 100%;
	min-width: 4px;
	background: #2196f3;
	border-radius: 8px;
	transition: width 0.3s ease;
}

.mfw-bar-chart__value {
	flex: 0 0 34px;
	text-align: right;
	font-family: "NunitoSans-Bold", sans-serif;
	font-size: 13px;
	color: #1a1a1a;
}

/* Reports: signups sparkline */
.mfw-sparkline-wrap {
	position: relative;
}

.mfw-sparkline {
	display: flex;
	align-items: flex-end;
	gap: 3px;
	height: 72px;
}

.mfw-sparkline__col {
	flex: 1 1 auto;
	display: flex;
	align-items: flex-end;
	height: 100%;
	cursor: default;
}

.mfw-sparkline__bar {
	width: 100%;
	background: #90caf9;
	min-height: 2px;
	border-radius: 2px 2px 0 0;
	transition: background-color 0.15s ease;
}

.mfw-sparkline__col:hover .mfw-sparkline__bar {
	background: #2196f3;
}

.mfw-sparkline__axis {
	display: flex;
	justify-content: space-between;
	margin-top: 6px;
	font-size: 11px;
	color: #9aa1a9;
}

.mfw-chart-tooltip {
	display: none;
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	margin-bottom: 6px;
	background: #1a1a1a;
	color: #ffffff;
	font-size: 11px;
	white-space: nowrap;
	padding: 4px 8px;
	border-radius: 4px;
	pointer-events: none;
	z-index: 10;
}

.mfw-sparkline__col:hover .mfw-chart-tooltip {
	display: block;
}

/* Tabbed + searchable capability picker (Roles tab), mirroring the reference plugin's
   dedicated Add/Edit Role screen instead of one long flat checkbox list. */
.mfw-cap-picker {
	border: 1px solid rgba(63, 71, 86, 0.15);
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 16px;
}

.mfw-cap-picker__search {
	padding: 10px 14px;
	background: #f7fafd;
	border-bottom: 1px solid rgba(63, 71, 86, 0.1);
}

.mfw-cap-picker__search input[type="search"] {
	width: 100%;
	max-width: 320px;
}

.mfw-cap-picker__layout {
	display: flex;
	min-height: 260px;
}

.mfw-cap-picker__tabs {
	flex: 0 0 170px;
	background: #f7fafd;
	border-right: 1px solid rgba(63, 71, 86, 0.1);
	display: flex;
	flex-direction: column;
	max-height: 400px;
	overflow-y: auto;
}

.mfw-cap-picker__tab {
	display: block;
	width: 100%;
	text-align: left;
	background: none;
	border: none;
	border-left: 3px solid transparent;
	padding: 10px 14px;
	font-family: "NunitoSans-Regular", sans-serif;
	font-size: 13px;
	color: #333333;
	cursor: pointer;
}

.mfw-cap-picker__tab:hover {
	background: #eef4fa;
}

.mfw-cap-picker__tab.active {
	background: #ffffff;
	border-left-color: #2196f3;
	color: #2196f3;
	font-family: "NunitoSans-Bold", sans-serif;
}

.mfw-cap-picker__panels {
	flex: 1 1 auto;
	padding: 14px 16px;
	max-height: 400px;
	overflow-y: auto;
}

.mfw-cap-picker__panel {
	display: none;
}

.mfw-cap-picker__panel.active {
	display: block;
}

/* Per-group Select all / Deselect all on the Roles tab — same compact text buttons as .mfw-link-btn. */
.mfw-cap-picker__toolbar {
	display: flex;
	gap: 4px;
	margin: 0 0 8px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(63, 71, 86, 0.08);
}

.mfw-cap-picker__select-all,
.mfw-cap-picker__deselect-all {
	background: none;
	border: 0;
	border-radius: 4px;
	padding: 4px 8px;
	color: #2196f3;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
}

.mfw-cap-picker__select-all:hover,
.mfw-cap-picker__deselect-all:hover {
	background: #e8f1fe;
	color: #1565c0;
}

.mfw-cap-picker__item {
	display: block;
	padding: 4px 0;
	font-size: 13px;
}

.mfw-cap-picker__item code {
	color: #9aa1a9;
	margin-left: 4px;
}

.mfw-cap-picker__item.mfw-cap-picker__item--hidden {
	display: none;
}

.mfw-cap-picker__no-match {
	color: #6b7280;
	font-size: 13px;
	font-style: italic;
}

/* Level form: discount category picker */
.mfw-cat-picker {
	border: 1px solid rgba(63, 71, 86, 0.15);
	border-radius: 8px;
	overflow: hidden;
	margin: 12px 0 6px;
	max-width: 760px;
	background: #ffffff;
}

.mfw-cat-picker__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	padding: 10px 14px;
	background: #f7fafd;
	border-bottom: 1px solid rgba(63, 71, 86, 0.1);
}

.mfw-cat-picker__title {
	font-size: 13px;
	color: #1d2327;
	margin-right: 8px;
}

.mfw-cat-picker__summary {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	background: #e9ecf1;
	color: #50575e;
	font-size: 12px;
	font-weight: 600;
}

.mfw-cat-picker.has-selection .mfw-cat-picker__summary {
	background: #e3f0fd;
	color: #1565c0;
}

.mfw-cat-picker__tools {
	display: flex;
	align-items: center;
	gap: 12px;
}

.mfw-cat-picker__tools input[type="search"] {
	width: 200px;
	min-height: 30px;
	font-size: 13px;
}

.mfw-cat-picker__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 8px;
	padding: 14px;
	max-height: 320px;
	overflow-y: auto;
}

.mfw-cat-chip {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 9px 10px;
	border: 1px solid #dcdfe6;
	border-radius: 6px;
	background: #ffffff;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.mfw-cat-chip[hidden] {
	display: none;
}

.mfw-cat-chip:hover {
	border-color: #90c2f5;
}

.mfw-cat-chip.is-checked {
	border-color: #2196f3;
	background: #f0f7ff;
	box-shadow: inset 0 0 0 1px #2196f3;
}

.mfw-cat-chip input[type="checkbox"] {
	margin: 2px 0 0;
	flex: 0 0 auto;
}

.mfw-cat-chip__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.mfw-cat-chip__name {
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.mfw-cat-chip__meta {
	font-size: 11px;
	color: #787c82;
	line-height: 1.4;
}

.mfw-cat-picker__no-match {
	margin: 0;
	padding: 0 14px 14px;
	color: #6b7280;
	font-size: 13px;
	font-style: italic;
}

/* Compact text actions in picker header bars (Select all / Clear / Deselect all). */
.mfw-link-btn {
	background: none;
	border: 0;
	border-radius: 4px;
	padding: 4px 8px;
	color: #2196f3;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
	white-space: nowrap;
}

.mfw-link-btn:hover {
	background: #e8f1fe;
	color: #1565c0;
}

.mfw-link-btn:focus-visible {
	outline: 2px solid #2196f3;
	outline-offset: 1px;
}

.mfw-cat-picker__tools .mfw-link-btn + .mfw-link-btn {
	position: relative;
	margin-left: 1px;
}

.mfw-cat-picker__tools .mfw-link-btn + .mfw-link-btn::before {
	content: "";
	position: absolute;
	left: -7px;
	top: 25%;
	height: 50%;
	border-left: 1px solid #dcdfe6;
}

/* Level form: capabilities list, grouped. */
.mfw-level-caps {
	margin-top: 10px;
}

.mfw-level-caps__body {
	max-height: 420px;
	overflow-y: auto;
}

.mfw-level-caps__group + .mfw-level-caps__group {
	border-top: 1px solid rgba(63, 71, 86, 0.1);
}

.mfw-level-caps__group-title {
	position: sticky;
	top: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 9px 14px;
	background: #ffffff;
	font-size: 13px;
	font-weight: 700;
	color: #1d2327;
	cursor: pointer;
}

.mfw-level-caps__group-title input[type="checkbox"] {
	margin: 0;
}

.mfw-level-caps__items {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 2px 16px;
	padding: 0 14px 12px 36px;
}

.mfw-level-caps__item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 4px 0;
	font-size: 13px;
	color: #3c434a;
	cursor: pointer;
}

.mfw-level-caps__item input[type="checkbox"] {
	margin: 2px 0 0;
	flex: 0 0 auto;
}

.mfw-level-caps__item code {
	display: inline-block;
	margin-left: 4px;
	padding: 0 5px;
	background: #f3f4f6;
	border-radius: 3px;
	color: #8a9099;
	font-size: 11px;
}

/* Destructive action buttons (Delete). */
.mfw-btn.mfw-btn__outline.mfw-btn--danger {
	border-color: #d63638;
	color: #d63638 !important;
}

.mfw-btn.mfw-btn__outline.mfw-btn--danger:hover {
	background-color: #fcf0f1;
	opacity: 1;
}

/* Table row actions: keep buttons on one line with a consistent gap. */
#mfw-role-levels-table td:last-child,
.mfw-table-wrap td:last-child {
	white-space: nowrap;
}

.mfw-table-wrap td .mfw-btn--sm + .mfw-btn--sm {
	margin-left: 6px;
}

.mfw-table-wrap td {
	vertical-align: middle;
}

.mfw-level-name {
	text-transform: capitalize;
	color: #1d2327;
}

.mfw-status-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	background: #f0f0f1;
	color: #50575e;
}

.mfw-status-badge--active {
	background: #e7f7ee;
	color: #18794e;
}

/* Inline tool panel (e.g. Recalculate Tiers) under a table. */
.mfw-inline-panel {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	flex-wrap: wrap;
	margin-top: 16px;
	padding: 14px 18px;
	background: #f7fafd;
	border: 1px solid rgba(63, 71, 86, 0.1);
	border-radius: 8px;
}

.mfw-inline-panel__text {
	flex: 1 1 360px;
}

.mfw-inline-panel__text .description {
	margin: 4px 0 0;
}

.mfw-inline-panel__result:not(:empty) {
	display: inline-block;
	margin-top: 6px;
	font-weight: 600;
	color: #1565c0;
}

/* Selects in settings forms were too narrow for their labels (text ran into the arrow). */
.mfw-card .form-table select {
	min-width: 220px;
	max-width: 100%;
}

/* ==========================================================================
   Role-Based Membership page inside the shared dashboard shell
   (admin/css/membership-for-woocommerce-redesign.css). Brings this page's own
   components in line with the product-based settings dashboard: soft bordered
   cards, dark pill primary buttons, orange accent and toggles.
   ========================================================================== */

/* The shared redesign stylesheet scopes its palette + page background to the product
   settings screen's body class; mirror them for this screen so every var(--mfw-*) resolves. */
.wp-swings_page_mfw_role_based_membership,
.wp-swings_page_mfw_choose_membership_mode {
	--mfw-bg: #f5f4fb;
	--mfw-panel: #ffffff;
	--mfw-panel-soft: #fbfbff;
	--mfw-border: #e8e4f2;
	--mfw-row-border: #ece8f5;
	--mfw-text: #201a45;
	--mfw-muted: #8c86a4;
	--mfw-accent: #f1a640;
	--mfw-dark: #09090f;
}

.wp-swings_page_mfw_role_based_membership #wpbody,
.wp-swings_page_mfw_role_based_membership #wpcontent,
.wp-swings_page_mfw_role_based_membership #wpbody-content,
.wp-swings_page_mfw_choose_membership_mode #wpbody,
.wp-swings_page_mfw_choose_membership_mode #wpcontent,
.wp-swings_page_mfw_choose_membership_mode #wpbody-content {
	background: var(--mfw-bg) !important;
}

.wp-swings_page_mfw_role_based_membership #wpbody-content > .notice,
.wp-swings_page_mfw_role_based_membership #wpbody-content > .error,
.wp-swings_page_mfw_role_based_membership #wpbody-content > .updated {
	margin: 14px 15px 0 0;
}

.mfw-role-based-settings .mfw-redesign-main__tab-content .mfw-card {
	background: #ffffff;
	border: 1px solid #ebe8f5;
	border-radius: 16px;
	box-shadow: none;
	margin: 0 0 14px;
	padding: 22px 24px;
}

.mfw-role-based-settings .mfw-redesign-main__tab-content .mfw-card h2 {
	color: #23184b;
	font-family: "NunitoSans-Bold", sans-serif;
	font-size: 18px;
	margin: 0 0 14px;
}

.mfw-role-based-settings .mfw-redesign-main__tab-content .description,
.mfw-role-based-settings .mfw-redesign-main__tab-content p.description {
	color: #8f89a8;
	font-size: 12px;
	line-height: 1.6;
}

/* Settings rows: label column + control column with soft dividers, like .wps-form-group. */
.mfw-role-based-settings .mfw-redesign-main__tab-content .form-table {
	margin-top: 0;
}

.mfw-role-based-settings .mfw-redesign-main__tab-content .form-table th {
	color: #1f1840;
	font-family: "NunitoSans-Bold", sans-serif;
	font-size: 14px;
	padding: 20px 20px 20px 0;
	width: 30%;
}

.mfw-role-based-settings .mfw-redesign-main__tab-content .form-table td {
	color: #4a4566;
	padding: 20px 0;
}

.mfw-role-based-settings .mfw-redesign-main__tab-content .form-table tr + tr th,
.mfw-role-based-settings .mfw-redesign-main__tab-content .form-table tr + tr td {
	border-top: 1px solid #ece9f6;
}

/* Buttons: filled = dark uppercase pill (as "Save Settings"), outline = light pill. */
.mfw-role-based-settings .mfw-btn {
	background: #07070d;
	border: 0;
	border-radius: 999px;
	box-shadow: 0 8px 20px rgba(7, 7, 13, 0.2);
	color: #ffffff !important;
	font-family: "NunitoSans-Bold", sans-serif;
	font-size: 12px;
	letter-spacing: 0.04em;
	line-height: 1;
	min-width: 0;
	padding: 13px 18px;
	text-transform: uppercase;
}

.mfw-role-based-settings .mfw-btn:hover,
.mfw-role-based-settings .mfw-btn:focus {
	opacity: 0.88;
}

.mfw-role-based-settings .mfw-btn.mfw-btn__outline {
	background: #ffffff;
	border: 1px solid #e4e0f0;
	box-shadow: none;
	color: #23184b !important;
	letter-spacing: 0;
	text-transform: none;
}

.mfw-role-based-settings .mfw-btn.mfw-btn__outline:hover {
	border-color: #f3a43c;
	opacity: 1;
}

.mfw-role-based-settings .mfw-btn.mfw-btn--sm {
	font-size: 12px;
	padding: 8px 14px;
}

.mfw-role-based-settings .mfw-btn.mfw-btn__outline.mfw-btn--danger {
	border-color: #f3c4c5;
	color: #d63638 !important;
}

.mfw-role-based-settings .mfw-btn.mfw-btn__outline.mfw-btn--danger:hover {
	background: #fcf0f1;
	border-color: #d63638;
}

/* Toggle: orange, as the product dashboard's switches. */
.mfw-role-based-settings .mfw-toggle {
	height: 32px;
	margin-right: 10px;
	width: 58px;
}

.mfw-role-based-settings .mfw-toggle .mfw-toggle__slider {
	background: #ffffff;
	border: 2px solid #b8c2d1;
}

.mfw-role-based-settings .mfw-toggle .mfw-toggle__slider:before {
	background: #8f9db2;
	bottom: 2px;
	height: 24px;
	left: 2px;
	width: 24px;
}

.mfw-role-based-settings .mfw-toggle input:checked + .mfw-toggle__slider {
	background: #ffffff;
	border-color: #f39b02;
}

.mfw-role-based-settings .mfw-toggle input:checked + .mfw-toggle__slider:before {
	background: #f39b02;
	transform: translateX(26px);
}

/* Tables. */
.mfw-role-based-settings .mfw-table-wrap {
	border: 1px solid #ebe8f5;
	border-radius: 14px;
	box-shadow: none;
	padding: 6px 12px;
}

.mfw-role-based-settings .mfw-table-wrap thead th {
	color: #8f89a8;
	font-family: "NunitoSans-Bold", sans-serif;
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.mfw-role-based-settings .mfw-table-wrap .widefat td,
.mfw-role-based-settings .mfw-table-wrap .widefat th {
	border-color: #ece9f6;
}

.mfw-role-based-settings .mfw-table-wrap .striped > tbody > :nth-child(odd) {
	background: #faf9fd;
}

/* Pickers, panels and badges switch from blue to the dashboard's orange accent. */
.mfw-role-based-settings .mfw-cat-picker,
.mfw-role-based-settings .mfw-cap-picker {
	border-color: #ebe8f5;
	border-radius: 12px;
}

.mfw-role-based-settings .mfw-cat-picker__head,
.mfw-role-based-settings .mfw-cap-picker__search,
.mfw-role-based-settings .mfw-cap-picker__tabs,
.mfw-role-based-settings .mfw-inline-panel {
	background: #faf9fd;
	border-color: #ebe8f5;
}

.mfw-role-based-settings .mfw-cat-picker.has-selection .mfw-cat-picker__summary {
	background: #fff4e3;
	color: #b86e00;
}

.mfw-role-based-settings .mfw-link-btn,
.mfw-role-based-settings .mfw-cap-picker__select-all,
.mfw-role-based-settings .mfw-cap-picker__deselect-all {
	color: #c27400;
}

.mfw-role-based-settings .mfw-link-btn:hover,
.mfw-role-based-settings .mfw-cap-picker__select-all:hover,
.mfw-role-based-settings .mfw-cap-picker__deselect-all:hover {
	background: #fff4e3;
	color: #9a5c00;
}

.mfw-role-based-settings .mfw-cat-chip {
	border-color: #e4e0f0;
}

.mfw-role-based-settings .mfw-cat-chip:hover {
	border-color: #f6c784;
}

.mfw-role-based-settings .mfw-cat-chip.is-checked {
	background: #fffaf2;
	border-color: #f39b02;
	box-shadow: inset 0 0 0 1px #f39b02;
}

.mfw-role-based-settings .mfw-cap-picker__tab:hover {
	background: #f3f1fa;
}

.mfw-role-based-settings .mfw-cap-picker__tab.active {
	border-left-color: #f39b02;
	color: #23184b;
}

.mfw-role-based-settings input[type="checkbox"]:checked {
	accent-color: #f39b02;
}

.mfw-role-based-settings .mfw-inline-panel__result:not(:empty) {
	color: #b86e00;
}

.mfw-role-based-settings .mfw-file-input::file-selector-button,
.mfw-role-based-settings .mfw-file-input::-webkit-file-upload-button {
	background-color: #23184b;
}

.mfw-role-based-settings .mfw-bar-chart__fill {
	background: var(--mfw-accent);
}

.mfw-role-based-settings .mfw-sparkline__bar {
	background: #f8d3a0;
}

.mfw-role-based-settings .mfw-sparkline__col:hover .mfw-sparkline__bar {
	background: var(--mfw-accent);
}

/* Tabs use the shared dashboard's hover colour, not the old blue link hover. */
.mfw-role-based-settings .mfw-redesign-main__navbar .mfw-tab-link:hover {
	color: #23184b !important;
}

/* Loading state for buttons that save over AJAX (e.g. Add / Update Level). */
.mfw-btn.is-loading {
	cursor: wait;
	opacity: 0.75;
	pointer-events: none;
}

.mfw-btn.is-loading::before {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-right: 8px;
	vertical-align: -2px;
	border: 2px solid rgba(255, 255, 255, 0.45);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: mfw-btn-spin 0.7s linear infinite;
}

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

.mfw-level-save-message {
	display: inline-block;
	margin-left: 12px;
	color: #d63638;
}

.mfw-level-save-message.is-success {
	color: #00a32a;
}

/* "Example: how to build a perfect level-based membership" guide on the Levels tab. */
.mfw-level-example summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	cursor: pointer;
	list-style: none;
}

.mfw-level-example summary::-webkit-details-marker {
	display: none;
}

.mfw-level-example summary h2 {
	margin: 0;
}

.mfw-level-example__toggle {
	color: #2196f3;
	font-size: 13px;
	white-space: nowrap;
}

.mfw-level-example details[open] summary {
	margin-bottom: 12px;
}

.mfw-level-example__table td {
	vertical-align: middle;
}

.mfw-level-example__table .mfw-btn--sm {
	white-space: nowrap;
}

.mfw-level-example__columns {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 8px 32px;
	margin-top: 20px;
}

.mfw-level-example__columns h3 {
	font-size: 14px;
	margin: 0 0 8px;
}

.mfw-level-example__columns ol {
	margin: 0 0 0 18px;
}

.mfw-level-example__columns li {
	margin-bottom: 6px;
	line-height: 1.5;
}

.mfw-level-example__columns code {
	display: inline-block;
	margin-top: 2px;
	word-break: break-all;
}

/* ---------- Membership Mode page (same dashboard chrome as Role-Based Membership) ---------- */
.wp-swings_page_mfw_choose_membership_mode #wpbody-content > .notice,
.wp-swings_page_mfw_choose_membership_mode #wpbody-content > .error,
.wp-swings_page_mfw_choose_membership_mode #wpbody-content > .updated {
	margin: 14px 15px 0 0;
}

.mfw-membership-mode-page .mfw-mode-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 14px;
	margin-top: 0;
}

.mfw-membership-mode-page .mfw-mode-card {
	display: flex;
	flex-direction: column;
	background: #fbfbff;
	border: 1px solid #ebe8f5;
	border-radius: 16px;
	box-shadow: none;
	padding: 22px;
}

.mfw-membership-mode-page .mfw-mode-card:hover {
	border-color: #f3a43c;
	box-shadow: 0 8px 20px rgba(35, 24, 75, 0.06);
}

.mfw-membership-mode-page .mfw-mode-card.is-current {
	background: #fff9f0;
	border-color: #f3a43c;
}

.mfw-mode-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.mfw-mode-card__icon.dashicons {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: #f1eefb;
	color: #23184b;
	font-size: 22px;
	line-height: 44px;
	text-align: center;
}

.mfw-mode-card.is-current .mfw-mode-card__icon.dashicons {
	background: #f3a43c;
	color: #ffffff;
}

.mfw-mode-card__badge {
	background: #e7f6ec;
	border-radius: 999px;
	color: #1a7f37;
	font-family: "NunitoSans-Bold", sans-serif;
	font-size: 11px;
	letter-spacing: 0.04em;
	padding: 5px 12px;
	text-transform: uppercase;
}

.mfw-membership-mode-page .mfw-mode-card .mfw-mode-card__title {
	color: #23184b;
	font-family: "NunitoSans-ExtraBold", sans-serif;
	font-size: 20px;
	margin: 0 0 6px;
}

.mfw-membership-mode-page .mfw-mode-card .mfw-mode-card__tagline {
	color: #6f6987;
	font-size: 13px;
	line-height: 1.6;
	margin: 0 0 14px;
}

.mfw-mode-card__features {
	flex: 1;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
}

.mfw-mode-card__features li {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	color: #4a4566;
	font-size: 13px;
	line-height: 1.5;
	margin-bottom: 8px;
}

.mfw-mode-card__features .dashicons {
	color: #f3a43c;
	font-size: 18px;
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
}

.mfw-mode-card__actions .mfw-btn {
	display: inline-block;
	text-decoration: none;
}

.mfw-membership-mode-page .mfw-mode-safe-note {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.mfw-membership-mode-page .mfw-redesign-main__tab-content .mfw-mode-safe-note h2 {
	font-size: 15px;
	margin: 0 0 4px;
}

.mfw-membership-mode-page .mfw-redesign-main__tab-content .mfw-mode-safe-note p.description {
	margin: 0;
}

.mfw-mode-safe-note > .dashicons {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: #e7f6ec;
	color: #1a7f37;
	font-size: 20px;
	line-height: 40px;
	text-align: center;
}

.mfw-membership-mode-page .mfw-modal {
	border-radius: 16px;
	box-shadow: 0 20px 50px rgba(20, 15, 45, 0.25);
	max-width: 440px;
	padding: 28px;
}

.mfw-membership-mode-page .mfw-modal h2 {
	color: #23184b;
	font-family: "NunitoSans-ExtraBold", sans-serif;
	font-size: 20px;
	margin: 0 0 10px;
}

.mfw-membership-mode-page .mfw-modal p {
	color: #6f6987;
	line-height: 1.6;
}

.mfw-modal__error:empty {
	display: none;
}

.mfw-membership-mode-page .mfw-modal .mfw-modal__error {
	color: #d63638;
}

.mfw-modal__actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 20px;
}

.mfw-membership-mode-page .mfw-btn.is-loading::before {
	border-color: rgba(255, 255, 255, 0.45);
	border-top-color: #ffffff;
}
