/* ===========================================
   LEFT SIDEBAR MENU - EXPERIMENTAL
   To disable: remove class "with-left-sidebar" from body
   and comment out this CSS file in HTML
   =========================================== */

/* Body with left sidebar - shifts content right */
body.with-left-sidebar {
  /* No changes to body itself */
}

/* Left Sidebar */
.left-sidebar {
  width: 82px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: #08080a;
  border-right: 1px solid #1a1a1ac2;
  display: flex;
  flex-direction: column;
  z-index: 1000; /* Above header */
}

/* Sidebar Logo */
.left-sidebar-logo {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #1a1a1a;
  flex-shrink: 0;
}

.left-sidebar-logo-img {
  width: 42px;
  height: auto;
}

/* Sidebar Navigation */
.left-sidebar-nav {
  flex: 1;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.left-sidebar-nav::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.left-sidebar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  border: none;
  background: transparent;
  color: #c7c7c761;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.left-sidebar-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.left-sidebar-item.active {
  color: #fff;
  background: #171a21;
}

.left-sidebar-item .material-symbols-rounded {
  font-size: 24px;
}

.left-sidebar-item-label {
  font-size: 12px;
  font-weight: 400;
  text-align: center;
  line-height: 1.2;
  max-width: 70px;
  word-wrap: break-word;
}

/* Sidebar bottom section */
.left-sidebar-bottom {
  padding: 12px 0;
  border-top: 1px solid #1a1a1a;
}

/* === LAYOUT ADJUSTMENTS FOR LEFT SIDEBAR === */

/* Header full width */
body.with-left-sidebar header {
  padding-left: 82px; /* Space for sidebar */
  z-index: 999; /* Ensure header is above sidebar */
}

/* Brand title text style */
body.with-left-sidebar .brand-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

body.with-left-sidebar header .container {
  max-width: 100%;
  padding: 0 24px;
}

/* Main content shifted */
body.with-left-sidebar main.container {
  margin-left: 82px;
  max-width: calc(100% - 82px);
  padding: 0 24px;
}

/* Table max width */
body.with-left-sidebar .table-container {
  max-width: 1472px;
  margin-left: auto;
  margin-right: auto;
}

/* Filter section same width as table */
body.with-left-sidebar .filter-section {
  max-width: 1472px;
  margin-left: auto;
  margin-top: 60px;
  margin-right: auto;
}

/* Mobile: reduce top margin */
@media (max-width: 768px) {
  body.with-left-sidebar .filter-section {
    margin-top: 10px;
  }
}

/* Sidebar scroll indicator - controlled by JS based on actual overflow */
.sidebar-scroll-indicator {
  display: none; /* Hidden by default, JS adds .visible when there's overflow */
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  border-top: 1px solid #2a2a2a;
  background: linear-gradient(to top, #08080a 60%, transparent);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.sidebar-scroll-indicator.visible {
  display: flex;
}

.sidebar-scroll-indicator::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(to top, #08080a, transparent);
  pointer-events: none;
}

.sidebar-scroll-indicator .scroll-arrow {
  color: #6b6b6b;
  font-size: 20px;
}

.sidebar-scroll-indicator:hover .scroll-arrow {
  color: #fff;
}

.sidebar-scroll-indicator.at-bottom {
  opacity: 0;
  pointer-events: none;
}

/* Add padding at bottom of nav when indicator is visible */
.left-sidebar-nav.has-overflow {
  padding-bottom: 50px;
}

/* === MEDIUM SCREENS (tablets) === */
@media (max-width: 1400px) {
  .left-sidebar {
    width: 80px;
  }

  .left-sidebar-item-label {
    font-size: 12px;
  }

  body.with-left-sidebar header {
    padding-left: 80px;
  }

  body.with-left-sidebar main.container {
    margin-left: 80px;
    max-width: calc(100% - 80px);
  }
}

/* === MOBILE - HIDE SIDEBAR === */
@media (max-width: 768px) {
  .left-sidebar {
    display: none;
  }

  body.with-left-sidebar header {
    padding-left: 0;
  }

  body.with-left-sidebar header .container {
    max-width: 100%;
    padding: 0 16px;
  }

  body.with-left-sidebar main.container {
    margin-left: 0;
    max-width: 100%;
    /* padding: 0 16px; */
    padding: 0 0px;
  }
}
