/**
 * LAFU Product Tax Toggle — scoped styles, minimal specificity.
 */

.lafu-ptt-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.75rem;
	margin: var(--lafu-ptt-margin-top, 0.4rem) var(--lafu-ptt-margin-right, 0) var(--lafu-ptt-margin-bottom, 0.65rem) var(--lafu-ptt-margin-left, 0);
	font-size: var(--lafu-ptt-font-size, 0.9em);
	line-height: 1.4;
	color: var(--lafu-ptt-font-color, var(--lafu-ptt-font-auto, inherit));
	font-family: inherit;
}

.lafu-ptt-row-inline {
	display: inline-flex;
	flex-wrap: nowrap;
	margin: 0;
	vertical-align: middle;
}

.lafu-ptt-row[data-lafu-ptt-theme='light'] {
	--lafu-ptt-font-auto: #111111;
	--lafu-ptt-muted: inherit;
	--lafu-ptt-surface: transparent;
	--lafu-ptt-surface-2: transparent;
	--lafu-ptt-border: currentColor;
	--lafu-ptt-accent: currentColor;
	--lafu-ptt-accent-contrast: inherit;
	--lafu-ptt-incl-color: #0f766e;
	--lafu-ptt-excl-color: #0369a1;
}

.lafu-ptt-row[data-lafu-ptt-theme='dark'] {
	--lafu-ptt-font-auto: #ffffff;
	--lafu-ptt-muted: inherit;
	--lafu-ptt-surface: transparent;
	--lafu-ptt-surface-2: transparent;
	--lafu-ptt-border: currentColor;
	--lafu-ptt-accent: currentColor;
	--lafu-ptt-accent-contrast: inherit;
	--lafu-ptt-incl-color: #0f766e;
	--lafu-ptt-excl-color: #0369a1;
}

.lafu-ptt-price-wrap .lafu-ptt-pane[hidden] {
	display: none !important;
}

/* Link style */
.lafu-ptt-style-link .lafu-ptt-link {
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	color: inherit !important;
	text-decoration: underline !important;
	text-underline-offset: 0.12em;
	cursor: pointer;
	transition: color 0.18s ease, opacity 0.18s ease, text-decoration-color 0.18s ease;
}

.lafu-ptt-style-link[data-lafu-ptt-link-decoration='none'] .lafu-ptt-link {
	text-decoration: none !important;
}

.lafu-ptt-style-link.lafu-ptt-has-custom-colors[data-lafu-ptt-mode='incl'] .lafu-ptt-link {
	color: var(--lafu-ptt-excl-color);
}

.lafu-ptt-style-link.lafu-ptt-has-custom-colors[data-lafu-ptt-mode='excl'] .lafu-ptt-link {
	color: var(--lafu-ptt-incl-color);
}

.lafu-ptt-style-link .lafu-ptt-link:hover,
.lafu-ptt-style-link .lafu-ptt-link:focus-visible {
	background: transparent !important;
	color: var(--lafu-ptt-link-hover-color, currentColor) !important;
	opacity: 0.88;
	text-decoration-color: currentColor;
	outline: none;
}

.lafu-ptt-style-link .lafu-ptt-link:focus-visible {
	box-shadow: 0 0 0 2px currentColor;
}

/* Extra note + pipe */
.lafu-ptt-extra-note {
	display: inline-flex;
	align-items: baseline;
	align-self: baseline;
	line-height: inherit;
	vertical-align: baseline;
	color: var(--lafu-ptt-muted);
	opacity: 0.92;
}

.lafu-ptt-row-inline .lafu-ptt-extra-note {
	white-space: nowrap;
}

.lafu-ptt-sep {
	margin-inline-end: 0.5rem;
	color: var(--lafu-ptt-muted);
	font-weight: 300;
}

/* Toggle */
.lafu-ptt-style-toggle {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	gap: 0.5rem;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.lafu-ptt-toggle-track {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	vertical-align: middle;
	line-height: 1;
	padding: 0;
}

.lafu-ptt-toggle {
	position: relative;
	display: inline-block !important;
	vertical-align: middle;
	box-sizing: border-box;
	width: 46px !important;
	height: 26px !important;
	min-width: 46px !important;
	min-height: 26px !important;
	max-width: 46px !important;
	max-height: 26px !important;
	line-height: 0 !important;
	border-radius: 9999px !important;
	border: 1px solid rgba(0, 0, 0, 0.14) !important;
	background: #cfd4da !important;
	padding: 0;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	font: inherit;
	text-indent: -9999px;
	overflow: hidden;
	color: inherit !important;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
	outline: none;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.lafu-ptt-toggle.is-excl-active {
	background: var(--lafu-ptt-excl-color, #0369a1) !important;
	border-color: var(--lafu-ptt-excl-color, #0369a1) !important;
}

.lafu-ptt-toggle-thumb {
	position: absolute;
	top: 2px;
	inset-inline-start: 2px;
	width: 20px !important;
	height: 20px !important;
	border-radius: 9999px !important;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
	transition: transform 0.2s ease;
	pointer-events: none;
}

.lafu-ptt-toggle.is-excl-active .lafu-ptt-toggle-thumb {
	transform: translateX(20px);
}

[dir="rtl"] .lafu-ptt-toggle.is-excl-active .lafu-ptt-toggle-thumb {
	transform: translateX(-20px);
}

.lafu-ptt-toggle-label {
	font-size: 0.95em;
	font-weight: 500;
	white-space: nowrap;
	color: inherit !important;
	line-height: 1.2;
	display: inline-flex;
	align-items: center;
	min-height: 26px;
	margin: 0;
}

.lafu-ptt-style-toggle[data-lafu-ptt-mode='incl'] .lafu-ptt-toggle-label {
	color: inherit;
}

.lafu-ptt-style-toggle[data-lafu-ptt-mode='excl'] .lafu-ptt-toggle-label {
	color: inherit;
}

.lafu-ptt-row-inline .lafu-ptt-style-toggle {
	min-width: 8.8rem;
}

.lafu-ptt-toggle:hover {
	filter: brightness(0.98);
}

.lafu-ptt-toggle:focus-visible {
	outline: 2px solid var(--lafu-ptt-wp-on, #2271b1);
	outline-offset: 2px;
}


/* Pills */
.lafu-ptt-pills {
	display: inline-flex;
	gap: 0.25rem;
}

.lafu-ptt-pill {
	border: 1px solid currentColor;
	background: transparent;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	font: inherit;
	color: inherit !important;
	font-size: 0.85em;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.lafu-ptt-pill.is-active {
	background: transparent;
	border-color: currentColor;
	color: inherit;
}

.lafu-ptt-pill[data-lafu-ptt-set='incl'].is-active {
	background: var(--lafu-ptt-incl-color);
	border-color: var(--lafu-ptt-incl-color);
}

.lafu-ptt-pill[data-lafu-ptt-set='excl'].is-active {
	background: var(--lafu-ptt-excl-color);
	border-color: var(--lafu-ptt-excl-color);
}

.lafu-ptt-pill:not(.is-active):hover {
	background: transparent;
}
