/* Orbit Reach Frontend Styles */

.orbit-reach-wrapper {
	position: fixed;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	pointer-events: none; /* Let clicks pass through empty spaces */
}

/* Positioning */
.orbit-reach-wrapper.or-align-left { left: var(--or-offset-x); }
.orbit-reach-wrapper.or-align-right { right: var(--or-offset-x); }
.orbit-reach-wrapper.or-align-center { left: 50%; transform: translateX(-50%); }

.orbit-reach-wrapper.or-place-top { top: var(--or-offset-y); }
.orbit-reach-wrapper.or-place-bottom { bottom: var(--or-offset-y); }
.orbit-reach-wrapper.or-place-middle { top: 50%; transform: translateY(-50%); }

/* If both center and middle */
.orbit-reach-wrapper.or-align-center.or-place-middle {
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
}

/* Container for inner items to apply pointer events */
.orbit-reach-icons-inner, .orbit-reach-toggle-btn {
	pointer-events: auto;
}

/* Stack Direction */
.orbit-reach-wrapper.or-stack-vertical .orbit-reach-icons-inner {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.orbit-reach-wrapper.or-stack-horizontal .orbit-reach-icons-inner {
	display: flex;
	flex-direction: row;
	gap: 10px;
}

/* Base Icon Link Style */
.orbit-reach-icon-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--or-size);
	height: var(--or-size);
	border-radius: var(--or-radius);
	box-shadow: var(--or-shadow);
	text-decoration: none;
	transition: all 0.3s ease;
	position: relative;
}

.orbit-reach-icon-link i {
	font-size: calc(var(--or-size) * 0.5);
}

.orbit-reach-icon-link svg {
	width: 50%;
	height: 50%;
	fill: currentColor;
}

/* Hover Effects */
.or-hover-scale:hover {
	transform: scale(1.15);
}

.or-hover-glow:hover {
	box-shadow: 0 0 15px currentColor;
}

.or-hover-rotate:hover {
	transform: rotate(360deg) scale(1.1);
}

/* Tooltips */
.orbit-reach-icon-link[data-tooltip]:hover::after {
	content: attr(data-tooltip);
	position: absolute;
	background: rgba(0,0,0,0.8);
	color: #fff;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	animation: or-tooltip-fade 0.3s forwards;
	z-index: 10;
}

@keyframes or-tooltip-fade {
	to { opacity: 1; }
}

/* Tooltip positioning logic */
.or-align-right .orbit-reach-icon-link[data-tooltip]:hover::after { right: calc(100% + 10px); }
.or-align-left .orbit-reach-icon-link[data-tooltip]:hover::after { left: calc(100% + 10px); }
.or-align-center .orbit-reach-icon-link[data-tooltip]:hover::after { bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); }

/* Toggle Button */
.orbit-reach-toggle-btn {
	background: #333;
	color: #fff;
	border: none;
	width: calc(var(--or-size) * 0.8);
	height: calc(var(--or-size) * 0.8);
	border-radius: var(--or-radius);
	box-shadow: var(--or-shadow);
	cursor: pointer;
	margin-top: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
}

.or-stack-horizontal .orbit-reach-toggle-btn {
	margin-top: 0;
	margin-left: 10px;
}

.orbit-reach-toggle-btn.closed i::before {
	content: "\f067"; /* fa-plus */
}

/* Hide Reveal Transition */
.orbit-reach-icons-inner {
	transition: max-height 0.5s ease, max-width 0.5s ease, opacity 0.5s ease, transform 0.5s ease;
	opacity: 1;
	transform: scale(1);
}

.orbit-reach-icons-inner.is-hidden {
	opacity: 0;
	transform: scale(0.5);
	pointer-events: none;
}

/* Animations */
.or-anim-pulse .orbit-reach-icon-link {
	animation: or-pulse 2s infinite;
}

@keyframes or-pulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.05); }
	100% { transform: scale(1); }
}

/* Cancel hover conflicts with pulse */
.or-anim-pulse .or-hover-scale:hover { animation: none; transform: scale(1.15); }

.or-anim-bounce .orbit-reach-icon-link {
	animation: or-bounce 2s infinite;
}

@keyframes or-bounce {
	0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
	40% { transform: translateY(-10px); }
	60% { transform: translateY(-5px); }
}

.or-anim-fade .orbit-reach-icon-link {
	animation: or-fade-loop 3s infinite;
}

@keyframes or-fade-loop {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.6; }
}

/* Stagger animations for inner children */
.or-anim-pulse .orbit-reach-icon-link:nth-child(1) { animation-delay: 0s; }
.or-anim-pulse .orbit-reach-icon-link:nth-child(2) { animation-delay: 0.2s; }
.or-anim-pulse .orbit-reach-icon-link:nth-child(3) { animation-delay: 0.4s; }
.or-anim-pulse .orbit-reach-icon-link:nth-child(4) { animation-delay: 0.6s; }
.or-anim-pulse .orbit-reach-icon-link:nth-child(5) { animation-delay: 0.8s; }

.or-anim-bounce .orbit-reach-icon-link:nth-child(1) { animation-delay: 0s; }
.or-anim-bounce .orbit-reach-icon-link:nth-child(2) { animation-delay: 0.2s; }
.or-anim-bounce .orbit-reach-icon-link:nth-child(3) { animation-delay: 0.4s; }
.or-anim-bounce .orbit-reach-icon-link:nth-child(4) { animation-delay: 0.6s; }
.or-anim-bounce .orbit-reach-icon-link:nth-child(5) { animation-delay: 0.8s; }
