/*
 * sota-layout.css — SOTA layout + nav + typography polish
 * Trading Hub v2 — additive only, never clobbers existing styles
 * Prefix: .sota- (all classes isolated)
 * Colors: --bg:#06090F --gold:#D4A853 --accent:#4CC2FF --text:#E8EDF5
 */

/* ============================================================
   1. PROGRESS BAR (top of page)
   ============================================================ */

.sota-nprogress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #D4A853, #4CC2FF);
  z-index: 9999;
  transition: width 300ms ease;
  box-shadow: 0 0 8px rgba(212, 168, 83, 0.6);
  border-radius: 0 2px 2px 0;
}

.sota-nprogress.done {
  width: 100%;
  opacity: 0;
  transition: width 200ms ease, opacity 300ms ease 100ms;
}

@media (prefers-reduced-motion: reduce) {
  .sota-nprogress {
    transition: none;
  }
  .sota-nprogress.done {
    transition: none;
  }
}

/* ============================================================
   2. PAGE FADE-IN
   ============================================================ */

@keyframes sota-page-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.sota-page-enter {
  animation: sota-page-in 280ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@media (prefers-reduced-motion: reduce) {
  .sota-page-enter {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   3. STAGGER CHILDREN
   ============================================================ */

.sota-stagger > * {
  opacity: 0;
  transform: translateY(8px);
  animation: sota-page-in 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.sota-stagger > *:nth-child(1) { animation-delay: 60ms; }
.sota-stagger > *:nth-child(2) { animation-delay: 120ms; }
.sota-stagger > *:nth-child(3) { animation-delay: 180ms; }
.sota-stagger > *:nth-child(4) { animation-delay: 240ms; }
.sota-stagger > *:nth-child(5) { animation-delay: 300ms; }
.sota-stagger > *:nth-child(6) { animation-delay: 360ms; }

@media (prefers-reduced-motion: reduce) {
  .sota-stagger > * {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   4. SKELETON SHIMMER
   ============================================================ */

@keyframes sota-shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

.sota-skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
}

.sota-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 100%
  );
  animation: sota-shimmer 1.6s ease-in-out infinite;
}

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

/* ============================================================
   5. TOAST SYSTEM
   ============================================================ */

@keyframes sota-toast-in {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sota-toast-out {
  to {
    opacity: 0;
    transform: translateX(24px) scale(0.95);
  }
}

#sota-toast-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
}

.sota-toast {
  pointer-events: all;
  position: relative;
  background: rgba(12, 16, 24, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 16px;
  color: #E8EDF5;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
  max-width: 380px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: sota-toast-in 280ms cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.sota-toast.out {
  animation: sota-toast-out 220ms ease-in forwards;
}

.sota-toast-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.sota-toast-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 10px 0 0 10px;
}

.sota-toast.success .sota-toast-bar { background: var(--color-directional-bullish, #3fd38f); }
.sota-toast.error   .sota-toast-bar { background: var(--color-directional-bearish, #f26e6e); }
.sota-toast.info    .sota-toast-bar { background: #4CC2FF; }

@media (prefers-reduced-motion: reduce) {
  .sota-toast {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .sota-toast.out {
    animation: none;
    opacity: 0;
  }
}

/* ============================================================
   6. RESPONSIVE GRID
   ============================================================ */

.sota-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.sota-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.sota-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .sota-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sota-grid-2,
  .sota-grid-3,
  .sota-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   7. TYPOGRAPHY
   ============================================================ */

.sota-display {
  font-size: clamp(1.75rem, 4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.sota-headline {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sota-label-caps {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4A5568;
}
