/* Firmenkunden & CHF – front end. Sizes in rem so they follow the visitor's font size. */

.bbfc-dialog-backdrop {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	overflow-y: auto; /* Large zoom: the dialog scrolls instead of being cut off. */
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	background: rgba(0, 0, 0, 0.55);
}

.bbfc-dialog-backdrop[hidden] {
	display: none;
}

.bbfc-dialog {
	position: relative;
	width: 100%;
	max-width: 30rem;
	margin: auto; /* Never clips the top when taller than the viewport. */
	padding: 28px 24px 24px;
	background: #fff;
	color: #1e1e1e;
	border-radius: 0;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	font-size: 1.125rem;
	line-height: 1.5;
}

.bbfc-dialog:focus {
	outline: none;
}

.bbfc-dialog__title {
	margin: 0 2.5rem 0.75rem 0;
	font-size: 1.35em;
	line-height: 1.3;
}

.bbfc-dialog__small {
	font-size: 0.85em;
	color: #3c3c3c;
}

.bbfc-dialog__error:empty {
	display: none;
}

.bbfc-dialog__error {
	color: #b32d2e;
	font-weight: 600;
}

.bbfc-dialog__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 20px;
}

.bbfc-dialog__actions form {
	margin: 0;
}

/* Square corners throughout the dialog, also for theme button styles. */
.bbfc-dialog .bbfc-btn,
.bbfc-dialog .bbfc-dialog__close,
.bbfc-dialog button:focus-visible {
	border-radius: 0;
}

.bbfc-btn {
	min-height: 48px;
	padding: 10px 18px;
	font-size: 1em;
	cursor: pointer;
}

/* Own colours (theme accent), so WooCommerce's purple ".button.alt" on shop pages does not apply. */
.bbfc-dialog .bbfc-dialog__actions .bbfc-btn {
	border: 2px solid var(--accent, #387d9f);
	background: #fff;
	color: var(--accent, #387d9f);
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	text-transform: none;
	transition: background-color 0.15s, color 0.15s;
}

.bbfc-dialog .bbfc-dialog__actions .bbfc-btn.bbfc-btn--primary {
	background: var(--accent, #387d9f);
	color: #fff;
}

.bbfc-dialog .bbfc-dialog__actions .bbfc-btn:hover,
.bbfc-dialog .bbfc-dialog__actions .bbfc-btn:focus-visible {
	background: #2c6480;
	border-color: #2c6480;
	color: #fff;
}

/* Busy while the new currency is loaded. */
.bbfc-btn--busy::after,
.bbfc-switcher__btn.bbfc-btn--busy::after {
	content: "";
	display: inline-block;
	width: 0.9em;
	height: 0.9em;
	margin-left: 0.5em;
	vertical-align: -0.1em;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: bbfc-spin 0.7s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
	.bbfc-btn--busy::after {
		animation-duration: 2s;
	}
}

.bbfc-btn[aria-disabled="true"] {
	opacity: 0.7;
	cursor: progress;
}

.bbfc-dialog__close-form {
	position: absolute;
	top: 8px;
	right: 8px;
	margin: 0;
}

.bbfc-dialog .bbfc-dialog__close {
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #1e1e1e;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.bbfc-dialog button:focus-visible {
	outline: 3px solid #1a5fb4;
	outline-offset: 2px;
}

html.bbfc-dialog-open {
	overflow: hidden;
}

@media (max-height: 520px), (max-width: 480px) {
	.bbfc-dialog-backdrop {
		align-items: flex-start;
		padding: 8px;
	}

	.bbfc-dialog {
		padding: 20px 16px 16px;
	}

	.bbfc-dialog__actions form,
	.bbfc-dialog__actions .bbfc-btn {
		width: 100%;
	}
}

.bbfc-noscript-prompt {
	max-width: 40rem;
	margin: 16px auto;
	padding: 16px;
	border: 2px solid #1e1e1e;
	background: #fff;
	color: #1e1e1e;
}

/* Floating switcher */

html {
	scroll-padding-bottom: 56px;
}

.bbfc-switcher-float {
	position: fixed;
	left: 12px;
	bottom: 12px;
	z-index: 9990;
}

@media (max-width: 480px), (max-height: 480px) {
	.bbfc-switcher-float {
		position: static;
		padding: 8px 16px;
	}

	/* Only as wide as its two buttons, so floating buttons of other plugins do not cover it. */
	.bbfc-switcher-float .bbfc-switcher ul {
		display: inline-flex;
	}

	html {
		scroll-padding-bottom: 0;
	}
}

.bbfc-switcher ul {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
	border: 1px solid #767676;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.bbfc-switcher li,
.bbfc-switcher form {
	margin: 0;
}

/* Compact, but above the 24 × 24 px minimum target size (WCAG 2.5.8). */
.bbfc-switcher .bbfc-switcher__btn {
	min-width: 40px;
	min-height: 32px;
	padding: 4px 8px;
	border: 0;
	border-radius: 3px;
	background: #fff;
	color: #1e1e1e;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
}

/* Touch screens: comfortable 44 px targets. */
@media (pointer: coarse) {
	.bbfc-switcher .bbfc-switcher__btn {
		min-width: 52px;
		min-height: 44px;
	}
}

/* Link variant (Swiss domain): same look as the buttons. */
a.bbfc-switcher__btn,
span.bbfc-switcher__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	text-decoration: none;
}

a.bbfc-btn {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.bbfc-switcher .bbfc-switcher__btn:hover,
.bbfc-switcher .bbfc-switcher__btn:focus {
	background: #e8e8e8;
	color: #1e1e1e;
}

.bbfc-switcher .bbfc-switcher__btn.is-active,
.bbfc-switcher .bbfc-switcher__btn.is-active:hover,
.bbfc-switcher .bbfc-switcher__btn.is-active:focus {
	background: #1e1e1e;
	color: #fff;
}

/* Non-colour cue for the active currency. */
.bbfc-switcher .bbfc-switcher__btn.is-active {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bbfc-switcher .bbfc-switcher__btn:focus-visible {
	outline: 3px solid #1a5fb4;
	outline-offset: -5px;
}

.bbfc-switcher .bbfc-switcher__btn.is-active:focus-visible {
	outline-color: #fff;
}

@media (forced-colors: active) {
	.bbfc-switcher ul {
		border-color: CanvasText;
	}

	.bbfc-switcher .bbfc-switcher__btn.is-active {
		forced-color-adjust: none;
		background: Highlight;
		color: HighlightText;
	}
}

.bbfc-sim,
.bbfc-notice {
	display: block;
	max-width: calc(100vw - 16px);
	margin: 0 auto;
	padding: 6px 14px;
	color: #1e1e1e;
	font-size: 0.875rem;
	text-align: center;
}

.bbfc-sim {
	background: #fcf0a3;
	border-bottom: 1px solid #c9b000;
}

.bbfc-sim a {
	color: #1e1e1e;
	text-decoration: underline;
}

.bbfc-notice {
	background: #f0f0f0;
	border-bottom: 1px solid #767676;
}

.bbfc-order-meta p {
	margin: 0.5em 0;
	font-size: 0.9em;
}

.bbfc-vat-message--invalid {
	color: #b32d2e;
	font-weight: 600;
}

.bbfc-business__details[hidden] {
	display: none;
}

/* ---------- My Account ---------- */

.woocommerce-account .woocommerce-MyAccount-navigation ul {
	margin: 0 0 1.5em;
	padding: 0;
	list-style: none;
	border: 1px solid #d6d6d6;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
	margin: 0;
	border-bottom: 1px solid #e6e6e6;
}

.woocommerce-account .woocommerce-MyAccount-navigation li:last-child {
	border-bottom: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 0.7em 1em;
	border-left: 4px solid transparent;
	color: inherit;
	text-decoration: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation li a:focus-visible {
	background: #f4f4f4;
	text-decoration: underline;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
	border-left-color: currentColor;
	background: #f4f4f4;
	font-weight: 600;
}

.bbfc-intro {
	max-width: 42em;
}

.bbfc-card {
	margin: 0 0 1.5em;
	padding: 1em 1.25em;
	border: 1px solid #d6d6d6;
	border-left: 4px solid #1e1e1e;
	background: #fafafa;
}

.bbfc-card p {
	margin: 0.4em 0;
}

.bbfc-card__title {
	margin: 0 0 0.5em;
	font-size: 1.05em;
	font-weight: 600;
}

.bbfc-card__hint {
	font-size: 0.95em;
}

.bbfc-card__action {
	margin: 0.75em 0 0;
}

.bbfc-facts {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.35em 1.25em;
	margin: 0;
}

.bbfc-facts dt {
	font-weight: 600;
}

.bbfc-facts dd {
	margin: 0;
	overflow-wrap: anywhere;
}

@media (max-width: 480px) {
	.bbfc-facts {
		grid-template-columns: 1fr;
	}

	.bbfc-facts dd {
		margin-bottom: 0.5em;
	}
}

.bbfc-badge {
	display: inline-block;
	padding: 0.15em 0.55em;
	border: 1px solid currentColor;
	font-size: 0.9em;
	font-weight: 600;
	line-height: 1.4;
}

.bbfc-badge--ok {
	background: #e6f4ea;
	color: #135e2b;
}

.bbfc-badge--warn {
	background: #fff4d6;
	color: #6b4a00;
}

.bbfc-badge--bad {
	background: #fde8e8;
	color: #8a1c1c;
}

.bbfc-badge--none {
	background: #f0f0f0;
	color: #3c3c3c;
}

.bbfc-business--register {
	margin: 1.5em 0;
	padding: 1em 1.25em 0.25em;
	border: 1px solid #d6d6d6;
}

.bbfc-business__legend {
	padding: 0 0.4em;
	font-weight: 600;
}

.bbfc-business--page {
	margin: 0 0 1em;
	padding: 0;
	border: 0;
}

.bbfc-help {
	display: block;
	margin-top: 0.3em;
	font-size: 0.9em;
	color: #3c3c3c;
}

.bbfc-field-error {
	display: block;
	margin-top: 0.3em;
	color: #8a1c1c;
	font-weight: 600;
}

.bbfc-field-error[hidden] {
	display: none;
}

.bbfc-account-form input[aria-invalid="true"],
.woocommerce-form-register input[aria-invalid="true"] {
	border-color: #8a1c1c;
	box-shadow: inset 0 0 0 1px #8a1c1c;
}

.bbfc-vat-input {
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.bbfc-vat-input::placeholder {
	text-transform: none;
	letter-spacing: normal;
}

.bbfc-account-form .button,
.bbfc-card .button {
	border-radius: 0;
}

@media (prefers-reduced-motion: no-preference) {
	.bbfc-dialog {
		animation: bbfc-in 0.15s ease-out;
	}

	@keyframes bbfc-in {
		from {
			opacity: 0;
			transform: translateY(8px);
		}
	}
}

.bbfc-switcher-float[hidden] {
	display: none;
}
