/* ==========================================================================
   TextCRM Pricing Widget
   Mirrors demo-html/pricing.html, with header (eyebrow / title / subtitle)
   styled like the Inner Hero widget and cards styled like the Roles widget
   so the pricing section reads as part of the same design system.
   ========================================================================== */

.textcrm-pricing {
	position: relative;
	width: 100%;
	padding-top: 96px;                /* py-24 */
	padding-bottom: 96px;
	background-color: #0b1326;        /* surface (matches Inner Hero) */
	font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: #f3f4f6;
	-webkit-font-smoothing: antialiased;
	box-sizing: border-box;
	overflow: hidden;

	/* Card tokens — copied from roles-widget.css */
	--tp-card-bg: rgba(255, 255, 255, 0.03);
	--tp-card-border: rgba(255, 255, 255, 0.05);
	--tp-card-border-hover: rgba(0, 245, 160, 0.3);
	--tp-card-radius: 32px;           /* pricing-card specific (rounded-[2rem] in design) */
	--tp-card-padding: 32px;
	--tp-card-blur: 10px;

	--tp-card-icon-size: 48px;
	--tp-card-icon-radius: 16px;
	--tp-card-icon-inner: 24px;

	--tp-feature-icon-size: 20px;

	--tp-popular-scale: 1.05;

	/* Accent — matches Inner Hero / Roles "#00f5a0" brand green. */
	--tp-accent: #00f5a0;

	--tp-transition: 250ms;
}

.textcrm-pricing *,
.textcrm-pricing *::before,
.textcrm-pricing *::after {
	box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Container
   -------------------------------------------------------------------------- */
.textcrm-pricing__container {
	position: relative;
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	padding-left: 24px;
	padding-right: 24px;
}

/* Top hero glow — same teal at 15% as the Solutions CTA glow token
   (--solctas-glow: rgba(68, 226, 205, 0.15)). Sits behind the header. */
.textcrm-pricing__container::before {
	content: "";
	position: absolute;
	top: -160px;
	left: 50%;
	transform: translateX(-50%);
	width: min(900px, 100%);
	height: 400px;
	background: rgba(68, 226, 205, 0.15);
	filter: blur(120px);
	border-radius: 9999px;
	pointer-events: none;
	z-index: 0;
}

.textcrm-pricing__header,
.textcrm-pricing__toggle,
.textcrm-pricing__grid,
.textcrm-pricing__trust {
	position: relative;
	z-index: 1;
}

/* --------------------------------------------------------------------------
   Section header — eyebrow / title / subtitle aligned with Inner Hero.
   -------------------------------------------------------------------------- */
.textcrm-pricing__header {
	text-align: center;
	margin-bottom: 48px;
}

/* Eyebrow pill — copied from .textcrm-inner-hero__badge */
.textcrm-pricing__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 24px;              /* mb-6 */
	padding: 4px 16px;                /* py-1 px-4 */
	border-radius: 9999px;
	background-color: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.textcrm-pricing__eyebrow-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	color: var(--tp-accent, #00f5a0);
}

.textcrm-pricing__eyebrow-icon svg,
.textcrm-pricing__eyebrow-icon i {
	width: 100%;
	height: 100%;
	font-size: 14px;
	line-height: 1;
}

.textcrm-pricing__eyebrow-text {
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--tp-accent, #00f5a0);
}

/* Title — Inner Hero scale (48px mobile / 72px md+, white + green accent) */
.textcrm-pricing__title {
	margin: 0 auto 24px;              /* mb-6 */
	max-width: 896px;                 /* max-w-4xl */
	font-size: 48px;                  /* headline-lg */
	line-height: 1.2;
	letter-spacing: -0.03em;
	font-weight: 700;
	color: #ffffff;
}

/* Solid brand green accent (no gradient) — matches Inner Hero */
.textcrm-pricing__title-accent {
	color: var(--tp-accent, #00f5a0);
}

/* Subtitle — body-lg (18 / 1.6 / 0.01em / 400) — matches Inner Hero */
.textcrm-pricing__subtitle {
	margin: 0 auto;
	max-width: 672px;                 /* max-w-2xl */
	font-size: 18px;
	line-height: 1.6;
	letter-spacing: 0.01em;
	font-weight: 400;
	color: #9ca3af;
}

/* --------------------------------------------------------------------------
   Billing toggle
   -------------------------------------------------------------------------- */
.textcrm-pricing__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-bottom: 64px;
}

.textcrm-pricing__toggle-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	color: #9ca3af;
	transition: color var(--tp-transition, 250ms) ease;
	cursor: pointer;
	user-select: none;
	background: none;
	border: 0;
	padding: 0;
}

.textcrm-pricing__toggle-label[data-active="true"] {
	color: #ffffff;
}

.textcrm-pricing__toggle-discount {
	font-weight: 600;
	color: var(--tp-accent, #00f5a0);
}

.textcrm-pricing__toggle-switch {
	position: relative;
	display: inline-block;
	width: 56px;
	height: 28px;
	padding: 0;
	border-radius: 9999px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background-color: rgba(255, 255, 255, 0.08);
	cursor: pointer;
	transition: background-color var(--tp-transition, 250ms) ease;
}

.textcrm-pricing__toggle-switch:focus-visible {
	outline: 2px solid var(--tp-accent, #00f5a0);
	outline-offset: 2px;
}

.textcrm-pricing__toggle-thumb {
	position: absolute;
	top: 50%;
	left: 4px;
	width: 20px;
	height: 20px;
	border-radius: 9999px;
	background-color: var(--tp-accent, #00f5a0);
	transform: translateY(-50%);
	transition: transform var(--tp-transition, 250ms) cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;             /* let the click hit the button */
}

.textcrm-pricing__toggle-switch[aria-checked="true"] .textcrm-pricing__toggle-thumb {
	transform: translate(28px, -50%);
}

/* --------------------------------------------------------------------------
   Pricing grid
   -------------------------------------------------------------------------- */
.textcrm-pricing__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	align-items: stretch;
	text-align: left;
}

/* --------------------------------------------------------------------------
   Card — glass surface, tokens 1:1 with Roles widget
   -------------------------------------------------------------------------- */
.textcrm-pricing__card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: var(--tp-card-padding, 32px);
	background: var(--tp-card-bg, rgba(255, 255, 255, 0.03));
	border: 1px solid var(--tp-card-border, rgba(255, 255, 255, 0.05));
	border-radius: var(--tp-card-radius, 32px);
	-webkit-backdrop-filter: blur(var(--tp-card-blur, 10px));
	backdrop-filter: blur(var(--tp-card-blur, 10px));
	color: inherit;
	transition:
		border-color var(--tp-transition, 250ms) ease,
		transform var(--tp-transition, 250ms) ease;
}

.textcrm-pricing__card:hover,
.textcrm-pricing__card:focus-within {
	border-color: var(--tp-card-border-hover, rgba(0, 245, 160, 0.3));
	outline: none;
}

/* Popular card variant */
.textcrm-pricing__card[data-popular="yes"] {
	border-color: rgba(0, 245, 160, 0.3);
	box-shadow: 0 0 32px rgba(0, 245, 160, 0.08);
}

/* Popular badge — pill anchored to the top-right of the card, vertically
   centered on the card's top border line. */
.textcrm-pricing__card-badge {
	position: absolute;
	top: 0;
	right: 32px;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	padding: 4px 16px;
	border-radius: 9999px;
	background-color: var(--tp-accent, #00f5a0);
	color: #000000;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	white-space: nowrap;
	box-shadow: 0 8px 20px rgba(0, 245, 160, 0.2);
	z-index: 2;
}

/* --------------------------------------------------------------------------
   Card head — icon + title + description + price
   -------------------------------------------------------------------------- */
.textcrm-pricing__card-head {
	margin-bottom: 32px;
}

.textcrm-pricing__card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--tp-card-icon-size, 48px);
	height: var(--tp-card-icon-size, 48px);
	margin-bottom: 24px;
	border-radius: var(--tp-card-icon-radius, 16px);
	background-color: rgba(255, 255, 255, 0.05);
	color: #ffffff;
}

.textcrm-pricing__card-icon svg,
.textcrm-pricing__card-icon i {
	width: var(--tp-card-icon-inner, 24px);
	height: var(--tp-card-icon-inner, 24px);
	font-size: var(--tp-card-icon-inner, 24px);
	line-height: 1;
	color: currentColor;
}

.textcrm-pricing__card[data-popular="yes"] .textcrm-pricing__card-icon {
	background-color: rgba(0, 245, 160, 0.1);
	color: var(--tp-accent, #00f5a0);
}

.textcrm-pricing__card-title {
	margin: 0 0 8px 0;
	font-size: 30px;                  /* headline-md (per the design) */
	line-height: 1.3;
	font-weight: 700;
	color: #ffffff;
	letter-spacing: -0.02em;
}

.textcrm-pricing__card-desc {
	margin: 0 0 24px 0;
	font-size: 16px;
	line-height: 1.5;
	color: #9ca3af;
}

/* Price */
.textcrm-pricing__price {
	display: flex;
	align-items: baseline;
	gap: 6px;
}

.textcrm-pricing__price-amount {
	font-size: 48px;
	line-height: 1.2;
	font-weight: 700;
	color: #ffffff;
	letter-spacing: -0.03em;
}

.textcrm-pricing__price-period {
	font-size: 16px;
	line-height: 1.5;
	color: #9ca3af;
}

/* --------------------------------------------------------------------------
   Feature list
   -------------------------------------------------------------------------- */
.textcrm-pricing__features {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0 0 40px 0;
	padding: 0;
	list-style: none;
}

.textcrm-pricing__feature {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
}

.textcrm-pricing__feature-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--tp-feature-icon-size, 20px);
	height: var(--tp-feature-icon-size, 20px);
	flex-shrink: 0;
	color: var(--tp-accent, #00f5a0);
}

.textcrm-pricing__feature-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.textcrm-pricing__feature-text {
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	color: #ffffff;                   /* matches Roles feature pill text */
}

.textcrm-pricing__feature-text--strong {
	font-weight: 600;
}

/* --------------------------------------------------------------------------
   CTA button — sizing aligned with Inner Hero buttons
   -------------------------------------------------------------------------- */
.textcrm-pricing__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 16px 24px;               /* py-4 px-6 */
	border-radius: 12px;              /* rounded-xl */
	border: 1px solid transparent;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition:
		background-color var(--tp-transition, 250ms) ease,
		color var(--tp-transition, 250ms) ease,
		border-color var(--tp-transition, 250ms) ease,
		box-shadow var(--tp-transition, 250ms) ease;
	margin-top: auto;
}

.textcrm-pricing__cta:focus-visible {
	outline: 2px solid var(--tp-accent, #00f5a0);
	outline-offset: 2px;
}

/* Outline variant — Starter / Enterprise (matches Inner Hero btn--secondary) */
.textcrm-pricing__cta--outline {
	background-color: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.1);
	color: #ffffff;
}

.textcrm-pricing__cta--outline:hover,
.textcrm-pricing__cta--outline:focus-visible {
	background-color: rgba(255, 255, 255, 0.1);
}

/* Primary variant — Pro / Popular (matches Inner Hero btn--primary) */
.textcrm-pricing__cta--primary {
	background-color: var(--tp-accent, #00f5a0);
	color: #000000;
	font-weight: 700;
	box-shadow: 0 0 0 rgba(0, 245, 160, 0);
}

.textcrm-pricing__cta--primary:hover,
.textcrm-pricing__cta--primary:focus-visible {
	box-shadow: 0 0 20px rgba(0, 245, 160, 0.4);
}

/* --------------------------------------------------------------------------
   Trust badges — per-item hover, NOT section-wide
   -------------------------------------------------------------------------- */
.textcrm-pricing__trust {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-start;
	gap: 48px;
	margin-top: 80px;
}

.textcrm-pricing__trust-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	text-align: center;
	opacity: 0.7;
	transition: opacity var(--tp-transition, 250ms) ease;
}

.textcrm-pricing__trust-item:hover,
.textcrm-pricing__trust-item:focus-within {
	opacity: 1;
}

.textcrm-pricing__trust-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 9999px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background-color: rgba(255, 255, 255, 0.05);
	color: #9ca3af;
	transition:
		color var(--tp-transition, 250ms) ease,
		border-color var(--tp-transition, 250ms) ease,
		background-color var(--tp-transition, 250ms) ease;
}

.textcrm-pricing__trust-item:hover .textcrm-pricing__trust-icon,
.textcrm-pricing__trust-item:focus-within .textcrm-pricing__trust-icon {
	color: #ffffff;
	border-color: rgba(255, 255, 255, 0.2);
	background-color: rgba(255, 255, 255, 0.08);
}

.textcrm-pricing__trust-icon svg,
.textcrm-pricing__trust-icon i {
	width: 32px;
	height: 32px;
	font-size: 32px;
	line-height: 1;
}

.textcrm-pricing__trust-label {
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: #9ca3af;
	transition: color var(--tp-transition, 250ms) ease;
}

.textcrm-pricing__trust-item:hover .textcrm-pricing__trust-label,
.textcrm-pricing__trust-item:focus-within .textcrm-pricing__trust-label {
	color: #ffffff;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* md+ → 3-column grid, larger headline (display-xl per Inner Hero), popular
   card scaled up. Title also adopts Inner Hero's md+ letter-spacing. */
@media (min-width: 768px) {
	.textcrm-pricing__title {
		font-size: 72px;              /* display-xl */
		line-height: 1.1;
		letter-spacing: -0.04em;
	}

	.textcrm-pricing__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.textcrm-pricing__card[data-popular="yes"] {
		transform: scale(var(--tp-popular-scale, 1.05));
		z-index: 2;
	}

	.textcrm-pricing__trust {
		gap: 96px;
	}
}

/* Phones — tighten padding */
@media (max-width: 767px) {
	.textcrm-pricing__card[data-popular="yes"] {
		/* Reserve space so the badge doesn't clip the previous card on mobile stacks. */
		margin-top: 24px;
	}
}

@media (max-width: 480px) {
	.textcrm-pricing {
		padding-top: 64px;
		padding-bottom: 64px;
	}

	.textcrm-pricing__container {
		padding-left: 16px;
		padding-right: 16px;
	}

	.textcrm-pricing__title {
		font-size: 36px;
		letter-spacing: -0.02em;
	}

	.textcrm-pricing__subtitle {
		font-size: 16px;
	}

	.textcrm-pricing__header {
		margin-bottom: 32px;
	}

	.textcrm-pricing__toggle {
		margin-bottom: 48px;
	}

	.textcrm-pricing__card-title {
		font-size: 26px;
	}

	.textcrm-pricing__price-amount {
		font-size: 40px;
	}

	.textcrm-pricing__trust {
		gap: 32px;
		margin-top: 56px;
	}

	.textcrm-pricing__trust-icon {
		width: 56px;
		height: 56px;
	}

	.textcrm-pricing__trust-icon svg {
		width: 28px;
		height: 28px;
	}
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.textcrm-pricing__card,
	.textcrm-pricing__toggle-switch,
	.textcrm-pricing__toggle-thumb,
	.textcrm-pricing__toggle-label,
	.textcrm-pricing__cta,
	.textcrm-pricing__trust-item {
		transition: none;
	}
}
