/* WP Consultant Toolkit — Pricing Grid widget styles. */

.wpct-pricing-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	align-items: stretch;
	gap: 22px;
	list-style: none;
	margin: 0;
	padding: 0;
	/* Headroom for the raised popular card + badge (a transform claims no space). */
	padding-top: max(0px, calc(-1 * (var(--wpct-popular-offset, -12px) + var(--wpct-popular-badge-top, -14px))));
}

.wpct-pricing-card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 34px;
	border: 1px solid #dce4eb;
	border-radius: 28px;
	background: #ffffff;
	box-shadow: 0 8px 24px rgba(7, 24, 47, .08);
}

.wpct-pricing-card--popular {
	transform: translateY(-12px);
	border: 2px solid #245bff;
	box-shadow: 0 20px 55px rgba(7, 24, 47, .13);
}

.wpct-pricing-popular-badge {
	position: absolute;
	top: -14px;
	left: 50%;
	transform: translateX(-50%);
	padding: .35rem .8rem;
	border-radius: 999px;
	color: #ffffff;
	background: #245bff;
	font-size: .72rem;
	font-weight: 800;
	white-space: nowrap;
}

.wpct-pricing-tag {
	display: inline-flex;
	align-self: flex-start;
	margin: 0 0 16px;
	padding: .42rem .7rem;
	border-radius: 999px;
	color: #164ad8;
	background: #edf2ff;
	font-size: .75rem;
	font-weight: 800;
}

.wpct-pricing-price {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 5px;
	margin: 20px 0 24px;
}

.wpct-pricing-currency {
	align-self: flex-start;
	margin-top: .5rem;
	font-weight: 800;
}

.wpct-pricing-amount {
	color: #07182f;
	font-size: 3.3rem;
	line-height: .95;
}

.wpct-pricing-period {
	color: #738399;
	font-size: .82rem;
}

.wpct-pricing-original-price {
	align-self: center;
	color: #738399;
	font-size: 1.1rem;
	text-decoration: line-through;
}

.wpct-pricing-discount-badge {
	display: inline-flex;
	align-self: center;
	padding: .3rem .6rem;
	border-radius: 999px;
	color: #ffffff;
	background: #d1453b;
	font-size: .72rem;
	font-weight: 800;
	white-space: nowrap;
}

.wpct-pricing-desc {
	margin: 0 0 20px;
	color: #52657b;
}

.wpct-pricing-features {
	flex-grow: 1;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
	color: #52657b;
	font-size: .88rem;
}

.wpct-pricing-features li {
	position: relative;
	padding-left: 30px;
}

.wpct-pricing-features li:not(:last-child) {
	margin-bottom: 10px;
}

.wpct-pricing-features li::before {
	content: "✓";
	position: absolute;
	top: .1rem;
	left: 0;
	color: #1f9d76;
	font-size: 1.05rem;
	font-weight: 900;
}

.wpct-pricing-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 4px;
}

.wpct-pricing-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: .75rem 1.2rem;
	border-radius: 999px;
	border: 1px solid transparent;
	text-align: center;
	text-decoration: none;
	font-weight: 800;
	transition: opacity .2s ease;
}

.wpct-pricing-btn--primary {
	color: #ffffff;
	background: #245bff;
}

.wpct-pricing-btn--secondary {
	color: #164ad8;
	background: transparent;
	border-color: #dce4eb;
}

.wpct-pricing-btn:hover {
	opacity: .88;
}

.wpct-pricing-ideal {
	margin: 20px 0 0;
	padding-top: 18px;
	border-top: 1px solid #dce4eb;
	color: #738399;
	font-size: .8rem;
}

/* Mobile carousel (opt-in): snapping horizontal strip with peeking neighbours.
   767px = Elementor's default mobile breakpoint, kept in sync with pricing-grid.js. */
@media (max-width: 767px) {
	.wpct-pricing-grid.wpct-pricing-grid--carousel {
		display: flex;
		overflow-x: auto;
		/* overflow-y: visible would compute to auto here (overflow-x scrolls),
		   so shadows clip at the padding box; the 40px block padding gives
		   the default shadows room. */
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		padding-inline: calc((100% - var(--wpct-carousel-card-width, 82%)) / 2);
		padding-top: max(40px, calc(-1 * (var(--wpct-popular-offset, -12px) + var(--wpct-popular-badge-top, -14px))));
		padding-bottom: 40px;
		scroll-padding-inline: calc((100% - var(--wpct-carousel-card-width, 82%)) / 2);
		/* Hide the scrollbar; peek + buttons already signal scrollability. */
		scrollbar-width: none;
		-ms-overflow-style: none;
	}

	.wpct-pricing-grid.wpct-pricing-grid--carousel::-webkit-scrollbar {
		display: none;
	}

	.wpct-pricing-grid--carousel > .wpct-pricing-card {
		flex: 0 0 var(--wpct-carousel-card-width, 82%);
		scroll-snap-align: center;
		scroll-snap-stop: always;
	}

	.wpct-pricing-grid-wrapper .container {
		position: relative;
	}
}

/* Carousel prev/next buttons: only in markup when carousel + icon are set,
   shown only at the mobile breakpoint. Visibility at the ends is set by JS. */
.wpct-pricing-carousel-hint {
	display: none;
	position: absolute;
	top: 50%;
	z-index: 2;
	align-items: center;
	justify-content: center;
	transform: translateY(-50%);
	border: 0;
	cursor: pointer;
	font: inherit;
}

.wpct-pricing-carousel-hint--next {
	right: 6px;
}

.wpct-pricing-carousel-hint--prev {
	left: 6px;
}

/* One icon control serves both buttons: mirror it for "previous". */
.wpct-pricing-carousel-hint--prev i,
.wpct-pricing-carousel-hint--prev svg {
	transform: scaleX(-1);
}

/* Needed: the UA [hidden] rule always loses to an author `display` rule. */
.wpct-pricing-carousel-hint[hidden] {
	display: none;
}

@media (max-width: 767px) {
	.wpct-pricing-carousel-hint {
		display: flex;
	}
}
