@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light;
  color: #111827;
  background-color: #F3F4F6;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: #F3F4F6;
}

#root {
  width: 100%;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.pulse-green {
  animation: pulse 2s infinite ease-in-out;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

.dashboard-shell {
  display: flex;
  min-height: 100vh;
  background: #F3F4F6;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.dashboard-main {
  margin-left: 72px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}

.dashboard-content-row {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

.dashboard-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 24px 32px;
  min-width: 0;
}

.dashboard-right-panel {
  width: 308px;
  min-width: 308px;
  max-width: 308px;
}

.trading-sidebar {
  width: 72px;
  min-height: 100vh;
  background: #ffffff;
  border-right: 1px solid #E5E7EB;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 16px;
  padding-bottom: 20px;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 50;
}

.trading-sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: center;
  gap: 2px;
}

.trading-sidebar-link {
  width: 100%;
}

@media (max-width: 1023px) {
  .dashboard-shell {
    padding-bottom: 68px;
  }

  .dashboard-main {
    margin-left: 0;
    min-width: 0;
  }

  .dashboard-content-row {
    min-width: 0;
  }

  .dashboard-content {
    padding: 16px 14px 24px;
  }

  .dashboard-right-panel {
    display: none !important;
  }

  .trading-sidebar {
    width: 100%;
    min-height: 64px;
    height: 64px;
    top: auto;
    right: 0;
    bottom: 0;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    padding: 0 8px;
    border-right: 0;
    border-top: 1px solid #E5E7EB;
    overflow-x: auto;
  }

  .trading-sidebar-logo,
  .trading-sidebar-avatar {
    display: none !important;
  }

  .trading-sidebar-nav {
    flex: 0 1 auto;
    flex-direction: row;
    width: auto;
    max-width: 100%;
    align-items: stretch;
    gap: 0;
  }

  .trading-sidebar-link {
    width: 68px;
    min-width: 68px;
  }
}
