/* ===== MOBILE SIDEBAR MENU STYLES ===== */

/* Hamburger Menu Button */
.mobile-menu-btn {
  color: #333;
  font-size: 1.75rem;
  line-height: 1;
  text-decoration: none;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:focus {
  color: #007bff;
  text-decoration: none;
  outline: none;
}

body.dark-mode .mobile-menu-btn {
  color: #fff;
}

body.dark-mode .mobile-menu-btn:hover,
body.dark-mode .mobile-menu-btn:focus {
  color: #66b3ff;
}

/* Icon hamburger lebih kecil untuk mobile agar seimbang dengan logo */
@media (max-width: 767.98px) {
  .mobile-menu-btn {
    font-size: 1.4rem;
  }
}

/* Mobile Sidebar Overlay */
.mobile-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Sidebar - Floating Centered Design */
.mobile-sidebar {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 85%;
  max-width: 320px;
  max-height: 70vh;
  background-color: #fff;
  z-index: 1050;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.mobile-sidebar.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

body.dark-mode .mobile-sidebar {
  background-color: #1a1a1a;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Sidebar Header */
.mobile-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem 0.5rem 1rem;
  border-bottom: 1px solid #e0e0e0;
  background-color: transparent;
}

body.dark-mode .mobile-sidebar-header {
  background-color: transparent;
  border-bottom-color: #333;
}

.mobile-sidebar-header h5 {
  font-weight: 600;
  font-size: 0.95rem;
  color: #333;
  margin: 0;
}

body.dark-mode .mobile-sidebar-header h5 {
  color: #f8f9fa;
}

.mobile-sidebar-header .btn-link {
  color: #333;
  font-size: 1.1rem;
  text-decoration: none;
  padding: 0;
}

.mobile-sidebar-header .btn-link:hover {
  color: #007bff;
}

body.dark-mode .mobile-sidebar-header .btn-link {
  color: #f8f9fa;
}

body.dark-mode .mobile-sidebar-header .btn-link:hover {
  color: #66b3ff;
}

/* Sidebar Content */
.mobile-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem 0.875rem 1rem;
}

/* Mobile Navigation Grid - 2 Columns */
.mobile-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem 0.75rem;
  row-gap: 0.35rem;
}

.mobile-nav-link {
  display: block;
  padding: 0.5rem 0.5rem;
  color: #333;
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: left;
  background-color: transparent;
}

.mobile-nav-link:hover {
  color: #007bff;
}

body.dark-mode .mobile-nav-link {
  color: #e9ecef;
}

body.dark-mode .mobile-nav-link:hover {
  color: #66b3ff;
}

.mobile-nav-link span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Network Section */
.mobile-nav-section {
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid #e0e0e0;
}

body.dark-mode .mobile-nav-section {
  border-top-color: #333;
}

.mobile-nav-section-header {
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 0.625rem;
  padding-left: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.dark-mode .mobile-nav-section-header {
  color: #aaa;
}

/* Hide sidebar on desktop */
@media (min-width: 768px) {
  .mobile-sidebar,
  .mobile-sidebar-overlay {
    display: none !important;
  }
}
