/* ========================================================================== 
   Beyond Woo - User Profile Score
   Goodmums professional frontend layer

   Visual-only replacement for frontend.css.
   Existing PHP markup, field names, scoring, conditions, repeaters, AJAX,
   Test Mode, product matching and privacy behavior remain unchanged.
   ========================================================================== */

:root {
	--bwups-sage: #A8C3A0;
	--bwups-sage-deep: #8AAA80;
	--bwups-sage-tint: #DCE8D8;
	--bwups-blush: #F2C6C2;
	--bwups-blush-tint: #FAE4E2;
	--bwups-cream: #F7E8D4;
	--bwups-ivory: #FDF8F0;
	--bwups-honey: #E8B87E;
	--bwups-honey-deep: #C99555;
	--bwups-ink: #4A5748;
	--bwups-heading: #5C6B5A;
	--bwups-muted: #5D6A5B;
	--bwups-grey: #748272;
	--bwups-card: #FFFFFF;
	--bwups-line: #DCE8D8;
	--bwups-line-strong: #A8C3A0;
	--bwups-focus: #2F3B2E;
	--bwups-error: #9E3F3F;
	--bwups-error-bg: #FBE8E8;
	--bwups-error-line: #E9BDBD;
	--bwups-shadow-card: 0 8px 24px rgba(47, 59, 46, .08);
	--bwups-shadow-float: 0 16px 44px rgba(47, 59, 46, .16);
	--bwups-radius: 18px;
	--bwups-radius-sm: 12px;
	--bwups-pill: 999px;
}

.bwups-profile,
.bwups-profile-progress,
.bwups-user-field,
.bwups-alert-wrap,
.bwups-dialog,
.bwups-test-launcher,
.bwups-matched-products {
	box-sizing: border-box;
	max-width: 100%;
	color: var(--bwups-ink);
	font-family: "Mulish", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bwups-profile *,
.bwups-profile *::before,
.bwups-profile *::after,
.bwups-profile-progress *,
.bwups-profile-progress *::before,
.bwups-profile-progress *::after,
.bwups-user-field *,
.bwups-user-field *::before,
.bwups-user-field *::after,
.bwups-alert-wrap *,
.bwups-alert-wrap *::before,
.bwups-alert-wrap *::after,
.bwups-dialog *,
.bwups-dialog *::before,
.bwups-dialog *::after,
.bwups-test-launcher *,
.bwups-test-launcher *::before,
.bwups-test-launcher *::after,
.bwups-matched-products *,
.bwups-matched-products *::before,
.bwups-matched-products *::after {
	box-sizing: border-box;
}

/* ========================================================================== 
   PROFILE PAGE
   ========================================================================== */

.bwups-profile {
	width: 100%;
	max-width: 920px;
	min-width: 0;
	padding: clamp(22px, 3vw, 30px);
	border: 0;
	border-radius: var(--bwups-radius);
	background: var(--bwups-card);
	box-shadow: var(--bwups-shadow-card);
	overflow: hidden;
}

.bwups-profile h2,
.bwups-profile h3,
.bwups-dialog h2,
.bwups-dialog h3,
.bwups-profile-progress__head strong,
.bwups-matched-products__header h2 {
	color: var(--bwups-heading);
	font-family: "Comfortaa", system-ui, sans-serif;
	letter-spacing: -.015em;
}

.bwups-profile__header,
.bwups-profile__header--identity {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 20px;
	padding-bottom: 20px;
}

.bwups-profile__eyebrow {
	display: inline-block;
	margin-bottom: 6px;
	color: var(--bwups-heading);
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.bwups-profile__header h2,
.bwups-profile__header--identity .bwups-identity__copy h2 {
	margin: 0 !important;
	font-size: clamp(1.28rem, 2.3vw, 1.65rem) !important;
	font-weight: 600;
	line-height: 1.3;
}

.bwups-profile__header p,
.bwups-profile__header--identity .bwups-identity__copy p,
.bwups-profile-form__footer p,
.bwups-profile__empty p {
	margin: 0;
	color: var(--bwups-muted);
	line-height: 1.55;
}

.bwups-profile__header p,
.bwups-profile__header--identity .bwups-identity__copy p {
	max-width: 640px;
	margin-top: 7px !important;
	font-size: .88rem;
}

.bwups-profile__score {
	display: grid;
	min-width: 90px;
	padding: 11px 14px;
	border: 1px solid var(--bwups-line);
	border-radius: 14px;
	background: var(--bwups-ivory);
	box-shadow: none;
	text-align: center;
}

.bwups-profile__score strong {
	color: var(--bwups-heading);
	font-size: 1.22rem;
	font-weight: 800;
	line-height: 1;
}

.bwups-profile__score span {
	margin-top: 4px;
	color: var(--bwups-muted);
	font-size: .68rem;
}

.bwups-progress {
	display: grid;
	gap: 6px;
	margin-bottom: 24px;
}

.bwups-progress__track {
	display: block;
	height: 6px;
	overflow: hidden;
	border-radius: var(--bwups-pill);
	background: var(--bwups-sage-tint);
}

.bwups-progress__fill {
	display: block;
	width: var(--bwups-progress, 0%);
	height: 100%;
	border-radius: inherit;
	background: var(--bwups-sage-deep);
	transition: width .2s ease;
}

.bwups-progress__meta {
	color: var(--bwups-muted);
	font-size: .76rem;
}

/* Sections */
.bwups-profile-section {
	display: grid;
	gap: 16px;
	margin-top: 22px;
	padding-top: 22px;
	border-top: 1px solid var(--bwups-line);
}

.bwups-profile-section:first-of-type {
	margin-top: 0;
}

.bwups-profile-section__heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.bwups-profile-section__heading h3,
.bwups-profile-section__heading p {
	margin: 0 !important;
}

.bwups-profile-section__heading h3 {
	color: var(--bwups-heading);
	font-size: .98rem;
	font-weight: 600;
	line-height: 1.4;
}

.bwups-profile-section__heading p {
	max-width: 620px;
	margin-top: 4px !important;
	color: var(--bwups-muted);
	font-size: .78rem;
	line-height: 1.5;
}

.bwups-profile-section__heading a {
	flex: 0 0 auto;
	color: var(--bwups-heading);
	font-size: .76rem;
	font-weight: 700;
	text-underline-offset: 3px;
}

/* Field grid */
.bwups-profile-form__grid,
.bwups-quick-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 24px;
	row-gap: 18px;
	min-width: 0;
}

.bwups-profile-field {
	position: relative;
	display: grid;
	align-content: start;
	gap: 7px;
	min-width: 0;
	max-width: 100%;
}

.bwups-profile-field[hidden] {
	display: none !important;
}

.bwups-profile-field--wide {
	grid-column: 1 / -1;
}

.bwups-profile-field > label {
	margin: 0 !important;
	color: var(--bwups-ink) !important;
	font-family: "Mulish", system-ui, sans-serif !important;
	font-size: .84rem !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
}

.bwups-required {
	color: var(--bwups-heading);
}

.bwups-profile-field small,
.bwups-repeater__hint {
	max-width: 620px;
	color: var(--bwups-muted);
	font-size: .72rem;
	line-height: 1.45;
}

/* Controls */
.bwups-profile input[type="text"],
.bwups-profile input[type="number"],
.bwups-profile select:not([multiple]),
.bwups-dialog input[type="text"],
.bwups-dialog input[type="number"],
.bwups-dialog select:not([multiple]) {
	width: 100% !important;
	max-width: 100%;
	height: 46px !important;
	min-height: 46px !important;
	margin: 0 !important;
	padding: 0 42px 0 14px !important;
	border: 1px solid #AFC2AA !important;
	border-radius: var(--bwups-radius-sm) !important;
	background-color: #fff !important;
	color: var(--bwups-ink) !important;
	font-family: "Mulish", system-ui, sans-serif !important;
	font-size: .86rem !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	box-shadow: none !important;
	transition: border-color .15s ease, box-shadow .15s ease !important;
}

.bwups-profile input[type="text"],
.bwups-profile input[type="number"],
.bwups-dialog input[type="text"],
.bwups-dialog input[type="number"] {
	padding-right: 14px !important;
}

.bwups-profile select:not([multiple]),
.bwups-dialog select:not([multiple]) {
	-webkit-appearance: none !important;
	appearance: none !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.25 6 6.25l5-5' fill='none' stroke='%235C6B5A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 14px center !important;
	background-size: 12px 8px !important;
}

[dir="rtl"] .bwups-profile select:not([multiple]),
[dir="rtl"] .bwups-dialog select:not([multiple]) {
	padding: 0 14px 0 42px !important;
	background-position: left 14px center !important;
}

.bwups-profile input:focus,
.bwups-profile select:focus,
.bwups-dialog input:focus,
.bwups-dialog select:focus {
	outline: none !important;
	border-color: var(--bwups-sage-deep) !important;
	box-shadow: 0 0 0 3px rgba(138, 170, 128, .18) !important;
}

.bwups-profile input:disabled,
.bwups-profile select:disabled,
.bwups-dialog input:disabled,
.bwups-dialog select:disabled {
	background-color: var(--bwups-ivory) !important;
	color: var(--bwups-grey) !important;
	cursor: not-allowed;
	opacity: .78;
}

/* Native fallback before JS enhancement */
.bwups-profile select[multiple]:not(.bwups-multiselect-native),
.bwups-dialog select[multiple]:not(.bwups-multiselect-native) {
	width: 100% !important;
	max-width: 650px;
	min-height: 132px !important;
	padding: 7px !important;
	border: 1px solid #AFC2AA !important;
	border-radius: var(--bwups-radius-sm) !important;
	background: #fff !important;
	color: var(--bwups-ink) !important;
	font-family: "Mulish", system-ui, sans-serif !important;
	font-size: .84rem !important;
	box-shadow: none !important;
}

.bwups-profile select[multiple]:not(.bwups-multiselect-native) option,
.bwups-dialog select[multiple]:not(.bwups-multiselect-native) option {
	padding: 8px 10px;
	border-radius: 8px;
}

/* Progressive-enhancement multiselect */
.bwups-multiselect-native {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	min-width: 1px !important;
	min-height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	border: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
	white-space: nowrap !important;
}

.bwups-multiselect-ui {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	width: 100%;
	max-width: 650px;
	min-width: 0;
}

.bwups-multiselect-choice {
	appearance: none !important;
	-webkit-appearance: none !important;
	display: flex !important;
	width: 100% !important;
	min-width: 0;
	min-height: 44px !important;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 9px !important;
	margin: 0 !important;
	padding: 9px 11px !important;
	border: 1px solid var(--bwups-line) !important;
	border-radius: 11px !important;
	background: #fff !important;
	background-image: none !important;
	box-shadow: none !important;
	color: var(--bwups-ink) !important;
	font-family: "Mulish", system-ui, sans-serif !important;
	font-size: .81rem !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;
	text-align: left !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease !important;
}

.bwups-multiselect-choice__mark {
	position: relative;
	display: grid;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	place-items: center;
	border: 1px solid var(--bwups-line-strong);
	border-radius: 6px;
	background: #fff;
}

.bwups-multiselect-choice__mark::after {
	content: "";
	width: 8px;
	height: 4px;
	border-left: 2px solid var(--bwups-focus);
	border-bottom: 2px solid var(--bwups-focus);
	opacity: 0;
	transform: translateY(-1px) rotate(-45deg);
}

.bwups-multiselect-choice:hover {
	border-color: var(--bwups-sage-deep) !important;
	background: rgba(220, 232, 216, .34) !important;
	color: var(--bwups-focus) !important;
}

.bwups-multiselect-choice.is-selected {
	border-color: var(--bwups-sage-deep) !important;
	background: var(--bwups-sage-tint) !important;
	color: var(--bwups-focus) !important;
}

.bwups-multiselect-choice.is-selected .bwups-multiselect-choice__mark {
	border-color: var(--bwups-sage-deep);
	background: var(--bwups-sage);
}

.bwups-multiselect-choice.is-selected .bwups-multiselect-choice__mark::after {
	opacity: 1;
}

.bwups-multiselect-choice:focus-visible {
	outline: 2px solid var(--bwups-focus) !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 3px rgba(168, 195, 160, .28) !important;
}

.bwups-multiselect-choice:disabled {
	background: var(--bwups-ivory) !important;
	color: var(--bwups-grey) !important;
	cursor: not-allowed;
	opacity: .7;
}

.bwups-multiselect-ui.is-invalid {
	padding: 7px;
	border: 1px solid var(--bwups-error-line);
	border-radius: 14px;
	background: var(--bwups-error-bg);
}

.bwups-multiselect-error {
	grid-column: 1 / -1;
	margin: 1px 2px 0 !important;
	color: #7E3232 !important;
	font-size: .72rem !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
}

.bwups-multiselect-error[hidden] {
	display: none !important;
}

/* Repeaters */
.bwups-profile-field--wide .bwups-repeater {
	width: 100%;
	max-width: 580px;
}

.bwups-repeater,
.bwups-repeater__rows {
	display: grid;
	gap: 8px;
	min-width: 0;
}

.bwups-repeater__row {
	display: grid;
	grid-template-columns: 78px minmax(0, 390px) 40px;
	align-items: center;
	justify-content: start;
	gap: 8px;
	width: 100%;
	max-width: 524px;
	min-width: 0;
}

.bwups-repeater__row:not(:has(.bwups-repeater__remove)) {
	grid-template-columns: 78px minmax(0, 390px);
	max-width: 476px;
}

.bwups-repeater__row-label {
	min-width: 0;
	color: var(--bwups-muted);
	font-size: .76rem;
	font-weight: 700;
	line-height: 1.35;
}

.bwups-repeater__row > [data-bwups-control] {
	min-width: 0;
}

.bwups-repeater__remove,
.bwups-repeater__add {
	appearance: none !important;
	-webkit-appearance: none !important;
	border: 1px solid var(--bwups-line-strong) !important;
	background: #fff !important;
	color: var(--bwups-heading) !important;
	font-family: "Mulish", system-ui, sans-serif !important;
	font-weight: 700 !important;
	box-shadow: none !important;
	cursor: pointer;
}

.bwups-repeater__remove {
	width: 40px !important;
	height: 44px !important;
	min-height: 44px !important;
	padding: 0 !important;
	border-radius: 11px !important;
	font-size: 1.2rem !important;
	font-weight: 500 !important;
	line-height: 1 !important;
}

.bwups-repeater__add {
	justify-self: start;
	min-height: 38px !important;
	padding: 7px 12px !important;
	border-radius: var(--bwups-pill) !important;
	font-size: .76rem !important;
}

.bwups-repeater__remove:hover,
.bwups-repeater__add:hover {
	border-color: var(--bwups-sage-deep) !important;
	background: var(--bwups-sage-tint) !important;
	color: var(--bwups-focus) !important;
}

/* Footer and primary action */
.bwups-profile-form__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-top: 26px;
	padding-top: 18px;
	border-top: 1px solid var(--bwups-line);
}

.bwups-profile-form__footer p {
	max-width: 560px;
	font-size: .78rem;
}

.bwups-profile .bwups-profile-form__submit,
.bwups-profile button.bwups-profile-form__submit,
.bwups-alert__button,
.bwups-quick-submit {
	appearance: none !important;
	min-height: 44px !important;
	padding: 9px 18px !important;
	border: 1px solid var(--bwups-honey-deep) !important;
	border-radius: var(--bwups-pill) !important;
	background: var(--bwups-honey) !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #4A3213 !important;
	font-family: "Mulish", system-ui, sans-serif !important;
	font-size: .8rem !important;
	font-weight: 800 !important;
	line-height: 1.2 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	white-space: nowrap;
	cursor: pointer;
}

.bwups-profile .bwups-profile-form__submit:hover,
.bwups-profile button.bwups-profile-form__submit:hover,
.bwups-alert__button:hover,
.bwups-quick-submit:hover {
	border-color: var(--bwups-honey-deep) !important;
	background: var(--bwups-honey-deep) !important;
	color: #4A3213 !important;
}

.bwups-profile .bwups-profile-form__submit:disabled,
.bwups-profile button.bwups-profile-form__submit:disabled,
.bwups-alert__button:disabled,
.bwups-quick-submit:disabled {
	border-color: var(--bwups-line) !important;
	background: var(--bwups-cream) !important;
	color: var(--bwups-muted) !important;
	cursor: not-allowed;
	opacity: .7;
}

.bwups-profile .bwups-profile-form__submit:focus-visible,
.bwups-profile button.bwups-profile-form__submit:focus-visible,
.bwups-alert__button:focus-visible,
.bwups-quick-submit:focus-visible,
.bwups-quick-skip:focus-visible,
.bwups-repeater__add:focus-visible,
.bwups-repeater__remove:focus-visible,
.bwups-dialog__close:focus-visible,
.bwups-dialog__account-link:focus-visible {
	outline: 2px solid var(--bwups-focus) !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 3px rgba(168, 195, 160, .26) !important;
}

/* Empty state */
.bwups-profile__empty {
	padding: 28px 20px;
	border: 1px dashed var(--bwups-line-strong);
	border-radius: 16px;
	background: var(--bwups-ivory);
	text-align: center;
}

.bwups-profile__empty h3 {
	margin: 0 0 7px !important;
	font-size: 1rem;
}

.bwups-profile__empty p {
	font-size: .84rem;
}

/* Identity */
.bwups-identity {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: 11px;
}

.bwups-identity__avatar {
	display: grid;
	flex: 0 0 auto;
	place-items: center;
	overflow: hidden;
	border: 1px solid var(--bwups-line);
	border-radius: 50%;
	background: var(--bwups-ivory);
}

.bwups-identity--account .bwups-identity__avatar {
	width: 58px;
	height: 58px;
}

.bwups-identity--modal .bwups-identity__avatar {
	width: 40px;
	height: 40px;
}

.bwups-identity__avatar-image {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	border-radius: inherit;
	object-fit: cover;
}

.bwups-identity__avatar-fallback {
	color: var(--bwups-sage-deep);
	font-size: 1.15rem;
	line-height: 1;
}

.bwups-identity__copy {
	min-width: 0;
}

.bwups-identity__copy h2 {
	margin: 0;
}

.bwups-identity__subtitle {
	display: block;
	margin-top: 2px;
	color: var(--bwups-muted);
	font-size: .76rem;
	font-weight: 600;
}

/* Small shortcode outputs */
.bwups-user-field {
	display: inline-flex;
	gap: .3em;
	align-items: baseline;
}

.bwups-user-field__label {
	font-weight: 700;
}

.bwups-profile-progress {
	display: grid;
	gap: 7px;
	width: 100%;
	padding: 14px 16px;
	border: 1px solid var(--bwups-line);
	border-radius: 14px;
	background: var(--bwups-ivory);
}

.bwups-profile-progress__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.bwups-profile-progress__head strong {
	font-size: .9rem;
	font-weight: 600;
}

.bwups-profile-progress__head span {
	color: var(--bwups-heading);
	font-size: .8rem;
	font-weight: 800;
}

/* ========================================================================== 
   STATIC PROFILE COMPLETION ALERT
   ========================================================================== */

.bwups-alert-wrap {
	position: relative;
	width: min(1120px, calc(100% - 32px));
	margin: 12px auto;
	transition: opacity .16s ease, transform .16s ease;
}

.bwups-alert-wrap.is-complete {
	opacity: 0;
	transform: translateY(-5px);
}

.bwups-alert {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 13px 15px;
	border: 1px solid var(--bwups-line);
	border-radius: 16px;
	background: var(--bwups-cream);
	box-shadow: 0 6px 18px rgba(47, 59, 46, .06);
}

.bwups-alert__content {
	display: grid;
	gap: 3px;
	min-width: 0;
}

.bwups-alert__label {
	color: var(--bwups-heading);
	font-size: .66rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.bwups-alert__content p {
	margin: 0;
	color: var(--bwups-ink);
	font-size: .84rem;
	line-height: 1.5;
}

.bwups-alert__actions {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 9px;
}

.bwups-alert__score {
	display: grid;
	place-items: center;
	min-width: 52px;
	height: 36px;
	padding: 0 11px;
	border: 1px solid rgba(92, 107, 90, .16);
	border-radius: var(--bwups-pill);
	background: rgba(255,255,255,.66);
	color: var(--bwups-heading);
	font-size: .76rem;
	font-weight: 800;
}

/* ========================================================================== 
   GUIDED FLOATING DIALOG
   Cross-component z-index is managed in goodmums-z-index.css.
   Internal panel/close-button z-index values remain local below.
   ========================================================================== */

html.bwups-dialog-open,
html.bwups-dialog-open body {
	overflow: auto;
}

.bwups-dialog[hidden] {
	display: none !important;
}

.bwups-dialog {
	position: fixed;
	inset: auto 18px 18px auto;
	display: block;
	width: min(440px, calc(100vw - 36px));
	width: min(440px, calc(100dvw - 36px));
	max-width: calc(100vw - 36px);
	max-width: calc(100dvw - 36px);
	padding: 0;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity .16s ease, visibility .16s ease;
}

.bwups-dialog.is-open {
	opacity: 1;
	visibility: visible;
}

.bwups-dialog__backdrop {
	display: none;
}

.bwups-dialog__panel {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 100%;
	max-height: min(640px, calc(100vh - 36px));
	max-height: min(640px, calc(100dvh - 36px));
	overflow: hidden;
	border: 1px solid var(--bwups-line);
	border-radius: var(--bwups-radius);
	background: var(--bwups-card);
	box-shadow: var(--bwups-shadow-float);
	pointer-events: auto;
	transform: translateY(12px) scale(.99);
	transition: transform .16s ease;
}

.bwups-dialog.is-open .bwups-dialog__panel {
	transform: none;
}

.bwups-dialog__body {
	max-height: min(640px, calc(100vh - 36px));
	max-height: min(640px, calc(100dvh - 36px));
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 18px;
	scrollbar-gutter: stable;
}

.bwups-dialog__close {
	position: absolute;
	z-index: 2;
	top: 11px;
	right: 11px;
	display: grid;
	place-items: center;
	width: 32px !important;
	height: 32px !important;
	min-height: 32px !important;
	padding: 0 !important;
	border: 1px solid var(--bwups-line) !important;
	border-radius: 50% !important;
	background: var(--bwups-ivory) !important;
	color: var(--bwups-heading) !important;
	font: inherit;
	font-size: 1.12rem !important;
	line-height: 1 !important;
	box-shadow: none !important;
	cursor: pointer;
}

.bwups-dialog__close:hover {
	border-color: var(--bwups-sage-deep) !important;
	background: var(--bwups-sage-tint) !important;
	color: var(--bwups-focus) !important;
}

.bwups-dialog__header,
.bwups-dialog__header--identity {
	padding-right: 38px;
}

.bwups-dialog__header h2,
.bwups-dialog__header--identity .bwups-identity__copy h2 {
	margin: 0 !important;
	color: var(--bwups-heading) !important;
	font-size: 1rem !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
}

.bwups-dialog__header p,
.bwups-dialog__header--identity .bwups-identity__subtitle {
	margin: 2px 0 0;
	color: var(--bwups-muted);
	font-size: .73rem;
	font-weight: 600;
	line-height: 1.4;
}

.bwups-quick-progress {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 9px;
	margin: 13px 0 16px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

.bwups-quick-progress > div {
	display: contents;
}

.bwups-quick-progress .bwups-progress__track {
	height: 5px;
}

.bwups-quick-progress span,
.bwups-quick-progress__score {
	color: var(--bwups-muted);
	font-size: .7rem;
	font-weight: 700;
}

.bwups-quick-form__grid {
	grid-template-columns: 1fr;
	gap: 14px;
}

.bwups-quick-form__step {
	display: grid;
	gap: 13px;
	min-width: 0;
}

.bwups-dialog .bwups-profile-field {
	gap: 8px;
}

.bwups-dialog .bwups-profile-field > label {
	font-size: .9rem !important;
	line-height: 1.42 !important;
}

.bwups-dialog .bwups-multiselect-ui {
	max-width: 100%;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bwups-dialog .bwups-multiselect-choice {
	min-height: 42px !important;
	padding: 8px 9px !important;
	font-size: .76rem !important;
}

.bwups-dialog .bwups-repeater {
	max-width: 100%;
}

.bwups-dialog .bwups-repeater__row {
	grid-template-columns: 68px minmax(0, 1fr) 38px;
	max-width: 100%;
}

.bwups-dialog .bwups-repeater__row:not(:has(.bwups-repeater__remove)) {
	grid-template-columns: 68px minmax(0, 1fr);
	max-width: 100%;
}

.bwups-dialog .bwups-repeater__remove {
	width: 38px !important;
	height: 42px !important;
	min-height: 42px !important;
}

.bwups-dialog__footer {
	position: sticky;
	bottom: -18px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 9px;
	margin: 17px -18px -18px;
	padding: 12px 18px;
	border-top: 1px solid var(--bwups-line);
	background: rgba(255,255,255,.97);
	backdrop-filter: blur(8px);
}

.bwups-dialog__footer-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.bwups-dialog__remaining {
	margin-right: auto;
	color: var(--bwups-muted);
	font-size: .7rem;
	line-height: 1.4;
}

.bwups-dialog__account-link {
	color: var(--bwups-heading);
	font-size: .76rem;
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.bwups-quick-skip {
	appearance: none !important;
	min-height: 42px !important;
	padding: 8px 13px !important;
	border: 1px solid var(--bwups-line-strong) !important;
	border-radius: var(--bwups-pill) !important;
	background: #fff !important;
	color: var(--bwups-heading) !important;
	font-family: "Mulish", system-ui, sans-serif !important;
	font-size: .78rem !important;
	font-weight: 700 !important;
	box-shadow: none !important;
	cursor: pointer;
}

.bwups-quick-skip:hover {
	border-color: var(--bwups-sage-deep) !important;
	background: var(--bwups-sage-tint) !important;
	color: var(--bwups-focus) !important;
}

.bwups-quick-errors,
.bwups-quick-notice {
	margin-bottom: 13px;
	padding: 10px 12px;
	border: 1px solid var(--bwups-line);
	border-radius: 11px;
	font-size: .76rem;
	line-height: 1.45;
}

.bwups-quick-errors {
	border-color: var(--bwups-error-line);
	background: var(--bwups-error-bg);
	color: #7E3232;
}

.bwups-quick-errors ul {
	margin: 6px 0 0 18px;
}

.bwups-quick-notice--success {
	border-color: rgba(138,170,128,.34);
	background: var(--bwups-sage-tint);
	color: var(--bwups-focus);
}

.bwups-dialog__loading,
.bwups-quick-complete {
	display: grid;
	justify-items: center;
	gap: 11px;
	padding: 32px 14px;
	text-align: center;
}

.bwups-dialog__loading p,
.bwups-quick-complete p {
	margin: 0;
	color: var(--bwups-muted);
	font-size: .8rem;
	line-height: 1.45;
}

.bwups-spinner {
	width: 30px;
	height: 30px;
	border: 3px solid rgba(168,195,160,.34);
	border-top-color: var(--bwups-heading);
	border-radius: 50%;
	animation: bwups-spin .75s linear infinite;
}

.bwups-quick-complete {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	padding: 13px 0 3px;
	text-align: left;
}

.bwups-quick-complete > span {
	display: grid;
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	place-items: center;
	border-radius: 50%;
	background: var(--bwups-sage-tint);
	color: var(--bwups-focus);
	font-size: 1rem;
	font-weight: 800;
}

.bwups-quick-complete h3 {
	margin: 0 0 4px !important;
	font-size: .98rem;
}

.bwups-quick-complete--error > span {
	display: none;
}

@keyframes bwups-spin {
	to { transform: rotate(360deg); }
}

/* ========================================================================== 
   MATCHED PRODUCTS WRAPPER
   ========================================================================== */

.bwups-matched-products {
	width: 100%;
	min-width: 0;
}

.bwups-matched-products__header {
	display: grid;
	gap: 5px;
	margin-bottom: clamp(18px, 3vw, 26px);
}

.bwups-matched-products__header span {
	color: var(--bwups-heading);
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.bwups-matched-products__header h2 {
	margin: 0;
	font-size: clamp(1.3rem, 2.5vw, 1.8rem);
	font-weight: 600;
	line-height: 1.3;
}

.bwups-matched-products ul.products {
	margin-top: 0;
	margin-bottom: 0;
}

.bwups-matched-products:focus-within {
	scroll-margin-top: 24px;
}

/* ========================================================================== 
   ADMINISTRATOR TEST MODE
   Floating test-layer z-index is managed in goodmums-z-index.css.
   ========================================================================== */

.bwups-test-launcher {
	position: fixed;
	right: 18px;
	bottom: 18px;
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: calc(100vw - 24px);
	max-width: calc(100dvw - 24px);
	padding: 8px;
	border: 1px solid var(--bwups-line-strong);
	border-radius: 13px;
	background: rgba(255,255,255,.98);
	box-shadow: var(--bwups-shadow-card);
	backdrop-filter: blur(8px);
}

.bwups-test-launcher__badge {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	padding: 5px 9px;
	border-radius: 8px;
	background: var(--bwups-heading);
	color: var(--bwups-ivory);
	font-size: .67rem;
	font-weight: 800;
	letter-spacing: .07em;
}

.bwups-test-launcher__button,
.bwups-test-launcher__link {
	appearance: none;
	min-height: 32px;
	padding: 6px 10px;
	border: 1px solid var(--bwups-line-strong);
	border-radius: 9px;
	background: #fff;
	color: var(--bwups-ink);
	font: inherit;
	font-size: .75rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.bwups-test-launcher__button:hover,
.bwups-test-launcher__button:focus,
.bwups-test-launcher__link:hover,
.bwups-test-launcher__link:focus {
	border-color: var(--bwups-sage-deep);
	background: var(--bwups-sage-tint);
	color: var(--bwups-focus);
}

.bwups-dialog--test {
	inset: auto 18px 76px auto;
	width: min(440px, calc(100vw - 36px));
	width: min(440px, calc(100dvw - 36px));
	max-width: calc(100vw - 36px);
	max-width: calc(100dvw - 36px);
}

.bwups-dialog--test .bwups-dialog__panel {
	border-color: var(--bwups-line-strong);
}

.bwups-test-note {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: -2px 38px 13px 0;
	padding: 7px 9px;
	border: 1px solid var(--bwups-line);
	border-radius: 9px;
	background: var(--bwups-ivory);
	color: var(--bwups-muted);
	font-size: .7rem;
	line-height: 1.35;
}

.bwups-test-note strong {
	flex: 0 0 auto;
	color: var(--bwups-heading);
	font-size: .68rem;
	letter-spacing: .03em;
	text-transform: uppercase;
}

.bwups-test-complete .bwups-quick-submit {
	margin-top: 9px;
}

.bwups-profile--test {
	position: relative;
	border: 1px solid var(--bwups-line-strong);
}

.bwups-test-profile-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin: -6px -6px 22px;
	padding: 12px 14px;
	border: 1px solid var(--bwups-line);
	border-radius: 13px;
	background: var(--bwups-ivory);
}

.bwups-test-profile-banner > div {
	display: grid;
	gap: 2px;
}

.bwups-test-profile-banner strong {
	color: var(--bwups-heading);
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .05em;
	text-transform: uppercase;
}

.bwups-test-profile-banner span {
	color: var(--bwups-muted);
	font-size: .78rem;
	line-height: 1.45;
}

.bwups-test-profile-notice {
	margin: 0 0 18px;
	padding: 10px 12px;
	border: 1px solid var(--bwups-line);
	border-radius: 11px;
	font-size: .8rem;
	line-height: 1.5;
}

.bwups-test-profile-notice.is-success {
	background: var(--bwups-sage-tint);
	color: var(--bwups-focus);
}

.bwups-test-profile-notice.is-error {
	border-color: var(--bwups-error-line);
	background: var(--bwups-error-bg);
	color: #7E3232;
}

.bwups-test-profile-notice ul {
	margin: 7px 0 0 18px;
}

/* ========================================================================== 
   RESPONSIVE
   ========================================================================== */

@media (max-width: 780px) {
	.bwups-profile {
		max-width: 100%;
		padding: 20px;
		border-radius: 17px;
	}

	.bwups-profile__header,
	.bwups-profile__header--identity {
		grid-template-columns: 1fr;
		gap: 13px;
		align-items: start;
	}

	.bwups-profile__score {
		grid-template-columns: auto auto;
		align-items: baseline;
		justify-content: center;
		gap: 6px;
		width: max-content;
		min-width: 0;
	}

	.bwups-profile__score span {
		margin: 0;
	}

	.bwups-profile-form__grid,
	.bwups-quick-form__grid {
		grid-template-columns: 1fr;
		column-gap: 0;
		row-gap: 16px;
	}

	.bwups-profile-field--wide {
		grid-column: auto;
	}

	.bwups-profile-form__footer {
		align-items: stretch;
		flex-direction: column;
		gap: 13px;
	}

	.bwups-profile .bwups-profile-form__submit {
		width: 100% !important;
	}

	.bwups-alert {
		align-items: stretch;
		flex-direction: column;
		gap: 11px;
	}

	.bwups-alert__actions {
		justify-content: space-between;
	}

	.bwups-alert__button {
		flex: 1;
	}

	.bwups-dialog {
		inset: auto 12px calc(12px + env(safe-area-inset-bottom)) auto;
		width: calc(100vw - 24px);
		width: calc(100dvw - 24px);
		max-width: calc(100vw - 24px);
		max-width: calc(100dvw - 24px);
	}

	.bwups-dialog__panel,
	.bwups-dialog__body {
		max-height: calc(100vh - 24px - env(safe-area-inset-bottom));
		max-height: calc(100dvh - 24px - env(safe-area-inset-bottom));
	}

	.bwups-dialog__panel {
		border-width: 1px;
		border-radius: 17px;
	}

	.bwups-dialog__body {
		padding: 17px 16px calc(17px + env(safe-area-inset-bottom));
	}

	.bwups-dialog__footer {
		bottom: calc((17px + env(safe-area-inset-bottom)) * -1);
		margin: 16px -16px calc((17px + env(safe-area-inset-bottom)) * -1);
		padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
	}

	.bwups-dialog__footer-actions {
		width: 100%;
	}

	.bwups-dialog__footer-actions > * {
		flex: 1;
	}

	.bwups-dialog__remaining {
		display: none;
	}

	.bwups-test-launcher {
		right: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom));
		left: 12px;
		justify-content: center;
		flex-wrap: wrap;
	}

	.bwups-dialog--test {
		inset: auto 12px calc(86px + env(safe-area-inset-bottom));
		width: calc(100vw - 24px);
		width: calc(100dvw - 24px);
	}
}

@media (max-width: 560px) {
	.bwups-profile {
		padding: 18px 16px;
	}

	.bwups-profile-section {
		margin-top: 20px;
		padding-top: 20px;
	}

	.bwups-profile-section__heading {
		align-items: stretch;
		flex-direction: column;
		gap: 9px;
	}

	.bwups-multiselect-ui,
	.bwups-dialog .bwups-multiselect-ui {
		grid-template-columns: 1fr;
		max-width: 100%;
	}

	.bwups-repeater__row,
	.bwups-repeater__row:not(:has(.bwups-repeater__remove)),
	.bwups-dialog .bwups-repeater__row,
	.bwups-dialog .bwups-repeater__row:not(:has(.bwups-repeater__remove)) {
		grid-template-columns: minmax(0, 1fr) 40px;
		gap: 6px 8px;
		max-width: 100%;
	}

	.bwups-repeater__row-label,
	.bwups-dialog .bwups-repeater__row-label {
		grid-column: 1 / -1;
	}

	.bwups-repeater__row > [data-bwups-control],
	.bwups-dialog .bwups-repeater__row > [data-bwups-control] {
		grid-column: 1;
	}

	.bwups-repeater__row:not(:has(.bwups-repeater__remove)) > [data-bwups-control],
	.bwups-dialog .bwups-repeater__row:not(:has(.bwups-repeater__remove)) > [data-bwups-control] {
		grid-column: 1 / -1;
	}

	.bwups-repeater__remove,
	.bwups-dialog .bwups-repeater__remove {
		grid-column: 2;
		grid-row: 2;
	}

	.bwups-dialog__footer {
		align-items: stretch;
		flex-direction: column;
	}

	.bwups-test-profile-banner {
		align-items: flex-start;
		flex-direction: column;
	}
}

@media (max-width: 380px) {
	.bwups-profile {
		padding-inline: 14px;
		border-radius: 15px;
	}

	.bwups-dialog {
		inset-inline: 8px;
		bottom: calc(8px + env(safe-area-inset-bottom));
		width: auto;
		max-width: none;
	}

	.bwups-dialog__body {
		padding-inline: 14px;
	}

	.bwups-dialog__footer {
		margin-inline: -14px;
		padding-inline: 14px;
	}
}

@media (max-height: 560px) and (orientation: landscape) {
	.bwups-dialog {
		right: 8px;
		bottom: 8px;
		width: min(440px, calc(100dvw - 16px));
	}

	.bwups-dialog__panel,
	.bwups-dialog__body {
		max-height: calc(100dvh - 16px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.bwups-profile *,
	.bwups-profile *::before,
	.bwups-profile *::after,
	.bwups-profile-progress *,
	.bwups-alert-wrap *,
	.bwups-dialog,
	.bwups-dialog *,
	.bwups-dialog *::before,
	.bwups-dialog *::after,
	.bwups-multiselect-choice,
	.bwups-test-launcher * {
		scroll-behavior: auto !important;
		transition: none !important;
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
	}
}
