/* ==========================================================================
   Floating CTA Button & Slide-in Panel
   ========================================================================== */

.floating-cta {
	position: fixed;
	bottom: 2.5rem;
	right: 2.5rem;
	z-index: 1000;
	view-transition-name: floating-cta;
}

.floating-cta__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	background-color: #1c84ca;
	color: var(--color-white);
	font-family: var(--font-primary);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1;
	padding: 1rem 2.25rem;
	border: none;
	border-radius: 2.14rem;
	cursor: pointer;
	transition: opacity 0.2s;
	box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.2);

	&:hover {
		opacity: 0.9;
	}
}

/* Overlay */
.floating-cta__overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s, visibility 0.3s;
}

.floating-cta__overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

/* Slide-in Panel */
.floating-cta__panel {
	position: fixed;
	top: 0;
	right: 0;
	width: 100%;
	max-width: 32rem;
	height: 100%;
	background-color: var(--color-white);
	z-index: 1001;
	transform: translateX(100%);
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	flex-direction: column;
	box-shadow: -0.25rem 0 1.5rem rgba(0, 0, 0, 0.15);
}

.floating-cta__panel.is-open {
	transform: translateX(0);
}

.floating-cta__panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.5rem 2rem;
	border-bottom: 1px solid #e5e5e5;
}

.floating-cta__panel-title {
	font-family: var(--font-primary);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--color-primary);
	margin: 0;
}

.floating-cta__panel-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	background: none;
	border: none;
	cursor: pointer;
	color: var(--color-text);
	font-size: 1.5rem;
	border-radius: 50%;
	transition: background-color 0.2s;

	&:hover {
		background-color: #f0f0f0;
	}
}

.floating-cta__panel-body {
	flex: 1;
	overflow-y: auto;
	padding: 2rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
	.floating-cta {
		bottom: 1.5rem;
		right: 1.5rem;
	}

	.floating-cta__panel {
		max-width: 100%;
	}
}
