/**
 * Pricing Card Widget Styles
 * 
 * UPLOAD TO: /wp-content/plugins/serenity-toolkit-pro/assets/css/pricing-card.css
 */

/* BASE */
.elementor-widget-serenity_pricing_card,
.elementor-widget-serenity_pricing_card .elementor-widget-container {
	overflow: visible !important;
}

/* Ensure widget follows Elementor section width settings */
.elementor-section.elementor-section-full-width .elementor-widget-serenity_pricing_card .pricing-card-section,
.elementor-section.elementor-section-stretched .elementor-widget-serenity_pricing_card .pricing-card-section {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Ensure parent elements don't interfere with ScrollTrigger pinning */
.elementor-widget-serenity_pricing_card .elementor-widget-container {
	position: relative !important;
	z-index: 1 !important;
}

/* When widget is being pinned, increase z-index */
.elementor-widget-serenity_pricing_card {
	position: relative;
	z-index: 100 !important;
}

.pricing-card-section {
	position: relative;
	padding: 20px 0;
	background: #ffffff;
	overflow: visible;
	/* Critical for ScrollTrigger pinning */
	will-change: transform;
	z-index: 100;
}

/* When pinned by ScrollTrigger */
.pricing-card-section.scroll-trigger-enabled {
	/* Ensure section can be pinned */
	width: 100%;
	backface-visibility: hidden;
}

.pricing-card-container {
	width: 100%;
	overflow: visible;
}

/* Full width section support */
.elementor-section.elementor-section-full-width .elementor-widget-serenity_pricing_card .pricing-card-container,
.elementor-section.elementor-section-stretched .elementor-widget-serenity_pricing_card .pricing-card-container {
	width: 100%;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

/* GRID */
.pricing-card-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}

/* ELASTIC SORTING BUTTONS - Smooth Gallery Style */
.sort-buttons-wrapper {
	margin-bottom: 40px;
	text-align: center;
}

.sort-buttons {
	display: inline-flex;
	position: relative;
	background: #ffffff;
	border-radius: 50px;
	padding: 5px;
	font-size: 14px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	z-index: 1;
	/* Remove default shadow - let Elementor control it */
}

.sort-buttons-selector {
	position: absolute;
	height: calc(100% - 10px);
	top: 5px;
	left: 0;
	border-radius: 50px;
	transition-duration: 0.6s;
	transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
	z-index: -1;
	/* Remove default border - let Elementor control it */
	border: 0;
}

.sort-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	color: #777777;
	text-transform: uppercase;
	font-weight: 500;
	padding: 12px 24px;
	position: relative;
	z-index: 2;
	transition-duration: 0.6s;
	cursor: pointer;
	/* Remove all borders - let Elementor control it */
	border: none !important;
	background: none;
	font-size: 14px;
	white-space: nowrap;
	border-radius: 50px;
	min-width: 80px;
}

.sort-btn.active {
	color: #ffffff;
	font-weight: 600;
}

/* CAROUSEL */
.pricing-card-carousel-wrapper {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.pricing-card-carousel {
	display: flex;
	/* GAP BETWEEN CARDS - increase for more space between cards (current: 30px) */
	gap: 30px;
	overflow-x: auto;
	overflow-y: visible;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

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

/* CARD - ONLY HEIGHT CHANGED */
.pricing-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0,0,0,0.08);
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	/* CARD HEIGHT - reduced to 380px for better desktop fit */
	min-height: 380px;
	height: auto;
}

.layout-carousel .pricing-card {
	/* CARD WIDTH - reduced to 22% for better desktop scaling */
	flex: 0 0 22%;
	min-width: 22%;
}

.pricing-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* ── Filter animation classes (JS-driven, avoids inline style conflicts) ── */
.pricing-card-grid .pricing-card {
	/* Override the generic transition so filter animations aren't blocked by 'transition: all' */
	transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card-grid .pricing-card.card-showing {
	animation: cardFadeIn 0.35s ease forwards;
}

.pricing-card-grid .pricing-card.card-hiding {
	animation: cardFadeOut 0.28s ease forwards;
}

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

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

.card-image {
	position: relative;
	width: 100%;
	/* IMAGE HEIGHT - back to original 250px */
	height: 250px;
	overflow: hidden;
}

.card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.pricing-card:hover .card-image img {
	transform: scale(1.05);
}

.card-label {
	position: absolute;
	top: 15px;
	left: 15px;
	background: rgba(255,255,255,0.9);
	color: #666;
	padding: 8px 16px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	backdrop-filter: blur(10px);
}

.card-services {
	/* SERVICES PADDING - reduced for package cards */
	padding: 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
	/* GAP BETWEEN SERVICES - reduced for tighter spacing */
	gap: 15px;
	overflow-y: auto;
}

.service-item {
	display: flex;
	justify-content: space-between;
	gap: 15px;
	padding-bottom: 20px;
	border-bottom: 1px solid #f0f0f0;
}

.service-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.service-info {
	display: flex;
	flex-direction: column;
	gap: 5px;
	flex: 1;
}

.service-name-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
}

.service-name {
	font-size: 16px;
	font-weight: 600;
	color: #1a1a1a;
}

.service-duration {
	font-size: 14px;
	color: #666;
}

.service-price-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
}

.service-price {
	font-size: 16px;
	font-weight: 600;
	color: #1a1a1a;
	white-space: nowrap;
}

/* ===== BADGE VISIBILITY CONTROL ===== */
/* Hide all badges by default */
.service-badge {
	display: none;
	background: #7C85DB;
	color: #fff;
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
	text-transform: lowercase;
	letter-spacing: 0.3px;
	white-space: nowrap;
}

/* Desktop: Show only the selected position badge */
@media (min-width: 769px) {
	.badge-desktop-above-name .badge-above-name {
		display: inline-block;
	}
	
	.badge-desktop-name-right .badge-name-right {
		display: inline-block;
	}
	
	.badge-desktop-price-left .badge-price-left {
		display: inline-block;
	}
}

/* Mobile: Show only the selected position badge */
@media (max-width: 768px) {
	/* Make badge more compact for mobile */
	.service-badge {
		padding: 3px 8px;
		border-radius: 8px;
		font-size: 10px;
		font-weight: 700;
		width: fit-content;
		width: -moz-fit-content;
	}
	
	.badge-mobile-above-name .badge-above-name {
		display: inline-block;
		animation: badgeBounce 1.5s ease-in-out infinite;
	}
	
	.badge-mobile-name-right .badge-name-right {
		display: inline-block;
		animation: badgeBounce 1.5s ease-in-out infinite;
	}
	
	.badge-mobile-price-left .badge-price-left {
		display: inline-block;
		animation: badgeBounce 1.5s ease-in-out infinite;
	}
}

/* Badge animation - subtle up and down movement */
@keyframes badgeBounce {
	0%, 100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-4px);
	}
}

/* ===== PACKAGE CARD STYLES ===== */
.package-header {
	margin-bottom: 12px;
}

.package-description {
	font-size: 15px;
	color: #666;
	line-height: 1.6;
	/* Margin controlled by Elementor */
}

.package-meta {
	display: flex;
	align-items: center;
	/* Gap controlled by Elementor */
}

.package-price {
	font-size: 18px;
	font-weight: 700;
	color: #E67E50;
}

.package-duration {
	font-size: 14px;
	color: #666;
	font-weight: 500;
}

.package-divider {
	height: 1px;
	background: #f0f0f0;
	/* Margin controlled by Elementor */
}

.package-includes-title {
	font-size: 16px;
	font-weight: 700;
	color: #1a1a1a;
	/* Margin controlled by Elementor */
}

.package-services {
	display: flex;
	flex-direction: column;
	/* Gap controlled by Elementor */
}

.package-service-item {
	display: flex;
	align-items: flex-start;
	/* Gap controlled by Elementor */
}

.package-check-icon {
	flex-shrink: 0;
	margin-top: 2px;
	color: #4CAF50;
}

.package-service-info {
	display: flex;
	flex-direction: column;
	/* Gap controlled by Elementor */
	flex: 1;
}

.package-service-info .service-name {
	font-size: 15px;
	font-weight: 600;
	color: #1a1a1a;
	line-height: 1.4;
}

.package-service-info .service-duration {
	font-size: 13px;
	color: #666;
	line-height: 1.3;
}

/* CTA CARD */
.pricing-cta-card {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100px !important;
	height: auto !important;
	padding: 40px 20px;
}

/* ===== SORTING BUTTONS ===== */
.sort-buttons {
	display: flex;
	gap: 12px;
	margin-bottom: 40px;
	flex-wrap: wrap;
	justify-content: center;
}

.sort-btn {
	padding: 12px 28px;
	border-radius: 50px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	overflow: hidden;
	border-style: solid;
	border-width: 2px;
}

.sort-btn::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	transition: width 0.4s ease, height 0.4s ease;
	z-index: 0;
}

.sort-btn span {
	position: relative;
	z-index: 1;
}

.sort-btn:active {
	transform: translateY(0);
}

/* Mobile sorting buttons — keep pill shape, allow wrap */
@media (max-width: 768px) {
	.sort-buttons {
		display: inline-flex;
		flex-wrap: wrap;
		gap: 0;
		margin-bottom: 30px;
		width: auto;
		max-width: 100%;
	}

	/* Hide the JS-positioned selector on mobile — causes the giant circle bug */
	.sort-buttons-selector {
		display: none !important;
	}

	/* Buttons get smooth elastic-style transition on bg color change */
	.sort-btn {
		padding: 10px 16px;
		font-size: 12px;
		white-space: nowrap;
		min-width: unset;
		width: auto;
		transition:
			background 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55),
			color       0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55),
			transform   0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
	}

	/* Active: use CSS variable set by Elementor color control, fallback to orange */
	.sort-btn.active {
		background: var(--sort-active-bg, #E67E50) !important;
		color: #ffffff !important;
		border-radius: 50px;
		transform: scale(1.05);
	}

	/* Non-active buttons shrink back */
	.sort-btn:not(.active) {
		background: transparent !important;
		transform: scale(1);
	}
}

@media (max-width: 480px) {
	.sort-btn {
		padding: 9px 13px;
		font-size: 11px;
	}
}

.cta-card-content {
	text-align: center;
	padding: 30px 40px;
	max-width: 400px;
}

.cta-title {
	font-size: 28px;
	font-weight: 700;
	margin: 0 0 15px 0;
	color: #fff;
}

.cta-description {
	font-size: 16px;
	margin: 0 0 30px 0;
	opacity: 0.9;
	line-height: 1.6;
}

.cta-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #fff;
	color: #667eea;
	padding: 14px 30px;
	border-radius: 50px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.cta-button svg {
	transition: transform 0.3s ease;
}

.cta-button:hover svg {
	transform: translateX(4px);
}

/* SCROLL TRIGGER MODE */
.pricing-card-section.scroll-trigger-enabled {
	padding: 20px 0;
}

.pricing-card-section.scroll-trigger-enabled .pricing-card-carousel {
	overflow: visible;
	will-change: transform;
}

.pricing-card-section.scroll-trigger-enabled .pricing-card {
	flex-shrink: 0;
	flex-basis: 22%;
	min-width: 22%;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
	.pricing-card-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.layout-carousel .pricing-card,
	.pricing-card-section.scroll-trigger-enabled .pricing-card {
		flex-basis: calc(50% - 15px);
		min-width: calc(50% - 15px);
	}
}

@media (max-width: 768px) {
	.pricing-card-section {
		padding: 20px 0;
	}
	
	.pricing-card-grid {
		grid-template-columns: 1fr;
	}
	
	.layout-carousel .pricing-card,
	.pricing-card-section.scroll-trigger-enabled .pricing-card {
		flex-basis: calc(100% - 20px);
		min-width: calc(100% - 20px);
	}
	
	.card-image {
		height: 180px;
	}
	
	.pricing-card {
		min-height: 400px;
	}
}

/* ===================================================
   BOOKING NOTICE BAR — Option B (Warm Soft Card)
   =================================================== */

.booking-notice-bar {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 20px 28px;
	margin-bottom: 36px;
	border-radius: 16px;
	background: #fdf6f0;
	border: 1px solid rgba(230, 126, 80, 0.18);
	box-shadow:
		0 2px 12px rgba(230, 126, 80, 0.08),
		0 1px 3px rgba(0, 0, 0, 0.04);
	position: relative;
	overflow: hidden;
}

/* Soft warm left accent line */
.booking-notice-bar::before {
	content: '';
	position: absolute;
	left: 0;
	top: 16px;
	bottom: 16px;
	width: 3px;
	border-radius: 0 3px 3px 0;
	background: linear-gradient(180deg, #E67E50 0%, #f0a882 100%);
}

/* Decorative background circle — purely aesthetic */
.booking-notice-bar::after {
	content: '';
	position: absolute;
	right: -40px;
	top: -40px;
	width: 140px;
	height: 140px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(230,126,80,0.07) 0%, transparent 70%);
	pointer-events: none;
}

.booking-notice-icon {
	font-size: 28px;
	flex-shrink: 0;
	line-height: 1;
	/* subtle float animation */
	animation: noticeFloat 3s ease-in-out infinite;
}

@keyframes noticeFloat {
	0%, 100% { transform: translateY(0);    }
	50%       { transform: translateY(-5px); }
}

.booking-notice-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.booking-notice-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1.2px;
	color: #E67E50;
}

.booking-notice-text {
	font-size: 15px;
	font-weight: 500;
	color: #2a2a2a;
	line-height: 1.5;
}

.booking-notice-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #E67E50;
	color: #ffffff;
	padding: 13px 26px;
	border-radius: 50px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
	box-shadow: 0 4px 16px rgba(230, 126, 80, 0.35);
	transition:
		transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
		box-shadow 0.28s ease,
		background 0.2s ease;
	position: relative;
	z-index: 1;
}

.booking-notice-btn:hover {
	background: #d4693e;
	transform: translateY(-3px) scale(1.04);
	box-shadow: 0 8px 24px rgba(230, 126, 80, 0.45);
	color: #ffffff;
}

.booking-notice-btn:active {
	transform: translateY(0) scale(0.97);
}

/* Arrow icon inside button */
.booking-notice-btn-arrow {
	display: inline-block;
	transition: transform 0.25s ease;
}

.booking-notice-btn:hover .booking-notice-btn-arrow {
	transform: translateX(4px);
}

/* ── MOBILE: fixed bottom bar ── */
@media (max-width: 768px) {
	/* Hide static version on mobile */
	.booking-notice-bar {
		display: none;
	}

	/* Fixed version toggled by JS */
	.booking-notice-bar.mobile-fixed {
		display: flex;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		margin: 0;
		border-radius: 20px 20px 0 0;
		padding: 16px 20px 20px;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 14px;
		z-index: 9999;
		background: #fdf6f0;
		border: none;
		border-top: 1px solid rgba(230, 126, 80, 0.2);
		box-shadow: 0 -6px 30px rgba(230, 126, 80, 0.15);
		/* slide-up */
		transform: translateY(100%);
		transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
	}

	.booking-notice-bar.mobile-fixed::before {
		/* top pill handle */
		content: '';
		position: absolute;
		top: 8px;
		left: 50%;
		transform: translateX(-50%);
		width: 36px;
		height: 3px;
		border-radius: 3px;
		background: rgba(230, 126, 80, 0.3);
	}

	.booking-notice-bar.mobile-fixed::after {
		display: none;
	}

	.booking-notice-bar.mobile-fixed.is-visible {
		transform: translateY(0);
	}

	.booking-notice-icon {
		font-size: 22px;
	}

	.booking-notice-label {
		display: none;
	}

	.booking-notice-text {
		font-size: 13px;
	}

	.booking-notice-btn {
		padding: 11px 18px;
		font-size: 13px;
	}
}

@media (max-width: 420px) {
	.booking-notice-bar.mobile-fixed {
		flex-direction: column;
		text-align: center;
		gap: 10px;
		padding: 14px 20px 18px;
	}

	.booking-notice-body {
		align-items: center;
	}

	.booking-notice-btn {
		width: 100%;
		justify-content: center;
	}
}
