/**
 * Bricks Globe Element Styles
 * CSS for WordPress/Bricks integration
 */

.bricks-globe-wrapper {
	position: relative;
	width: 100%;
	margin: 0 auto;
	background: transparent;
}

.bricks-globe-container {
	position: relative;
	width: 100%;
	height: 500px;
	background: transparent;
	overflow: hidden;
	border-radius: 8px;
}

.bricks-globe-container canvas {
	width: 100% !important;
	height: 100% !important;
	display: block;
	background: transparent !important;
}

/* Globe styling for white/gray appearance */
.bricks-globe-container .scene-container {
	filter: grayscale(100%) brightness(1.8) contrast(1.2);
	background: transparent !important;
}

/* Header section */
.bricks-globe-header {
	text-align: center;
	margin-bottom: 2rem;
}

.bricks-globe-title {
	font-size: 2.5rem;
	font-weight: 700;
	color: #1f2937;
	margin-bottom: 0.5rem;
	line-height: 1.2;
}

.bricks-globe-subtitle {
	font-size: 1.125rem;
	color: #6b7280;
	font-weight: 400;
	line-height: 1.5;
	max-width: 600px;
	margin: 0 auto;
}

/* Loading state */
.globe-loading {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #6b7280;
	font-size: 1rem;
	z-index: 10;
	background: rgba(255, 255, 255, 0.9);
	padding: 1rem 2rem;
	border-radius: 8px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.globe-loading:after {
	content: '';
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 2px solid #e5e7eb;
	border-radius: 50%;
	border-top-color: #14b8a6;
	animation: spin 1s ease-in-out infinite;
	margin-left: 10px;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Responsive design */
@media (max-width: 768px) {
	.bricks-globe-title {
		font-size: 2rem;
	}

	.bricks-globe-subtitle {
		font-size: 1rem;
		padding: 0 1rem;
	}

	.bricks-globe-container {
		height: 400px;
	}
}

@media (max-width: 480px) {
	.bricks-globe-title {
		font-size: 1.75rem;
	}

	.bricks-globe-container {
		height: 350px;
	}

	.bricks-globe-header {
		margin-bottom: 1.5rem;
	}
}

/* Footer integration specific styles */
.footer-section .bricks-globe-wrapper {
	background: transparent;
}

.footer-section .bricks-globe-title {
	color: white;
}

.footer-section .bricks-globe-subtitle {
	color: rgba(255, 255, 255, 0.8);
}

.footer-section .globe-loading {
	background: rgba(0, 0, 0, 0.8);
	color: white;
}

/* Bricks-specific overrides */
.brx-body .bricks-globe-wrapper {
	position: relative;
	z-index: 1;
}

.brx-body .bricks-globe-container canvas {
	max-width: 100%;
	height: auto;
}

/* Controls overlay (for debugging/admin) */
.globe-controls {
	position: absolute;
	top: 10px;
	right: 10px;
	background: rgba(255, 255, 255, 0.9);
	padding: 0.5rem;
	border-radius: 4px;
	font-size: 0.75rem;
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 20;
}

.bricks-globe-wrapper:hover .globe-controls {
	opacity: 1;
}

.globe-controls button {
	background: #14b8a6;
	color: white;
	border: none;
	padding: 0.25rem 0.5rem;
	margin: 0.125rem;
	border-radius: 3px;
	cursor: pointer;
	font-size: 0.75rem;
}

.globe-controls button:hover {
	background: #0f766e;
}

/* Location points styling enhancement */
.bricks-globe-container .globe-tooltip {
	background: rgba(0, 0, 0, 0.9) !important;
	color: white !important;
	border-radius: 6px !important;
	padding: 8px 12px !important;
	font-size: 12px !important;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
	/* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important; */
	/* border: 1px solid rgba(255, 255, 255, 0.1) !important; */
}

/* Arc animation improvements */
.bricks-globe-container .globe-arc {
	animation: globeArcFlow 3s ease-in-out infinite;
}

@keyframes globeArcFlow {
	0% {
		opacity: 0.6;
	}
	50% {
		opacity: 1;
	}
	100% {
		opacity: 0.6;
	}
}

/* Print styles */
@media print {
	.bricks-globe-wrapper {
		display: none;
	}
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.bricks-globe-container .scene-container {
		filter: contrast(2) brightness(1.5);
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	.globe-loading:after,
	.bricks-globe-container .globe-arc {
		animation: none;
	}
}
