/* ==========================================
   SIDEBAR & MENUS
   ========================================== */
.sidebar {
  position: absolute;
  top: 0;
  right: 0;
  height: 100vh;
  height: 100dvh;
  width: 320px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.4);
  z-index: 2500;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: visible !important;
}

.sidebar-scrollable {
  width: 100%;
  height: 100%;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
}

.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-section>label:first-child,
.section-heading {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.05em;
}

.toggle-sidebar-btn {
  position: absolute;
  top: 2rem;
  left: -32px;
  width: 32px;
  height: 48px;
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-right: none;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-sidebar-btn:hover {
  background: #6366f1;
  color: #fff;
}

.arrow-icon {
  width: 8px;
  height: 8px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

.sidebar.collapsed {
  transform: translateX(100%);
}

.sidebar.collapsed .arrow-icon {
  transform: rotate(-135deg);
}

.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.2s ease;
}

.custom-select-trigger:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

.custom-select-trigger .arrow {
  width: 10px;
  height: 10px;
  border-bottom: 2px solid #94a3b8;
  border-left: 2px solid #94a3b8;
  transform: translateY(-2px) rotate(-45deg);
  transition: transform 0.3s ease;
}

.custom-select-wrapper.open .arrow {
  transform: translateY(2px) rotate(135deg);
}

.custom-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.5rem;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 3000;
  max-height: 250px;
  overflow-y: auto;
}

.custom-select-wrapper.open .custom-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-option {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #e2e8f0;
  cursor: pointer;
  transition: background 0.2s ease;
}

.custom-option:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #fff;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-item-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-left: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #e2e8f0;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background 0.2s ease;
  flex-grow: 1;
}

.checkbox-label:hover {
  background: rgba(255, 255, 255, 0.05);
}

.checkbox-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.checkbox-custom {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.checkbox-custom::after {
  content: '';
  position: absolute;
  top: 1px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #94a3b8;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.checkbox-label input:checked+.checkbox-custom {
  background: #6366f1;
  border-color: #6366f1;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
}

.checkbox-label input:checked+.checkbox-custom::after {
  transform: translateX(-16px);
  background: #fff;
}

/* 🔥 FIXED: Info Button is now explicitly visible on Desktop too */
.sidebar-info-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sidebar-info-btn svg {
  width: 18px;
  height: 18px;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 2px rgba(165, 180, 252, 0.3));
}

.sidebar-info-btn:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.8), rgba(79, 70, 229, 0.9));
  border-color: #818cf8;
  color: #fff;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 15px rgba(99, 102, 241, 0.4), 0 0 12px rgba(99, 102, 241, 0.3) inset;
}

.sidebar-info-btn:hover svg {
  transform: rotate(10deg) scale(1.15);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
}

.sidebar-info-btn:active {
  transform: translateY(0) scale(0.95);
  box-shadow: 0 2px 5px rgba(99, 102, 241, 0.4);
}

.sidebar-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.action-btn {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  font-family: inherit;
}

.clear-map-btn {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.clear-map-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}