/* EONET bileşenleri (sorgu kutusu, yanıt paneli, küre etiketi): sadece eonet- sınıfları, global etiket seçicisi yok.
   Değişkenler #app-shell üzerindeki .eonet-theme sınıfından gelir. */

.eonet-theme {
  --eonet-bg: #02040a;
  --eonet-surface: rgba(9, 13, 26, 0.74);
  --eonet-surface-strong: rgba(14, 20, 38, 0.9);
  --eonet-border: rgba(148, 178, 255, 0.12);
  --eonet-text: #e8eefc;
  --eonet-text-dim: #93a1bf;
  --eonet-text-faint: #5f6d8a;
  --eonet-accent: #7aa2ff;
  --eonet-panel-width: 420px;
}

.eonet-stage { position: absolute; inset: 0; cursor: grab; }
.eonet-stage:active { cursor: grabbing; }
.eonet-globe-canvas { display: block; width: 100%; height: 100%; }
.eonet-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

/* Sorgu kutusu: HUD katmanının altında; HUD tıklamayı sahneye geçirdiği için sadece kutu etkileşimli */
.eonet-query-dock {
  position: absolute; left: 24px; right: 24px; bottom: 28px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: right 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.eonet-theme:has(.eonet-panel-open) .eonet-query-dock { right: calc(var(--eonet-panel-width) + 40px); }
.eonet-query {
  position: relative; display: flex; align-items: center; gap: 10px;
  width: min(680px, 100%); padding: 8px 8px 8px 18px; border-radius: 999px;
  background: var(--eonet-surface); border: 1px solid var(--eonet-border);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s;
}
.eonet-query:focus-within { border-color: rgba(122, 162, 255, 0.5); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(122, 162, 255, 0.12); }
.eonet-query, .eonet-query-status { pointer-events: auto; font-family: "Inter", system-ui, sans-serif; }
.eonet-query-icon { color: var(--eonet-accent); display: flex; }
.eonet-query-mic {
  flex: none; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  border: 1px solid var(--eonet-border); background: transparent; color: var(--eonet-text-dim);
  transition: color 0.15s, border-color 0.15s, background-color 0.15s, border-radius 0.15s, transform 0.15s;
}
.eonet-query-mic:hover {
  color: #fff;
  border-color: rgba(122, 162, 255, 0.6);
  background: rgba(122, 162, 255, 0.14);
}
.eonet-query-mic.is-idle {
  border-radius: 50%;
}
.eonet-query-mic.is-listening {
  color: #fff;
  border-color: #ef4444;
  background: #ef4444;
  border-radius: 8px;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.55);
}
.eonet-query-mic.is-listening:hover {
  background: #dc2626;
  border-color: #dc2626;
  transform: scale(1.05);
}
.eonet-query-mic.is-speaking {
  color: #fff;
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.35);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.5);
  animation: ag-pulse-speaking 1.2s infinite ease-in-out;
}
.eonet-query-mic.is-speaking:hover {
  color: #fff;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.3);
}
@keyframes ag-pulse-speaking {
  0%, 100% { transform: scale(1); box-shadow: 0 0 10px rgba(59, 130, 246, 0.4); }
  50% { transform: scale(1.08); box-shadow: 0 0 18px rgba(59, 130, 246, 0.7); }
}
.eonet-query-input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  color: var(--eonet-text); font: 400 15px/1.4 "Inter", sans-serif; padding: 10px 0;
}
.eonet-query-input::placeholder { color: var(--eonet-text-faint); }
.eonet-query-submit {
  flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #5b8cff, #7a5bff);
  box-shadow: 0 6px 20px rgba(91, 140, 255, 0.4); transition: transform 0.15s, filter 0.15s;
}
.eonet-query-submit:hover { transform: scale(1.05); filter: brightness(1.1); }
.eonet-query-progress {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; opacity: 0;
  background: linear-gradient(90deg, transparent, #7aa2ff, #c084fc, transparent);
  background-size: 50% 100%; background-repeat: no-repeat;
}
.eonet-query-busy .eonet-query-progress { opacity: 1; animation: eonet-scan 1.1s linear infinite; }
.eonet-query-busy .eonet-query-submit { filter: grayscale(0.6) brightness(0.8); pointer-events: none; }
.eonet-query-status { min-height: 18px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--eonet-accent); }
@keyframes eonet-scan { from { background-position: -100% 0; } to { background-position: 200% 0; } }

/* Afet etiketi */
.eonet-label { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity 0.4s; will-change: transform; }
.eonet-label-visible { opacity: 1; }
.eonet-label-hidden { opacity: 0; }
/* Etiket sütunun sağında durur, kısa yatay çizgiyle olaya bağlanır */
.eonet-label::before {
  content: ""; position: absolute; left: 10px; top: 0; width: 56px; height: 1px;
  background: linear-gradient(to right, transparent, var(--eonet-label-color, #fff));
}
.eonet-label-category, .eonet-label-title { position: absolute; left: 72px; white-space: nowrap; }
.eonet-label-flip::before { left: auto; right: 10px; background: linear-gradient(to left, transparent, var(--eonet-label-color, #fff)); }
.eonet-label-flip .eonet-label-category, .eonet-label-flip .eonet-label-title { left: auto; right: 72px; text-align: right; }
.eonet-label-category {
  top: -26px; font: 600 10px/1 "Inter", sans-serif; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--eonet-label-color, #fff); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.8);
}
.eonet-label-title {
  top: -12px; padding: 6px 12px; border-radius: 8px; font: 500 13px/1.2 "Inter", sans-serif;
  background: rgba(6, 10, 20, 0.78); border: 1px solid var(--eonet-border); backdrop-filter: blur(10px);
  max-width: min(320px, 55vw); overflow: hidden; text-overflow: ellipsis;
}

/* Sağ panel */
.eonet-panel {
  position: absolute; z-index: 26; top: 4.5rem; right: 16px; bottom: 16px; color: var(--eonet-text); font-family: "Inter", system-ui, sans-serif; width: var(--eonet-panel-width);
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: var(--eonet-surface); border: 1px solid var(--eonet-border);
  backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform: translateX(calc(100% + 24px)); opacity: 0;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s;
}
.eonet-panel-open { transform: none; opacity: 1; }
.eonet-panel-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(5, 8, 16, 0.6); color: #fff;
  font-size: 20px; line-height: 1; cursor: pointer; backdrop-filter: blur(8px);
}
.eonet-panel-close:hover { background: rgba(30, 40, 70, 0.8); }
.eonet-panel-body { flex: 1; overflow-y: auto; padding-bottom: 24px; scrollbar-width: thin; scrollbar-color: rgba(148, 178, 255, 0.2) transparent; }

.eonet-figure { margin: 0; }
.eonet-figure-frame { position: relative; aspect-ratio: 16 / 10; background: #050913; overflow: hidden; }
.eonet-figure-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 0.5s, transform 6s ease-out; }
.eonet-figure-loading .eonet-figure-img, .eonet-figure-failed .eonet-figure-img { opacity: 0; }
.eonet-figure:not(.eonet-figure-loading) .eonet-figure-img { transform: scale(1.04); }
.eonet-figure-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(2, 4, 10, 0) 55%, rgba(9, 13, 26, 0.95) 100%);
}
.eonet-figure-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; color: var(--eonet-text-faint); font-size: 13px;
  background: linear-gradient(110deg, #070c18 30%, #0f1730 50%, #070c18 70%); background-size: 200% 100%;
  animation: eonet-shimmer 1.6s linear infinite;
}
.eonet-figure:not(.eonet-figure-loading):not(.eonet-figure-failed) .eonet-figure-placeholder { display: none; }
.eonet-figure-failed .eonet-figure-placeholder { animation: none; }
@keyframes eonet-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.eonet-figure-tabs { position: absolute; left: 14px; bottom: 12px; z-index: 1; display: flex; gap: 6px; }
.eonet-figure-tab {
  padding: 6px 11px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.16); cursor: pointer;
  background: rgba(5, 8, 16, 0.55); color: var(--eonet-text-dim); font: 500 11px/1 "Inter", sans-serif; backdrop-filter: blur(8px);
}
.eonet-figure-tab-active { background: rgba(122, 162, 255, 0.25); color: #fff; border-color: rgba(122, 162, 255, 0.55); }
.eonet-figure-caption { padding: 8px 22px 0; font-size: 11px; color: var(--eonet-text-faint); }

.eonet-panel-header { padding: 14px 22px 4px; }
.eonet-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.eonet-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08);
  font: 600 11px/1 "Inter", sans-serif; letter-spacing: 0.04em; color: var(--eonet-text);
}
.eonet-chip-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: 0 0 10px currentColor; }
.eonet-panel-title { margin: 0; font: 600 22px/1.25 "Space Grotesk", "Inter", sans-serif; letter-spacing: -0.01em; text-wrap: balance; }

.eonet-section-title {
  margin: 0 0 8px; font: 600 10px/1 "Inter", sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--eonet-text-faint);
}
.eonet-summary {
  margin: 16px 22px 0; padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(91, 140, 255, 0.1), rgba(192, 132, 252, 0.06));
  border: 1px solid rgba(122, 162, 255, 0.18);
}
.eonet-summary-text { margin: 0; font-size: 14px; line-height: 1.6; color: #d6def2; }
.eonet-note { margin: 12px 22px 0; font-size: 12px; color: #fbbf24; }

.eonet-facts { margin: 16px 22px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-radius: 14px; overflow: hidden; background: var(--eonet-border); border: 1px solid var(--eonet-border); }
.eonet-fact { margin: 0; padding: 12px 14px; background: var(--eonet-surface-strong); }
.eonet-fact-label { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--eonet-text-faint); }
.eonet-fact-value { margin: 5px 0 0; font: 500 13.5px/1.35 "Inter", sans-serif; color: var(--eonet-text); font-variant-numeric: tabular-nums; }
.eonet-fact-sub { display: block; margin-top: 2px; font-size: 11.5px; color: var(--eonet-accent); }

.eonet-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 22px 0; }
.eonet-link {
  padding: 8px 12px; border-radius: 10px; font-size: 12.5px; font-weight: 500; text-decoration: none;
  color: var(--eonet-text); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--eonet-border);
}
.eonet-link:hover { border-color: rgba(122, 162, 255, 0.5); color: #fff; }

.eonet-others { margin: 22px 22px 0; }
.eonet-others-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.eonet-other {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 10px; border: 0; border-radius: 10px;
  background: transparent; color: inherit; text-align: left; cursor: pointer; font: inherit;
}
.eonet-other:hover { background: rgba(255, 255, 255, 0.05); }
.eonet-other-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.eonet-other-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eonet-other-meta { font-size: 11.5px; color: var(--eonet-text-faint); }

/* Bölünmüş ekranda (3D + 2D canvas) iki yarı da yanıt panelinin altında kalmasın diye panel genişliği ayrılır */
.eonet-theme.is-split-screen .ag-viewport-area { padding-right: calc(var(--eonet-panel-width) + 32px); }

@media (max-width: 760px) {
  .eonet-theme.is-split-screen .ag-viewport-area { padding-right: 0; }
  .eonet-theme { --eonet-panel-width: auto; }
  .eonet-query-dock { left: 16px; right: 16px; bottom: 16px; }
  .eonet-theme:has(.eonet-panel-open) .eonet-query-dock { right: 16px; top: 68px; bottom: auto; }
  .eonet-theme:has(.eonet-panel-open) .eonet-query-status { display: none; }
  .eonet-panel { top: auto; left: 8px; right: 8px; bottom: 8px; height: 58vh; width: auto; transform: translateY(calc(100% + 24px)); }
  .eonet-panel-open { transform: none; }
}
