/**
 * Floating CTA Button
 *
 * Fixed-position CTA button anchored to the right side of the viewport.
 * Distinct pill style that stands out from regular page buttons.
 *
 * @package 3MW_Core_Child
 * @since 1.4.0
 */

/* ==========================================
   FLOATING BUTTON
   ========================================== */

.floating-cta-btn {
	position: fixed !important;
	right: -4px;
	top: 35%;
	z-index: 99 !important;
	border: 2px solid var(--color-white);
	border-right: 0;

	/* Rotated text running vertically along the right edge */
	writing-mode: vertical-rl;
	text-orientation: mixed;

	/* Pill shape */
	padding: var(--space-md) var(--space-sm);
	border-radius: var(--radius-button) 0 0 var(--radius-button);

	/* Colors */
	background: var(--color-primary);
	color: var(--color-white);

	/* Typography */
	font-size: var(--font-size-small);
	font-weight: var(--font-weight-semibold);
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	line-height: 1;

	/* Interaction */
	cursor: pointer;
	transition:
		background var(--transition-base),
		transform var(--transition-base),
		box-shadow var(--transition-base);

	/* Elevation */
	box-shadow:
		0 0 6px 2px rgb(255 255 255 / 25%),
		var(--shadow-md);
}

.floating-cta-btn:hover,
.floating-cta-btn:focus-visible {
	background: var(--color-primary);
	color: var(--color-white);
	transform: translateX(-4px);
	box-shadow: var(--shadow-lg);
	text-decoration: none;
}

.floating-cta-btn:focus-visible {
	outline: 2px dashed var(--color-white);
	outline-offset: -4px;
}

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

@media (width <= 768px) {
	.floating-cta-btn {
		/* Switch to horizontal pill at bottom-right on mobile */
		writing-mode: horizontal-tb;
		text-orientation: initial;
		padding: var(--space-sm);
		font-size: var(--font-size-small);
		border-radius: var(--radius-button) var(--radius-button) 0 0;
		bottom: 0;
		right: 10px;
		top: auto;
	}
}
