/**
 * WebXtrm Service Orbit Widget Styles
 * Pure CSS animations + SVG animateMotion for pulse flows.
 */

.wx-orbit-wrap {
	width: 100%;
	display: flex;
	justify-content: center;
	box-sizing: border-box;
	padding: 20px 0;
}

.wx-orbit-wrap * {
	box-sizing: border-box;
}

/* ===== ORBIT CONTAINER ===== */
.wx-orbit {
	position: relative;
	width: 100%;
	max-width: 480px;
	aspect-ratio: 1 / 1;
	color: rgba(0, 201, 240, 0.4);
}

/* SVG layer for lines + pulses */
.wx-orbit-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	pointer-events: none;
}

/* Orbit decorative ring */
.wx-orbit-ring {
	stroke: rgba(0, 201, 240, 0.08);
}

/* Connection lines */
.wx-orbit-line {
	stroke: rgba(0, 201, 240, 0.18);
}

/* Pulse dots */
.wx-orbit-pulse {
	fill: #00e8ff;
	filter: drop-shadow(0 0 5px rgba(0, 232, 255, 0.6));
}

/* ===== CENTER HUB ===== */
.wx-orbit-center {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 110px;
	height: 110px;
	border-radius: 50%;
	background: #0d1117;
	border: 1.5px solid rgba(0, 201, 240, 0.4);
	box-shadow: 0 0 40px rgba(0, 201, 240, 0.25),
	            inset 0 0 30px rgba(0, 201, 240, 0.05);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	z-index: 2;
}

.wx-orbit-center-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #00c9f0;
	margin-bottom: 2px;
}

.wx-orbit-center-icon svg {
	width: 26px;
	height: 26px;
	fill: #00c9f0;
	color: #00c9f0;
	display: block;
}

.wx-orbit-center-icon i {
	font-size: 26px;
	color: #00c9f0;
}

.wx-orbit-center-label {
	font-family: 'Inter', sans-serif;
	font-size: 13px;
	font-weight: 800;
	color: #ffffff;
	line-height: 1;
}

.wx-orbit-center-sublabel {
	font-family: 'Inter', sans-serif;
	font-size: 9px;
	font-weight: 600;
	color: #9aacbd;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	line-height: 1;
}

/* ===== SERVICE NODES ===== */
.wx-orbit-node {
	position: absolute;
	top: var(--y, 50%);
	left: var(--x, 50%);
	transform: translate(-50%, -50%);
	z-index: 3;
	pointer-events: auto;
}

.wx-orbit-node-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}

.wx-orbit-node-icon-wrap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #0f131a;
	border: 1.5px solid rgba(0, 201, 240, 0.25);
	transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
	position: relative;
}

.wx-orbit-node:hover .wx-orbit-node-icon-wrap {
	border-color: rgba(0, 201, 240, 0.6);
	transform: scale(1.08);
	box-shadow: 0 0 20px rgba(0, 201, 240, 0.3);
}

.wx-orbit-node-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #00c9f0;
}

.wx-orbit-node-icon svg {
	width: 22px;
	height: 22px;
	fill: #00c9f0;
	color: #00c9f0;
	display: block;
}

.wx-orbit-node-icon i {
	font-size: 22px;
	color: #00c9f0;
}

.wx-orbit-node-label {
	font-family: 'Inter', sans-serif;
	font-size: 11px;
	font-weight: 600;
	color: #ffffff;
	line-height: 1.25;
	text-align: center;
	white-space: nowrap;
	max-width: 110px;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ============================================ */
/* ===== ANIMATIONS ========================== */
/* ============================================ */

/* Center hub gentle pulse glow */
@keyframes wx-orbit-center-glow {
	0%, 100% {
		box-shadow: 0 0 40px rgba(0, 201, 240, 0.25),
		            inset 0 0 30px rgba(0, 201, 240, 0.05);
	}
	50% {
		box-shadow: 0 0 60px rgba(0, 201, 240, 0.45),
		            inset 0 0 35px rgba(0, 201, 240, 0.1);
	}
}

.wx-orbit--center-pulse .wx-orbit-center {
	animation: wx-orbit-center-glow 4s ease-in-out infinite;
}

/* Center pulse ring (SVG circle expanding outward) */
@keyframes wx-orbit-ring-pulse {
	0%   { r: 60; opacity: 0.6; }
	100% { r: 130; opacity: 0; }
}

.wx-orbit--center-pulse .wx-orbit-center-pulse {
	stroke: rgba(0, 201, 240, 0.5);
	animation: wx-orbit-ring-pulse 3s ease-out infinite;
}

/* Node floating — each node moves independently with staggered timing */
@keyframes wx-orbit-float {
	0%, 100% { transform: translate(-50%, -50%) translateY(0); }
	50%      { transform: translate(-50%, -50%) translateY(-4px); }
}

.wx-orbit--float .wx-orbit-node {
	animation: wx-orbit-float 4s ease-in-out infinite;
	animation-delay: calc(var(--wx-i, 0) * 0.4s);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.wx-orbit--center-pulse .wx-orbit-center,
	.wx-orbit--center-pulse .wx-orbit-center-pulse,
	.wx-orbit--float .wx-orbit-node {
		animation: none !important;
	}
	.wx-orbit-pulse {
		display: none;
	}
}

/* Responsive — mobile shrinks fonts/sizes */
@media (max-width: 540px) {
	.wx-orbit-center-label {
		font-size: 11px;
	}
	.wx-orbit-center-sublabel {
		font-size: 8px;
	}
	.wx-orbit-node-label {
		font-size: 9px;
		max-width: 75px;
	}
}
