/**
 * Floating CTA Button Styles
 *
 * A fixed position call-to-action button with vertical text.
 * PC: Displayed on the right edge of the screen
 * Mobile: Displayed on the left edge of the screen
 *
 * @package Onwords
 */

/* ==========================================================================
   Base Styles (PC)
   ========================================================================== */

.floating-cta {
	position: fixed;
	top: 50%;
	right: 0;
	transform: translateY(-50%);
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: 12px;
	animation: floating-cta-entrance 0.3s ease-out;
}

.floating-cta__button {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 38px;
	padding: 16px 12px;
	background-color: #e74a4a;
	color: #fff !important;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	border-radius: 8px 0 0 8px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	writing-mode: vertical-rl;
	text-orientation: upright;
	overflow: hidden;
	transition: all 0.3s cubic-bezier(0.4, 0.4, 0, 1);
}

.floating-cta__button-bg {
	position: absolute;
	top: -200px;
	left: 0;
	right: 0;
	bottom: 86px;
	background: #e74a4a;
	z-index: 0;
	transition: all 0.3s cubic-bezier(0.4, 0.4, 0, 1);
}

.floating-cta__button:hover .floating-cta__button-bg {
	top: 0;
	bottom: -120px;
	background: linear-gradient(165deg, #e60112 0%, #eeaf0f 37%, #f8521e 100%);
	transition-duration: 0.4s;
	transition-timing-function: ease-in-out;
}

.floating-cta__button:hover {
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.floating-cta__button:active {
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.floating-cta__icon {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.floating-cta__icon img {
	width: 16px;
	height: 16px;
	object-fit: contain;
}

.floating-cta__text {
	position: relative;
	z-index: 1;
	color: #fff !important;
	letter-spacing: 0.05em;
}

.floating-cta__text--desktop {
	display: block;
}

.floating-cta__text--mobile {
	display: none;
}

/* ==========================================================================
   Mobile Styles
   ========================================================================== */

@media (max-width: 767px) {
	.floating-cta {
		top: auto;
		right: 0;
		bottom: 0;
		left: 0;
		transform: none;
		padding: 12px 16px;
		background: rgba(0, 0, 0, 0.4);
	}

	.floating-cta__button {
		width: 100%;
		flex-direction: row;
		padding: 14px 20px;
		border-radius: 16px;
		writing-mode: horizontal-tb;
		text-orientation: mixed;
	}

	.floating-cta__button-bg {
		top: 0;
		left: -260px;
		right: 86px;
		bottom: 0;
		background: #e74a4a;
	}

	.floating-cta__button:hover .floating-cta__button-bg,
	.floating-cta__button:active .floating-cta__button-bg {
		left: 0;
		right: -174px;
		background: linear-gradient(75deg, #e60112 0%, #eeaf0f 37%, #f8521e 100%);
	}

	.floating-cta__text--desktop {
		display: none;
	}

	.floating-cta__text--mobile {
		display: block;
	}
}

/* ==========================================================================
   Animation
   ========================================================================== */

@keyframes floating-cta-entrance {
	from {
		opacity: 0;
		transform: translateY(-50%) translateX(20px);
	}
	to {
		opacity: 1;
		transform: translateY(-50%) translateX(0);
	}
}

@keyframes floating-cta-entrance-bottom {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 767px) {
	.floating-cta {
		animation-name: floating-cta-entrance-bottom;
	}
}
