/*
 * GeoUI — Styles
 * Copyright 2024 Luis Koepke. All rights reserved.
 * https://www.luiskoepke.com
 */

/* ── Container ─────────────────────────────────────────────────────────────── */

.geoui-wrap {
	position: relative;
	width: 100%;
	height: 600px;
	min-height: 320px;
	display: block;
}

.geoui-globe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* miniature.earth injects a canvas and uses .earth-container internally */
.geoui-globe canvas {
	display: block !important;
	outline: none;
}

/* Override the default ::before padding-trick from miniature.earth CSS
   so the canvas fills our fixed-height container instead */
.geoui-globe.earth-container::before {
	display: none !important;
}

.geoui-globe.earth-container > canvas {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
}

/* ── Markers ────────────────────────────────────────────────────────────────── */

/* earth-overlay wrapper created by miniature.earth */
.geoui-globe .earth-overlay {
	pointer-events: none;
}

.geoui-marker-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.9);
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.4);
	transform: translate(-50%, -50%);
	transition: transform 0.15s ease;
	cursor: default;
	pointer-events: auto;
}

.geoui-marker-dot:hover {
	transform: translate(-50%, -50%) scale(1.5);
}

/* Dim markers on the back of the globe */
.earth-occluded .geoui-marker-dot {
	opacity: 0.25;
	pointer-events: none;
}

/* ── Tooltip ────────────────────────────────────────────────────────────────── */

.geoui-tooltip {
	position: fixed;
	z-index: 99999;
	pointer-events: none;
	top: 0;
	left: 0;

	background: rgba(10, 10, 20, 0.92);
	color: #e5e7eb;
	border-radius: 12px;
	padding: 14px 18px;
	font-size: 13px;
	line-height: 1.55;
	max-width: 240px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);

	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.18s ease, transform 0.18s ease;

	user-select: none;
	-webkit-user-select: none;
}

.geoui-tooltip.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.geoui-tooltip__inner {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.geoui-tooltip__country {
	margin: 0;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #a78bfa;
}

.geoui-tooltip__office {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: inherit;
}

.geoui-tooltip__address {
	margin: 0;
	font-size: 12px;
	color: rgba(229, 231, 235, 0.65);
	white-space: pre-line;
}

.geoui-tooltip__phone {
	display: inline-block;
	margin-top: 4px;
	font-size: 12px;
	color: #a78bfa;
	text-decoration: none;
	pointer-events: auto;
}

.geoui-tooltip__phone:hover {
	text-decoration: underline;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
	.geoui-wrap {
		height: 360px;
	}

	.geoui-tooltip {
		font-size: 12px;
		padding: 10px 14px;
		max-width: 200px;
	}

	.geoui-marker-dot {
		width: 10px;
		height: 10px;
	}
}
