/**
 * Siegel Divorce Law — Footer CTA
 * Sticky floating button that expands into contact options.
 */

.scta-wrap {
	position: fixed;
	bottom: 24px;
	z-index: 9999;
	line-height: 1;
}

.scta-pos-right .scta-wrap {
	right: 24px;
}

.scta-pos-left .scta-wrap {
	left: 24px;
}

.scta-fab {
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* Toggle button below, items above (default: expand up) */
.scta-dir-up .scta-fab {
	flex-direction: column;
}

.scta-dir-down .scta-fab {
	flex-direction: column-reverse;
}

/* ---------- Main toggle button ---------- */
.scta-toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 50%;
	background-color: #1a3c6e;
	color: #fff;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
	z-index: 2;
}

.scta-toggle:focus-visible {
	outline: 3px solid rgba(201, 162, 75, 0.9);
	outline-offset: 2px;
}

.scta-toggle i,
.scta-toggle svg {
	transition: opacity 0.2s ease, transform 0.3s ease;
}

.scta-toggle svg {
	width: 24px;
	height: 24px;
}

/* Icon swap: main <-> close */
.scta-close-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) rotate(-90deg) scale(0.5);
	opacity: 0;
	display: inline-flex;
	transition: opacity 0.2s ease, transform 0.3s ease;
}

.scta-main-icon {
	display: inline-flex;
	transition: opacity 0.2s ease, transform 0.3s ease;
}

.scta-fab.is-open .scta-main-icon {
	opacity: 0;
	transform: rotate(90deg) scale(0.5);
}

.scta-fab.is-open .scta-close-icon {
	opacity: 1;
	transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

/* ---------- Items list ---------- */
.scta-items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	pointer-events: none;
}

.scta-dir-up .scta-items {
	margin-bottom: 12px;
	flex-direction: column;
}

.scta-dir-down .scta-items {
	margin-top: 12px;
	flex-direction: column-reverse;
}

.scta-item {
	opacity: 0;
	transform: translateY(16px) scale(0.6);
	transition: opacity 0.25s ease, transform 0.25s ease;
	display: flex;
	align-items: center;
}

.scta-dir-down .scta-item {
	transform: translateY(-16px) scale(0.6);
}

/* Open state reveals the items with a subtle stagger */
.scta-fab.is-open .scta-items {
	pointer-events: auto;
}

.scta-fab.is-open .scta-item {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.scta-fab.is-open .scta-item:nth-child(1) { transition-delay: 0.04s; }
.scta-fab.is-open .scta-item:nth-child(2) { transition-delay: 0.08s; }
.scta-fab.is-open .scta-item:nth-child(3) { transition-delay: 0.12s; }
.scta-fab.is-open .scta-item:nth-child(4) { transition-delay: 0.16s; }
.scta-fab.is-open .scta-item:nth-child(5) { transition-delay: 0.20s; }
.scta-fab.is-open .scta-item:nth-child(6) { transition-delay: 0.24s; }

/* ---------- Item link (round icon) ---------- */
.scta-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background-color: #1a3c6e;
	color: #fff;
	text-decoration: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.scta-link:hover {
	transform: scale(1.08);
}

.scta-link i {
	font-size: 18px;
}

.scta-link svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

/* ---------- Tooltip / label ---------- */
.scta-item-label {
	position: absolute;
	white-space: nowrap;
	background-color: #222;
	color: #fff;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 13px;
	line-height: 1.4;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Tooltip sits opposite the screen edge */
.scta-pos-right .scta-item-label {
	right: calc(100% + 12px);
	transform: translateX(8px);
}

.scta-pos-left .scta-item-label {
	left: calc(100% + 12px);
	transform: translateX(-8px);
}

/* small arrow */
.scta-item-label::after {
	content: "";
	position: absolute;
	top: 50%;
	margin-top: -5px;
	border: 5px solid transparent;
}

.scta-pos-right .scta-item-label::after {
	left: 100%;
	border-left-color: #222;
}

.scta-pos-left .scta-item-label::after {
	right: 100%;
	border-right-color: #222;
}

/* label visibility modes */
.scta-labels-hover .scta-link:hover .scta-item-label,
.scta-labels-hover .scta-link:focus-visible .scta-item-label {
	opacity: 1;
	transform: translateX(0);
}

.scta-labels-always .scta-fab.is-open .scta-item-label {
	opacity: 1;
	transform: translateX(0);
}

.scta-labels-never .scta-item-label {
	display: none;
}

/* ---------- Pulse animation ---------- */
.scta-pulse-yes .scta-toggle::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: var(--scta-pulse, rgba(26, 60, 110, 0.5));
	z-index: -1;
	animation: scta-pulse 2s infinite;
}

.scta-pulse-yes .scta-fab.is-open .scta-toggle::before {
	animation: none;
	opacity: 0;
}

@keyframes scta-pulse {
	0%   { transform: scale(1); opacity: 0.6; }
	70%  { transform: scale(1.6); opacity: 0; }
	100% { transform: scale(1.6); opacity: 0; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
	.scta-toggle,
	.scta-item,
	.scta-link,
	.scta-item-label,
	.scta-main-icon,
	.scta-close-icon {
		transition: none !important;
	}
	.scta-pulse-yes .scta-toggle::before {
		animation: none !important;
	}
}
