/**
 * CT Subscription Widget CSS
 * Pixel-perfect SaaS pricing cards matching the modern dark/light contrast design
 */

/* Category Filter Tabs */
.ct-sub-filter-tabs {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-bottom: 36px;
	flex-wrap: wrap;
}

.ct-sub-filter-tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 20px;
	background: #f8fafc;
	color: #64748b;
	border: 1px solid #e2e8f0;
	border-radius: 9999px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none !important;
	transition: all 0.2s ease;
	user-select: none;
	line-height: 1.4;
}

.ct-sub-filter-tab:hover {
	color: #0f172a;
	background: #ffffff;
	border-color: #cbd5e1;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.ct-sub-filter-tab.is-active {
	background: #0f172a;
	color: #ffffff;
	border-color: #0f172a;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.ct-sub-wrapper {
	display: flex;
	width: 100%;
	justify-content: center;
	box-sizing: border-box;
}

.ct-sub-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	align-items: stretch;
	justify-content: center;
}

.ct-sub-grid--cols-1 {
	grid-template-columns: minmax(0, 1fr);
	max-width: 440px;
	width: 100%;
}

.ct-sub-grid--cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	max-width: 900px;
	width: 100%;
}

.ct-sub-grid--cols-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	max-width: 1200px;
	width: 100%;
}

.ct-sub-grid--cols-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	max-width: 1400px;
	width: 100%;
}

/* Elementor cards position (left / center / right) */
.ct-sub-cards-align-left .ct-sub-wrapper {
	justify-content: flex-start;
}

.ct-sub-cards-align-center .ct-sub-wrapper {
	justify-content: center;
}

.ct-sub-cards-align-right .ct-sub-wrapper {
	justify-content: flex-end;
}

.ct-sub-cards-align-left .ct-sub-grid {
	justify-content: flex-start;
	margin-left: 0;
	margin-right: auto;
}

.ct-sub-cards-align-center .ct-sub-grid {
	justify-content: center;
	margin-left: auto;
	margin-right: auto;
}

.ct-sub-cards-align-right .ct-sub-grid {
	justify-content: flex-end;
	margin-left: auto;
	margin-right: 0;
}

/* Card Base */
.ct-sub-card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 22px;
	padding: 34px 28px 28px;
	box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
	box-sizing: border-box;
}

.ct-sub-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.08);
}

/* Featured / VIP Dark Card */
.ct-sub-card--featured {
	background: #0e0918;
	background: linear-gradient(180deg, #140b24 0%, #0c0617 100%);
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 20px 40px -10px rgba(39, 125, 255, 0.35), 0 10px 20px -5px rgba(0, 0, 0, 0.4);
}

.ct-sub-card--featured:hover {
	transform: translateY(-4px);
	box-shadow: 0 24px 50px -10px rgba(39, 125, 255, 0.45), 0 12px 24px -5px rgba(0, 0, 0, 0.5);
}

/* Most Popular Badge */
.ct-sub-card__badge-wrap {
	position: absolute;
	top: -13px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
}

.ct-sub-card__badge {
	display: inline-block;
	background: #277DFF;
	color: #ffffff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 4px 14px;
	border-radius: 9999px;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(39, 125, 255, 0.35);
}

/* Header */
.ct-sub-card__header {
	margin-bottom: 20px;
}

.ct-sub-card__title {
	margin: 0 0 6px !important;
	padding: 0 !important;
	font-size: 22px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.25;
	letter-spacing: -0.02em;
}

.ct-sub-card--featured .ct-sub-card__title {
	color: #ffffff !important;
}

.ct-sub-card__subtitle {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 13px;
	color: #64748b;
	line-height: 1.45;
}

.ct-sub-card--featured .ct-sub-card__subtitle {
	color: #94a3b8;
}

/* Pricing */
.ct-sub-card__pricing {
	margin-bottom: 18px;
}

.ct-sub-card__price-row {
	display: flex;
	align-items: baseline;
	gap: 4px;
	margin-bottom: 4px;
	flex-wrap: wrap;
}

.ct-sub-card__price-del {
	font-size: 22px;
	font-weight: 500;
	color: #94a3b8;
	text-decoration: line-through;
	margin-right: 6px;
	letter-spacing: normal;
}

.ct-sub-card--featured .ct-sub-card__price-del {
	color: #64748b;
}

.ct-sub-card__price {
	font-size: 40px;
	font-weight: 800;
	color: #0f172a;
	line-height: 1;
	letter-spacing: -0.03em;
}

.ct-sub-card--featured .ct-sub-card__price {
	color: #ffffff;
}

.ct-sub-card__period {
	font-size: 14px;
	font-weight: 400;
	color: #64748b;
}

.ct-sub-card--featured .ct-sub-card__period {
	color: #94a3b8;
}

.ct-sub-card__billing-note {
	font-size: 12px;
	color: #64748b;
	line-height: 1.35;
	margin-bottom: 8px;
}

.ct-sub-card--featured .ct-sub-card__billing-note {
	color: #94a3b8;
}

/* Savings Tag */
.ct-sub-card__savings-wrap {
	margin-top: 6px;
}

.ct-sub-card__savings-tag {
	display: inline-block;
	background: #ecfdf5;
	color: #059669;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 9999px;
	line-height: 1.4;
}

.ct-sub-card--featured .ct-sub-card__savings-tag {
	background: rgba(16, 185, 129, 0.16);
	color: #34d399;
}

/* Divider */
.ct-sub-card__divider {
	height: 1px;
	background: #f1f5f9;
	margin: 18px 0 20px;
}

.ct-sub-card--featured .ct-sub-card__divider {
	background: rgba(255, 255, 255, 0.1);
}

/* Features List */
.ct-sub-card__features {
	list-style: none !important;
	margin: 0 0 28px !important;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ct-sub-feature {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	line-height: 1.4;
}

.ct-sub-feature__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
}

.ct-sub-svg {
	width: 18px;
	height: 18px;
	display: block;
}

/* Light Card Icons */
.ct-sub-feature--included .ct-sub-svg--check .ct-sub-svg-circle {
	fill: #0f172a;
}

.ct-sub-feature--included .ct-sub-svg--check .ct-sub-svg-tick {
	stroke: #ffffff;
}

.ct-sub-feature--included .ct-sub-feature__text {
	color: #0f172a;
	font-weight: 500;
}

.ct-sub-feature--excluded .ct-sub-svg--circle .ct-sub-svg-hollow {
	stroke: #cbd5e1;
}

.ct-sub-feature--excluded .ct-sub-feature__text {
	color: #94a3b8;
	text-decoration: line-through;
}

/* Featured / Dark Card Icons */
.ct-sub-card--featured .ct-sub-feature--included .ct-sub-svg--check .ct-sub-svg-circle {
	fill: #ffffff;
}

.ct-sub-card--featured .ct-sub-feature--included .ct-sub-svg--check .ct-sub-svg-tick {
	stroke: #0e0918;
}

.ct-sub-card--featured .ct-sub-feature--included .ct-sub-feature__text {
	color: #ffffff;
	font-weight: 500;
}

.ct-sub-card--featured .ct-sub-feature--excluded .ct-sub-svg--circle .ct-sub-svg-hollow {
	stroke: #475569;
}

.ct-sub-card--featured .ct-sub-feature--excluded .ct-sub-feature__text {
	color: #64748b;
	text-decoration: line-through;
}

/* Optional helper when strikethrough disabled */
.ct-sub-no-strikethrough .ct-sub-feature--excluded .ct-sub-feature__text {
	text-decoration: none !important;
}

/* Button */
.ct-sub-card__bottom {
	margin-top: auto;
}

.ct-sub-btn {
	display: block;
	width: 100%;
	text-align: center;
	padding: 13px 20px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none !important;
	border-radius: 9999px;
	transition: all 0.2s ease;
	box-sizing: border-box;
	cursor: pointer;
}

/* Outline button for light card */
.ct-sub-btn--outline {
	background: transparent;
	color: #0f172a;
	border: 1px solid #cbd5e1;
}

.ct-sub-btn--outline:hover {
	background: #0f172a;
	color: #ffffff;
	border-color: #0f172a;
}

/* Solid button for featured dark card */
.ct-sub-btn--featured {
	background: #ffffff;
	color: #0e0918;
	border: 1px solid #ffffff;
	box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
}

.ct-sub-btn--featured:hover {
	background: #f8fafc;
	color: #0e0918;
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
}

/* Filter hidden state & animation */
.ct-sub-card.is-hidden {
	display: none !important;
}

.ct-sub-card {
	animation: ctSubFadeIn 0.3s ease;
}

@keyframes ctSubFadeIn {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Responsive */
@media (max-width: 1024px) {
	.ct-sub-grid--cols-3,
	.ct-sub-grid--cols-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.ct-sub-grid {
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 32px;
	}

	.ct-sub-card {
		padding: 30px 22px 24px;
	}

	.ct-sub-card__price {
		font-size: 34px;
	}
}
