/* 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;
}

/* Optional link to the package detail page; the package name is for screen readers. */
.wpct-pricing-card .wpct-pricing-detail-link {
	display: inline-flex;
	align-items: center;
	align-self: center;
	gap: 8px;
	margin-top: 14px;
	color: #164ad8;
	font-size: .88rem;
	font-weight: 800;
	text-decoration: none;
}

.wpct-pricing-card .wpct-pricing-detail-link::after {
	content: "\2192";
	transition: transform .18s ease;
}

.wpct-pricing-grid .wpct-pricing-card .wpct-pricing-detail-link:hover,
.wpct-pricing-grid .wpct-pricing-card .wpct-pricing-detail-link:focus {
	color: #245bff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.wpct-pricing-grid .wpct-pricing-card .wpct-pricing-detail-link:hover::after {
		transform: translateX(4px);
	}
}

.wpct-pricing-card .wpct-pricing-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.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 block padding gives the
		   default shadows room. */
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-x: contain;
		/* The side padding leaves exactly the card width as content box, so a
		   card at flex-basis 100% is the chosen width of the whole strip. */
		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 {
		box-sizing: border-box;
		flex: 0 0 100%;
		padding: 28px 24px;
		scroll-snap-align: center;
		scroll-snap-stop: always;
	}

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

/* Carousel navigation (prev button, dots, next button). Only in the markup
   when the carousel is on; only shown at the mobile breakpoint. Three classes
   deep: Elementor kits style every <button> (`.elementor-kit-N button:hover`). */
.wpct-pricing-carousel-nav {
	display: none;
}

.wpct-pricing-grid-wrapper .wpct-pricing-carousel-nav .wpct-pricing-carousel-hint {
	box-sizing: border-box;
	display: flex;
	width: 44px;
	height: 44px;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid #dce4eb;
	border-radius: 50%;
	color: #07182f;
	background: #ffffff;
	box-shadow: 0 8px 24px rgba(7, 24, 47, .1);
	cursor: pointer;
	font: inherit;
	transition: opacity .2s ease, transform .2s ease;
}

.wpct-pricing-grid-wrapper .wpct-pricing-carousel-nav .wpct-pricing-carousel-hint:active {
	transform: scale(.94);
}

.wpct-pricing-grid-wrapper .wpct-pricing-carousel-nav .wpct-pricing-carousel-hint[aria-disabled="true"] {
	opacity: .35;
	cursor: default;
}

.wpct-pricing-grid-wrapper .wpct-pricing-carousel-nav .wpct-pricing-carousel-hint:focus-visible,
.wpct-pricing-grid-wrapper .wpct-pricing-carousel-nav .wpct-pricing-carousel-dot:focus-visible {
	outline: 2px solid #245bff;
	outline-offset: 2px;
}

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

.wpct-pricing-grid-wrapper .wpct-pricing-carousel-nav .wpct-pricing-carousel-dots {
	display: flex;
	align-items: center;
	gap: 4px;
}

/* 24px tap target around an 8px dot; the current one stretches into a pill. */
.wpct-pricing-grid-wrapper .wpct-pricing-carousel-nav .wpct-pricing-carousel-dot {
	display: grid;
	width: 24px;
	height: 24px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 999px;
	background: none;
	box-shadow: none;
	cursor: pointer;
	transition: width .35s cubic-bezier(.2, .7, .2, 1);
}

.wpct-pricing-grid-wrapper .wpct-pricing-carousel-nav .wpct-pricing-carousel-dot::before {
	display: block;
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: var(--wpct-carousel-dot, #c9d4e0);
	content: "";
	transition: width .35s cubic-bezier(.2, .7, .2, 1), background-color .35s ease;
}

.wpct-pricing-grid-wrapper .wpct-pricing-carousel-nav .wpct-pricing-carousel-dot[aria-current="true"] {
	width: 36px;
}

.wpct-pricing-grid-wrapper .wpct-pricing-carousel-nav .wpct-pricing-carousel-dot[aria-current="true"]::before {
	width: 26px;
	background: var(--wpct-carousel-dot-active, #245bff);
}

@media (max-width: 767px) {
	.wpct-pricing-carousel-nav {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 14px;
		margin-top: var(--wpct-carousel-nav-space, -16px);
	}

	/* "Sides": the buttons float over the edges, the dots stay below. */
	.wpct-pricing-grid-wrapper .wpct-pricing-carousel-nav--sides .wpct-pricing-carousel-hint {
		position: absolute;
		z-index: 2;
		top: 50%;
		transform: translateY(-50%);
	}

	.wpct-pricing-grid-wrapper .wpct-pricing-carousel-nav--sides .wpct-pricing-carousel-hint[aria-disabled="true"] {
		display: none;
	}

	.wpct-pricing-grid-wrapper .wpct-pricing-carousel-nav--sides .wpct-pricing-carousel-hint--next {
		right: 6px;
	}

	.wpct-pricing-grid-wrapper .wpct-pricing-carousel-nav--sides .wpct-pricing-carousel-hint--prev {
		left: 6px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wpct-pricing-grid-wrapper .wpct-pricing-carousel-nav .wpct-pricing-carousel-dot,
	.wpct-pricing-grid-wrapper .wpct-pricing-carousel-nav .wpct-pricing-carousel-dot::before {
		transition: none;
	}
}
