/**
 * ThemeFlow — Price Table (scoped frontend styles).
 *
 * Everything is scoped under .themeflow-price-table so nothing leaks into
 * Elementor core/Pro or other widgets. Safe for multiple instances. Logical
 * properties are used for spacing so RTL works without overrides.
 */

.themeflow-price-table {
	display: flex;
	flex-direction: column;
	gap: 18px;
	position: relative;
	text-align: center;
	border: 0 solid transparent;
	transition: background-color 200ms ease, border-color 200ms ease,
		box-shadow 200ms ease;
}

/* Visually hidden but available to screen readers (scoped, self-contained). */
.themeflow-price-table .themeflow-pt__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --- Badge --------------------------------------------------------------- */
/* The wrapper is the flex item (so Layout ▸ Element Order can move it and the
 * card alignment applies); the inner span hugs its own text. */
.themeflow-price-table .themeflow-pt__badge-wrap {
	min-width: 0;
}

.themeflow-price-table .themeflow-pt__badge {
	display: inline-flex;
	align-items: center;
	column-gap: 6px;
	padding: 5px 12px;
	border: 0 solid transparent;
	border-radius: 999px;
	background-color: #f59e0b;
	color: #ffffff;
	font-size: 0.72em;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.4;
	text-transform: uppercase;
	white-space: nowrap;
}

.themeflow-price-table .themeflow-pt__badge-icon {
	display: inline-flex;
	line-height: 1;
}

.themeflow-price-table .themeflow-pt__badge-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* Floating badge: lifted out of the flex flow onto the card corner. Offsets come
 * from Elementor controls as custom properties so one rule serves every corner. */
.themeflow-price-table .themeflow-pt__badge-wrap.is-floating {
	position: absolute;
	top: var(--themeflow-pt-badge-y, -12px);
	z-index: 2;
	width: auto;
	margin: 0;
}

.themeflow-price-table .themeflow-pt__badge-wrap.is-floating.is-side-start {
	inset-inline-start: var(--themeflow-pt-badge-x, 16px);
}

.themeflow-price-table .themeflow-pt__badge-wrap.is-floating.is-side-end {
	inset-inline-end: var(--themeflow-pt-badge-x, 16px);
}

.themeflow-price-table .themeflow-pt__badge-wrap.is-floating.is-side-center {
	inset-inline-start: 50%;
	transform: translateX(-50%);
}

/* --- Plan (name, subtitle, license duration) ----------------------------- */
.themeflow-price-table .themeflow-pt__name {
	margin: 0;
	line-height: 1.2;
}

.themeflow-price-table .themeflow-pt__subtitle {
	line-height: 1.4;
	opacity: 0.8;
}

/* Wrapper is the flex item; the duration itself hugs its text so its optional
 * background reads as a pill rather than a full-width bar. */
.themeflow-price-table .themeflow-pt__duration-wrap {
	min-width: 0;
}

.themeflow-price-table .themeflow-pt__duration {
	display: inline-block;
	line-height: 1.4;
	opacity: 0.8;
}

/* --- Site selector ------------------------------------------------------- */
.themeflow-price-table .themeflow-pt__selector-label {
	display: block;
	margin-block-end: 8px;
	font-weight: 600;
}

.themeflow-price-table .themeflow-pt__tabs {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	gap: 8px;
}

.themeflow-price-table .themeflow-pt__tab {
	margin: 0;
	padding: 10px 16px;
	border: 0 solid transparent;
	border-radius: 6px;
	background-color: rgba(0, 0, 0, 0.05);
	color: inherit;
	font: inherit;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	transition: background-color 200ms ease, color 200ms ease,
		border-color 200ms ease;
}

.themeflow-price-table .themeflow-pt__select {
	max-width: 100%;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 6px;
	background-color: transparent;
	color: inherit;
	font: inherit;
	line-height: 1.2;
	cursor: pointer;
}

/* Visible keyboard focus on every interactive element. */
.themeflow-price-table .themeflow-pt__tab:focus-visible,
.themeflow-price-table .themeflow-pt__select:focus-visible,
.themeflow-price-table .themeflow-pt__cta:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* --- Price --------------------------------------------------------------- */
.themeflow-price-table .themeflow-pt__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 8px;
}

.themeflow-price-table .themeflow-pt__amount {
	display: inline-block;
	line-height: 1.1;
}

.themeflow-price-table .themeflow-pt__amount--current {
	font-size: 2.5em;
	font-weight: 700;
}

.themeflow-price-table .themeflow-pt__amount--original {
	font-size: 1.25em;
	opacity: 0.6;
	text-decoration: line-through;
}

.themeflow-price-table .themeflow-pt__currency {
	font-size: 0.6em;
	vertical-align: super;
}

.themeflow-price-table .themeflow-pt__period {
	opacity: 0.7;
}

/* --- Allowed sites ------------------------------------------------------- */
.themeflow-price-table .themeflow-pt__sites {
	line-height: 1.4;
	opacity: 0.85;
}

/* --- Features ------------------------------------------------------------ */
.themeflow-price-table .themeflow-pt__features {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.themeflow-price-table .themeflow-pt__feature {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	justify-content: flex-start;
	column-gap: 8px;
	margin: 0;
	text-align: start;
}

.themeflow-price-table .themeflow-pt__feature-icon {
	display: inline-flex;
	flex: 0 0 auto;
	line-height: 1.4;
	color: #16a34a;
}

.themeflow-price-table .themeflow-pt__feature-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.themeflow-price-table .themeflow-pt__feature.is-excluded {
	opacity: 0.55;
}

.themeflow-price-table .themeflow-pt__feature.is-excluded .themeflow-pt__feature-icon {
	color: #9ca3af;
}

.themeflow-price-table .themeflow-pt__feature-text {
	line-height: 1.4;
}

/* --- CTA ----------------------------------------------------------------- */
.themeflow-price-table .themeflow-pt__cta-wrap {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: stretch;
	margin-block-start: auto;
}

.themeflow-price-table .themeflow-pt__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	column-gap: 8px;
	padding: 14px 24px;
	border: 0 solid transparent;
	border-radius: 6px;
	background-color: #1f2937;
	color: #ffffff;
	font: inherit;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 200ms ease, color 200ms ease,
		border-color 200ms ease, box-shadow 200ms ease;
}

/* No URL configured for the selected option — inert, not misleading. */
.themeflow-price-table .themeflow-pt__cta.is-disabled {
	cursor: not-allowed;
	opacity: 0.6;
	pointer-events: none;
}

.themeflow-price-table .themeflow-pt__cta-icon {
	display: inline-flex;
	line-height: 1;
}

.themeflow-price-table .themeflow-pt__cta-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* --- Editor-only empty state --------------------------------------------- */
.themeflow-pt__empty {
	padding: 24px;
	border: 1px dashed currentColor;
	opacity: 0.7;
	text-align: center;
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 767px) {
	/* Tabs stack so long labels stay readable on narrow screens. */
	.themeflow-price-table .themeflow-pt__tabs {
		flex-direction: column;
	}

	.themeflow-price-table .themeflow-pt__tab {
		width: 100%;
	}
}

/* --- Utility: JS-toggled visibility -------------------------------------
 * Declared last and with a class on BOTH sides of the descendant combinator so
 * it outranks the component `display` rules above (which are equally specific
 * at 0-2-0 and would otherwise win on source order — that is what previously
 * left the hidden regular price showing a stray currency symbol).
 */
.themeflow-price-table .themeflow-pt__amount.is-hidden,
.themeflow-price-table .themeflow-pt__sites.is-hidden,
.themeflow-price-table .is-hidden {
	display: none;
}

/* --- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	.themeflow-price-table,
	.themeflow-price-table .themeflow-pt__tab,
	.themeflow-price-table .themeflow-pt__cta {
		transition-duration: 1ms !important;
	}
}
