/* ============================================================
   HBH Pricing Widgets — Frontend Stylesheet
   Author: Hafiz Burhan Ul Haq | hafizburhanulhaq.com
   ============================================================ */

/* ── Google Font Import ────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ── CSS Reset for widget scope ────────────────────────────── */
.hbh-pricing-wrap *,
.hbh-ct-wrap * {
	box-sizing: border-box;
}

/* ============================================================
   PRICING TABLE WIDGET
   ============================================================ */

.hbh-pricing-wrap {
	width: 100%;
	font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ── Toggle ─────────────────────────────────────────────────── */
.hbh-toggle-container {
	display: flex;
	justify-content: center;
	margin-bottom: 32px;
}

.hbh-toggle-wrap {
	display: inline-flex;
	align-items: center;
	background-color: #E2E8F0;
	border-radius: 9999px;
	padding: 4px;
}

.hbh-toggle-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 20px;
	border-radius: 9999px;
	border: none;
	cursor: pointer;
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 14px;
	font-weight: 600;
	background-color: transparent;
	color: #64748B;
	box-shadow: none;
	transition: all 0.2s ease;
	line-height: 1;
}

.hbh-toggle-btn.active {
	background-color: #FFFFFF;
	color: #0F172A;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hbh-save-badge {
	padding: 2px 8px;
	background-color: #DCFCE7;
	color: #16A34A;
	border-radius: 9999px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.4;
}

/* ── Pricing Grid ───────────────────────────────────────────── */
.hbh-pricing-grid {
	display: grid;
	gap: 20px;
	align-items: start;
}

/* ── Plan Card ──────────────────────────────────────────────── */
.hbh-plan-card {
	border-radius: 24px;
	padding: 40px 36px;
	position: relative;
	box-sizing: border-box;
	background-color: #FFFFFF;
	border: 1px solid #E2E8F0;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.3s ease, transform 0.3s ease;
	font-family: 'Plus Jakarta Sans', sans-serif;
}

.hbh-plan-card:not(.featured):hover {
	box-shadow: 0 8px 32px rgba(26, 127, 232, 0.18);
	transform: translateY(-4px);
}

.hbh-plan-card.featured {
	background: linear-gradient(135deg, #1A7FE8 0%, #0D5DB5 100%);
	box-shadow: 0 24px 64px rgba(26, 127, 232, 0.4);
	border: none;
	transform: translateY(-8px);
}

/* ── Badge ──────────────────────────────────────────────────── */
.hbh-plan-badge {
	position: absolute;
	top: 16px;
	right: 16px;
	padding: 3px 10px;
	background-color: rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(4px);
	border-radius: 9999px;
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 11px;
	font-weight: 700;
	color: #FFFFFF;
	letter-spacing: 0.06em;
	border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ── Plan Name ──────────────────────────────────────────────── */
.hbh-plan-name {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 11px;
	font-weight: 700;
	color: #64748B;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin: 0 0 10px;
}

.hbh-plan-card.featured .hbh-plan-name {
	color: rgba(255, 255, 255, 0.7);
}

/* ── Price Row ──────────────────────────────────────────────── */
.hbh-plan-price-row {
	display: flex;
	align-items: baseline;
	gap: 4px;
	margin-bottom: 4px;
}

.hbh-plan-price {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 48px;
	font-weight: 800;
	color: #0F172A;
	letter-spacing: -0.02em;
	line-height: 1;
}

.hbh-plan-card.featured .hbh-plan-price {
	color: #FFFFFF;
}

.hbh-plan-period {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 16px;
	font-weight: 500;
	color: #94A3B8;
}

.hbh-plan-card.featured .hbh-plan-period {
	color: rgba(255, 255, 255, 0.6);
}

/* ── Subtitle ───────────────────────────────────────────────── */
.hbh-plan-subtitle {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 12px;
	color: #64748B;
	margin: 0 0 22px;
}

.hbh-plan-card.featured .hbh-plan-subtitle {
	color: rgba(255, 255, 255, 0.6);
}

/* ── Divider ─────────────────────────────────────────────────── */
.hbh-plan-divider {
	height: 1px;
	background-color: #F1F5F9;
	margin-bottom: 20px;
}

.hbh-plan-card.featured .hbh-plan-divider {
	background-color: rgba(255, 255, 255, 0.2);
}

/* ── Features ───────────────────────────────────────────────── */
.hbh-plan-features {
	display: flex;
	flex-direction: column;
	gap: 11px;
	margin-bottom: 24px;
}

.hbh-feature-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.hbh-feature-item.excluded {
	opacity: 0.4;
}

.hbh-feature-icon {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin-top: 1px;
}

.hbh-feature-icon.check {
	background-color: #EFF6FF;
}

.hbh-plan-card.featured .hbh-feature-icon.check {
	background-color: rgba(255, 255, 255, 0.2);
}

.hbh-feature-icon.cross {
	background-color: #FEF2F2;
}

.hbh-feature-icon svg {
	display: block;
}

.hbh-plan-card:not(.featured) .hbh-feature-icon.check svg {
	stroke: #1A7FE8;
}

.hbh-plan-card.featured .hbh-feature-icon.check svg {
	stroke: #FFFFFF;
}

.hbh-feature-icon.cross svg {
	stroke: #F87171;
}

.hbh-feature-text {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 13px;
	color: #334155;
	line-height: 1.5;
}

.hbh-plan-card.featured .hbh-feature-text {
	color: rgba(255, 255, 255, 0.9);
}

/* ── Button ──────────────────────────────────────────────────── */
.hbh-plan-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 48px;
	border-radius: 9999px;
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
	cursor: pointer;
}

.hbh-plan-card:not(.featured) .hbh-plan-btn {
	background-color: transparent;
	color: #1A7FE8;
	border: 1.5px solid #1A7FE8;
}

.hbh-plan-card:not(.featured) .hbh-plan-btn:hover {
	transform: translateY(-2px);
}

.hbh-plan-card.featured .hbh-plan-btn {
	background-color: #FFFFFF;
	color: #1A7FE8;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	border: none;
}

.hbh-plan-card.featured .hbh-plan-btn:hover {
	transform: translateY(-2px);
}

/* ── Footer Note ─────────────────────────────────────────────── */
.hbh-pricing-footer-note {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 13px;
	color: #94A3B8;
	text-align: center;
	margin-top: 28px;
	margin-bottom: 0;
}

/* ============================================================
   COMPARISON TABLE WIDGET
   ============================================================ */

.hbh-ct-wrap {
	width: 100%;
	font-family: 'Plus Jakarta Sans', sans-serif;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.hbh-ct-outer {
	border-radius: 20px;
	box-shadow: 0 4px 32px rgba(0, 0, 0, 0.06);
	border: 1px solid #E2E8F0;
	overflow: hidden;
	min-width: 480px;
}

.hbh-ct-inner {
	width: 100%;
}

.hbh-ct-grid {
	display: grid;
}

/* ── Header ──────────────────────────────────────────────────── */
.hbh-ct-header .hbh-ct-feature-cell,
.hbh-ct-header .hbh-ct-col {
	padding: 20px 24px;
	border-bottom: 1px solid #E2E8F0;
}

.hbh-ct-header .hbh-ct-feature-cell {
	background-color: #F8FAFC;
}

.hbh-ct-header .hbh-ct-feature-cell span {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 11px;
	font-weight: 700;
	color: #94A3B8;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.hbh-ct-header .hbh-ct-col {
	background-color: #F8FAFC;
	text-align: center;
}

.hbh-ct-header .hbh-ct-col span {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 14px;
	font-weight: 700;
	color: #64748B;
}

.hbh-ct-header .hbh-ct-col.highlighted {
	background-color: #1A7FE8;
}

.hbh-ct-header .hbh-ct-col.highlighted span {
	color: #FFFFFF;
}

/* ── Data Rows ───────────────────────────────────────────────── */
.hbh-ct-row {
	background-color: #FFFFFF;
}

.hbh-ct-row:nth-child(odd) {
	background-color: #F8FAFC;
}

.hbh-ct-row:not(:last-child) {
	border-bottom: 1px solid #F1F5F9;
}

.hbh-ct-row .hbh-ct-feature-cell,
.hbh-ct-row .hbh-ct-col {
	padding: 18px 24px;
}

.hbh-ct-row .hbh-ct-feature-cell span {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: #334155;
}

.hbh-ct-row .hbh-ct-col {
	text-align: center;
}

.hbh-ct-row .hbh-ct-col span {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 13.5px;
}

.hbh-ct-row .hbh-ct-col.highlighted {
	background-color: rgba(26, 127, 232, 0.05);
	border-left: 2px solid #1A7FE8;
	border-right: 1px solid #F1F5F9;
}

.hbh-ct-row .hbh-ct-col.highlighted span {
	font-weight: 700;
}

.hbh-ct-row .hbh-ct-col:not(.highlighted):not(:last-child) {
	border-right: 1px solid #F1F5F9;
}

/* ── Value Colors ────────────────────────────────────────────── */
.hbh-ct-val-yes {
	color: #16A34A;
}

.hbh-ct-val-no {
	color: #EF4444;
}

.hbh-ct-val-neutral {
	color: #0F172A;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
	.hbh-pricing-grid {
		grid-template-columns: 1fr 1fr !important;
	}

	.hbh-plan-card.featured {
		transform: none;
	}
}

@media (max-width: 640px) {
	.hbh-pricing-grid {
		grid-template-columns: 1fr !important;
	}

	.hbh-plan-card {
		padding: 28px 22px;
	}

	.hbh-plan-price {
		font-size: 36px;
	}

	.hbh-plan-card.featured {
		transform: none;
	}

	.hbh-ct-outer {
		min-width: 400px;
	}

	.hbh-toggle-btn {
		padding: 8px 14px;
		font-size: 13px;
	}
}


/* Mobile comparison table */
@media (max-width: 767px) {
	.hbh-ct-wrap {
		overflow-x: visible;
	}

	.hbh-ct-outer {
		min-width: 100%;
		overflow: visible;
		border-radius: 16px;
	}

	.hbh-ct-header {
		display: none;
	}

	.hbh-ct-row {
		display: block !important;
		background: #FFFFFF;
		border-bottom: 1px solid #E2E8F0;
	}

	.hbh-ct-row:nth-child(odd) {
		background: #FFFFFF;
	}

	.hbh-ct-row .hbh-ct-feature-cell {
		display: block;
		padding: 18px 18px 12px;
		border-bottom: 1px solid #F1F5F9;
		background: #F8FAFC;
	}

	.hbh-ct-row .hbh-ct-feature-cell span {
		display: block;
		font-size: 15px;
		font-weight: 700;
	}

	.hbh-ct-row .hbh-ct-col {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 14px;
		padding: 14px 18px;
		text-align: right;
		border-right: none !important;
		border-left: none !important;
		border-bottom: 1px solid #F1F5F9;
		background: #FFFFFF !important;
	}

	.hbh-ct-row .hbh-ct-col:last-child {
		border-bottom: none;
	}

	.hbh-ct-row .hbh-ct-col::before {
		content: attr(data-label);
		display: block;
		flex: 0 0 42%;
		max-width: 42%;
		text-align: left;
		font-size: 12px;
		font-weight: 700;
		line-height: 1.4;
		letter-spacing: 0.04em;
		text-transform: uppercase;
		color: #64748B;
	}

	.hbh-ct-row .hbh-ct-col span {
		display: block;
		flex: 1 1 auto;
		font-size: 14px;
		line-height: 1.6;
		word-break: break-word;
	}

	.hbh-ct-row .hbh-ct-col.highlighted {
		background: rgba(26, 127, 232, 0.06) !important;
	}

	.hbh-ct-row .hbh-ct-col.highlighted::before {
		color: #1A7FE8;
	}
}
