/* Sidebar overlay backdrop */
.sidebar-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: calc(var(--z-modal) - 1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-mobile-overlay.is-open {
  display: block;
  opacity: 1;
}

/* Sidebar panel */
.sidebar-mobile {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100%;
  background-color: var(--bg-white);
  border-right: 1px solid var(--border-color);
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.12);
  transition: left 0.3s ease;
}

.sidebar-mobile.is-open {
  left: 0;
}

body.sidebar-open {
  overflow: hidden;
}

.sidebar-mobile-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

/* Nav links */
.sidebar-mobile-links {
  list-style: none;
  padding: 0.75rem 0;
  margin: 0;
}

.sidebar-mobile-links li a {
  display: block;
  padding: 0.875rem 1.5rem;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  border-left: 3px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sidebar-mobile-links li a:hover,
.sidebar-mobile-links li a.active {
  background-color: var(--bg-light);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
}

.sidebar-mobile-cfi-link {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-mobile-cfi-link svg {
  flex-shrink: 0;
  fill: currentColor;
}
