/* ==========================================================================
   AMIR EYE — frontend globe (Three.js engine)
   ========================================================================== */

.gevp-root {
	--gevp-accent: #22c55e;
	--gevp-accent-2: #065f46;
	--gevp-panel-bg: #0a120d;
	--gevp-panel-text: #e7fbef;

	position: relative;
	width: 100%;
	min-height: 420px;
	max-height: 92vh;
	border-radius: 18px;
	overflow: hidden;
	background: #050a06;
	border: 1px solid rgba(34, 197, 94, 0.18);
	box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.65);
	font-family: -apple-system, "Segoe UI", Tahoma, "Vazirmatn", sans-serif;
}

.gevp-canvas-container {
	position: absolute;
	inset: 0;
}
.gevp-canvas-container canvas {
	display: block;
	width: 100% !important;
	height: 100% !important;
}

/* ---------- Watermark ---------- */
.gevp-watermark {
	position: absolute;
	bottom: 12px;
	inset-inline-start: 16px;
	z-index: 3;
	font-size: 10.5px;
	letter-spacing: 0.5px;
	color: rgba(255, 255, 255, 0.35);
	pointer-events: none;
}
.gevp-watermark-bold { color: var(--gevp-accent); font-weight: 700; }
.gevp-watermark-brand { color: rgba(255, 255, 255, 0.55); font-weight: 600; }

/* ---------- Loader ---------- */
.gevp-loader {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at 50% 40%, #0e1a12 0%, #050a06 75%);
	transition: opacity 0.5s ease, visibility 0.5s ease;
}
.gevp-loader.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}
.gevp-loader-box {
	text-align: center;
	color: var(--gevp-panel-text);
}
.gevp-loader-logo {
	max-width: 120px;
	max-height: 70px;
	object-fit: contain;
	margin: 0 auto 14px;
	display: block;
}
.gevp-loader-brand {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: 1px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-bottom: 16px;
}
.gevp-eye-core {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #d4ffe4, var(--gevp-accent) 60%, var(--gevp-accent-2) 100%);
	box-shadow: 0 0 14px var(--gevp-accent);
	display: inline-block;
	flex-shrink: 0;
}
.gevp-loader-scan {
	width: 220px;
	height: 2px;
	margin: 0 auto 14px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 2px;
	position: relative;
	overflow: hidden;
}
.gevp-loader-scan::after {
	content: "";
	position: absolute;
	top: 0; bottom: 0; width: 40%;
	background: linear-gradient(90deg, transparent, var(--gevp-accent), transparent);
	animation: gevp-scan 1.4s ease-in-out infinite;
}
@keyframes gevp-scan {
	0% { left: -40%; }
	100% { left: 100%; }
}
.gevp-loader-meta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 12.5px;
	color: rgba(231, 251, 239, 0.75);
}
.gevp-pulse-beacon {
	width: 7px; height: 7px; border-radius: 50%;
	background: var(--gevp-accent);
	box-shadow: 0 0 8px var(--gevp-accent);
	animation: gevp-blink 1.2s ease-in-out infinite;
}
@keyframes gevp-blink {
	0%, 100% { opacity: 1; } 50% { opacity: 0.25; }
}

/* ---------- HUD shell ---------- */
.gevp-hud {
	position: absolute;
	top: 16px;
	inset-inline-end: 16px;
	bottom: 16px;
	z-index: 4;
	width: 250px;
	max-width: calc(100% - 32px);
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: linear-gradient(170deg, var(--gevp-panel-bg) 0%, color-mix(in srgb, var(--gevp-panel-bg) 82%, var(--gevp-accent-2)) 100%);
	color: var(--gevp-panel-text);
	border-radius: 16px;
	padding: 16px;
	backdrop-filter: blur(10px);
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
	overflow-y: auto;
}
.gevp-hud::-webkit-scrollbar { width: 5px; }
.gevp-hud::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }

.gevp-hud-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.gevp-brand-badge { display: flex; align-items: center; gap: 9px; }
.gevp-brand-name { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: 0.4px; }
.gevp-brand-sub { font-size: 10px; color: rgba(231, 251, 239, 0.55); }
.gevp-lang-btn {
	all: unset;
	cursor: pointer;
	font-size: 11px;
	font-weight: 700;
	padding: 5px 10px;
	border-radius: 20px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: var(--gevp-panel-text);
	transition: all 0.15s ease;
}
.gevp-lang-btn:hover { border-color: var(--gevp-accent); color: var(--gevp-accent); }

/* ---------- Telemetry ---------- */
.gevp-telemetry {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}
.gevp-telemetry-box {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 10px;
	padding: 9px 10px;
	text-align: center;
}
.gevp-t-val { display: block; font-size: 17px; font-weight: 800; color: var(--gevp-accent); }
.gevp-t-lbl { font-size: 10px; color: rgba(231, 251, 239, 0.6); }

/* ---------- Sections ---------- */
.gevp-section-title {
	font-size: 10.5px;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: rgba(231, 251, 239, 0.45);
	margin-bottom: 8px;
	padding-inline-start: 2px;
}

.gevp-radio-group { display: flex; flex-direction: column; gap: 6px; }
.gevp-radio-pill {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 8px 10px;
	border-radius: 9px;
	cursor: pointer;
	font-size: 12px;
	border: 1px solid transparent;
	transition: all 0.15s ease;
}
.gevp-radio-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gevp-radio-pill:hover { background: rgba(255, 255, 255, 0.04); }
.gevp-radio-dot {
	width: 9px; height: 9px; border-radius: 50%;
	border: 1.5px solid rgba(255, 255, 255, 0.3);
	flex-shrink: 0;
	transition: all 0.15s ease;
}
.gevp-radio-pill.is-active {
	background: linear-gradient(135deg, color-mix(in srgb, var(--gevp-accent) 18%, transparent), color-mix(in srgb, var(--gevp-accent-2) 18%, transparent));
	border-color: var(--gevp-accent);
	color: var(--gevp-accent);
}
.gevp-radio-pill.is-active .gevp-radio-dot {
	background: var(--gevp-accent);
	border-color: var(--gevp-accent);
	box-shadow: 0 0 6px var(--gevp-accent);
}

.gevp-switch-list { display: flex; flex-direction: column; }
.gevp-switch-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 9px 4px;
	border-radius: 8px;
	transition: background 0.15s ease;
	gap: 10px;
}
.gevp-switch-row:hover { background: rgba(255, 255, 255, 0.04); }
.gevp-switch-info { display: flex; align-items: center; gap: 10px; font-size: 13.5px; min-width: 0; }
.gevp-sw-icon { font-size: 19px; line-height: 1; flex-shrink: 0; }
.gevp-sw-title {
	color: var(--gevp-panel-text, #e7fbef);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.gevp-indicator-dot {
	width: 6px; height: 6px; border-radius: 50%;
	background: var(--gevp-accent);
	box-shadow: 0 0 6px var(--gevp-accent);
	flex-shrink: 0;
}

.gevp-switch { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
.gevp-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gevp-slider {
	position: absolute; inset: 0;
	background: rgba(255, 255, 255, 0.12);
	border-radius: 20px;
	transition: background 0.2s ease;
}
.gevp-slider::after {
	content: "";
	position: absolute; top: 2px; right: 2px;
	width: 16px; height: 16px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
	transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gevp-switch input:checked + .gevp-slider {
	background: linear-gradient(135deg, var(--gevp-accent), var(--gevp-accent-2));
}
.gevp-switch input:checked + .gevp-slider::after { transform: translateX(-16px); }

/* ---------- Event popup ---------- */
.gevp-event-popup {
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(251, 146, 60, 0.35);
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 11.5px;
}
.gevp-event-popup.hidden { display: none; }
.gevp-event-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.gevp-event-badge {
	font-size: 9.5px;
	background: rgba(251, 146, 60, 0.2);
	color: #fdba74;
	padding: 2px 7px;
	border-radius: 20px;
}
.gevp-event-badge::before { content: "⚠ EVENT"; }
.gevp-event-title { font-weight: 600; margin-bottom: 3px; }
.gevp-event-coords { color: rgba(231, 251, 239, 0.5); font-size: 10.5px; direction: ltr; text-align: start; }

/* ---------- Footer ---------- */
.gevp-hud-footer {
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.gevp-status { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: rgba(231, 251, 239, 0.65); }
.gevp-live-blink {
	width: 6px; height: 6px; border-radius: 50%;
	background: var(--gevp-accent);
	box-shadow: 0 0 6px var(--gevp-accent);
	animation: gevp-blink 1.4s ease-in-out infinite;
}
.gevp-feed-source { font-size: 9.5px; color: rgba(231, 251, 239, 0.35); margin-inline-end: auto; }

/* ---------- Mic button ---------- */
.gevp-mic-btn {
	position: relative;
	width: 34px; height: 34px;
	border-radius: 50%;
	border: none;
	background: linear-gradient(135deg, var(--gevp-accent), var(--gevp-accent-2));
	color: #06120b;
	font-size: 14px;
	cursor: pointer;
	flex-shrink: 0;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
	transition: transform 0.15s ease;
}
.gevp-mic-btn:hover { transform: scale(1.06); }
.gevp-mic-btn.is-listening { animation: gevp-mic-live 1s ease-in-out infinite; }
@keyframes gevp-mic-live {
	0%, 100% { box-shadow: 0 4px 14px rgba(0,0,0,0.35); }
	50% { box-shadow: 0 4px 22px var(--gevp-accent); }
}

/* ---------- Gate notice ---------- */
.gevp-gate-notice {
	padding: 60px 24px;
	text-align: center;
	background: #0a120d;
	color: #8fb3a0;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.06);
	font-size: 14px;
}

/* ---------- Mobile: HUD becomes a bottom sheet instead of covering the globe ---------- */
@media (max-width: 720px) {
	.gevp-hud {
		top: auto;
		inset-inline-end: 10px;
		inset-inline-start: 10px;
		bottom: 10px;
		width: auto;
		max-width: none;
		max-height: 66vh;
		padding: 0;
		border-radius: 16px;
		overflow: hidden;
	}
	.gevp-hud-topbar {
		padding: 12px 14px;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}
	.gevp-brand-name { font-size: 12.5px; }
	.gevp-hud-chevron {
		width: 9px; height: 9px;
		border-inline-end: 2px solid rgba(231, 251, 239, 0.6);
		border-bottom: 2px solid rgba(231, 251, 239, 0.6);
		transform: rotate(45deg);
		transition: transform 0.2s ease;
		margin: 0 4px;
	}
	.gevp-hud-body {
		max-height: 0;
		opacity: 0;
		overflow-y: auto;
		padding: 0 14px;
		transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.25s ease;
	}
	.gevp-hud:not(.is-collapsed) .gevp-hud-body {
		max-height: 52vh;
		opacity: 1;
		padding: 0 14px 14px;
		display: flex;
		flex-direction: column;
		gap: 12px;
	}
	.gevp-hud:not(.is-collapsed) .gevp-hud-chevron {
		transform: rotate(225deg);
	}
}

@media (min-width: 721px) {
	/* Desktop never uses the collapse mechanic — body is always visible. */
	.gevp-hud-body { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
	.gevp-hud-chevron { display: none; }
}
