/**
 * Flavors Pricing Switcher - base layout, toggle & card styling.
 * Per-instance values (columns, gap, colors, spacing, featured scale, dividers)
 * are injected by Elementor control `selectors` as CSS custom properties /
 * scoped rules, so this file stays static and HTTP-cacheable (no per-render
 * inline <style>). The .flavor-ps-yearly state class is toggled by the JS.
 */

.flavor-pricing-switcher {
	--flavor-ps-featured-scale: 1.05;
}

/* ------------------------------------------------------------------ Toggle */
.flavor-ps-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 32px;
}

.flavor-ps-toggle-label {
	line-height: 1.2;
	transition: color .2s ease;
	cursor: pointer;
}

.flavor-ps-switch {
	display: inline-flex;
	align-items: center;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	cursor: pointer;
	line-height: 0;
	-webkit-appearance: none;
	appearance: none;
}

.flavor-ps-switch:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
	border-radius: 999px;
}

.flavor-ps-track {
	position: relative;
	display: block;
	width: 52px;
	height: 28px;
	border-radius: 999px;
	background-color: #d5d8dc;
	transition: background-color .25s ease;
}

.flavor-ps-knob {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background-color: #2271b1;
	transition: transform .25s ease;
}

.flavor-pricing-switcher.flavor-ps-yearly .flavor-ps-knob {
	transform: translateX(24px);
}

.flavor-ps-discount {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 20px;
	background-color: #2271b1;
	color: #fff;
	font-size: 13px;
	line-height: 1.4;
	white-space: nowrap;
}

/* -------------------------------------------------------------------- Grid */
.flavor-ps-grid {
	display: grid;
	grid-template-columns: repeat(var(--flavor-ps-columns, 3), minmax(0, 1fr));
	gap: var(--flavor-ps-gap, 24px);
	align-items: stretch;
}

/* -------------------------------------------------------------------- Card */
.flavor-ps-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background-color: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 14px;
	transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.flavor-ps-card.is-featured {
	transform: scale(var(--flavor-ps-featured-scale, 1.05));
	z-index: 1;
}

/* Badge (per-plan) */
.flavor-ps-badge {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translate(-50%, -50%);
	padding: 4px 14px;
	border-radius: 20px;
	background-color: #2271b1;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: .02em;
	white-space: nowrap;
}

/* Head: name + price */
.flavor-ps-head {
	text-align: center;
}

.flavor-ps-name {
	margin-bottom: 12px;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.2;
	color: #1d2327;
}

.flavor-ps-pricing {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 2px;
}

.flavor-ps-currency {
	font-size: 22px;
	font-weight: 600;
	line-height: 1;
}

.flavor-ps-price {
	font-size: 44px;
	font-weight: 700;
	line-height: 1;
	color: #1d2327;
}

.flavor-ps-suffix {
	font-size: 15px;
	color: #8a8f98;
}

/* Features */
.flavor-ps-features {
	list-style: none;
	margin: 24px 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--flavor-ps-feature-gap, 10px);
	text-align: left;
}

.flavor-ps-features li {
	position: relative;
	padding-left: 26px;
	line-height: 1.5;
	color: #50575e;
}

.flavor-ps-features li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: 0;
	color: #2271b1;
	font-weight: 700;
}

/* Optional dividers between feature rows */
.flavor-ps-divider-yes .flavor-ps-features li + li {
	margin-top: var(--flavor-ps-feature-gap, 10px);
	padding-top: var(--flavor-ps-feature-gap, 10px);
	border-top: 1px solid var(--flavor-ps-divider, #eceef0);
}

/* Button */
.flavor-ps-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: auto;
	width: 100%;
	text-align: center;
	text-decoration: none;
	line-height: 1.2;
	background-color: #2271b1;
	color: #fff;
	border-radius: 8px;
	padding: 14px 24px;
	transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

/* ---------------------------------------------------------- Responsive */
@media (max-width: 1024px) {
	.flavor-ps-grid {
		grid-template-columns: repeat(var(--flavor-ps-columns-tablet, 2), minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.flavor-ps-grid {
		grid-template-columns: repeat(var(--flavor-ps-columns-mobile, 1), minmax(0, 1fr));
	}

	.flavor-ps-card.is-featured {
		transform: none;
	}
}
