/* /fng/ — фон на весь viewport, без белых полей у body и корня React. */
html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: #0f1419;
}

#react-entry-point,
._dash-loading {
  min-height: 100vh;
  background-color: #0f1419;
}

/* Пока грузятся JS-бандлы Dash/Plotly — спиннер вместо пустого синего экрана. */
._dash-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

._dash-loading::before {
  content: "";
  width: 48px;
  height: 48px;
  border: 3px solid #30363d;
  border-top-color: #58a6ff;
  border-radius: 50%;
  animation: fng-spin 0.85s linear infinite;
}

._dash-loading::after {
  content: "Loading Fear & Greed…";
  color: #e6edf3;
  font-size: 0.95rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  opacity: 0.9;
}

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

/* dcc.Loading: пока сервер строит графики после открытия /fng/. */
.fng-dash-loading .dash-spinner {
  border-top-color: #58a6ff !important;
  border-right-color: #30363d !important;
  border-bottom-color: #30363d !important;
  border-left-color: #30363d !important;
}

.fng-dash-loading .dash-default-spinner {
  filter: none;
}

/* Skeleton-карточки: показываем контур дашборда, пока грузятся данные. */
.fng-skeleton-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
}

.fng-skeleton {
  background: linear-gradient(90deg, #1a2332 25%, #243049 37%, #1a2332 63%);
  background-size: 400% 100%;
  animation: fng-shimmer 1.4s ease infinite;
  border-radius: 12px;
  border: 1px solid #30363d;
}

.fng-skeleton--sidebar {
  flex: 0 0 22%;
  min-width: 240px;
  max-width: 360px;
  height: 520px;
}

.fng-skeleton--chart {
  flex: 1 1 480px;
  min-width: min(100%, 480px);
  height: 520px;
}

@keyframes fng-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fng-skeleton { animation: none; }
}

/* Синяя карточка вокруг главного графика — без принудительного height:100% на SVG Plotly */
.fng-chart-wrap {
  width: 100%;
  background-color: #1a2332;
  border-radius: 6px;
  line-height: 0;
}

.fng-chart-wrap .fng-main-chart,
.fng-chart-wrap .dash-graph {
  width: 100% !important;
  background-color: #1a2332 !important;
}
