/**
 * Turn On — Tax Display Toggle
 * --------------------------------------------------------------
 * Styles for the "Show prices incl. / excl. VAT" switch that is
 * injected into the site header (see functions.php ->
 * turn_on_inject_tax_toggle_into_header()).
 *
 * Colors reuse the theme's existing palette (theme.json):
 *   accent  #3cb371   border  #e8e4da   text  #1a1a1a
 */

/* Push all page content below the fixed VAT bar */
body {
	padding-top: 42px;
}

.toh-tax-toggle-bar {
	background: #0b2545;
	border-bottom: 1px solid rgba(255,255,255,0.1);
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9997;
}

/* Push VAT bar below WP admin bar when logged in */
.admin-bar .toh-tax-toggle-bar {
	top: 32px;
}
@media screen and (max-width: 782px) {
	.admin-bar .toh-tax-toggle-bar { top: 46px; }
}

.toh-tax-toggle-inner {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	min-height: 34px;
	padding-top: 4px;
	padding-bottom: 4px;
}

.toh-tax-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	user-select: none;
}

.toh-tax-toggle__label {
	font-size: 12.5px;
	font-weight: 500;
	color: #ffffff;
	white-space: nowrap;
}

.toh-tax-toggle__switch {
	position: relative;
	display: inline-flex;
	align-items: center;
}

/* Hide the real checkbox but keep it accessible/focusable */
.toh-tax-toggle__input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.toh-tax-toggle__track {
	width: 36px;
	height: 20px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.25);
	border: 1px solid rgba(255, 255, 255, 0.35);
	transition: background-color 0.18s ease, border-color 0.18s ease;
	position: relative;
	flex-shrink: 0;
}

.toh-tax-toggle__thumb {
	position: absolute;
	top: 1px;
	left: 1px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
	transition: transform 0.18s ease;
}

/* Checked (incl. VAT) state */
.toh-tax-toggle__input:checked ~ .toh-tax-toggle__track {
	background: #3cb371;
	border-color: #3cb371;
}

.toh-tax-toggle__input:checked ~ .toh-tax-toggle__track .toh-tax-toggle__thumb {
	transform: translateX(16px);
}

.toh-tax-toggle__input:focus-visible ~ .toh-tax-toggle__track {
	outline: 2px solid #cd9939;
	outline-offset: 2px;
}

/* Mobile: keep it compact so it doesn't crowd the hamburger/logo row below */
@media (max-width: 480px) {
	.toh-tax-toggle__label {
		font-size: 11.5px;
	}
	.toh-tax-toggle-inner {
		justify-content: center;
	}
}
