/**
 * HUCAA Alumni Forum - Module Sidebar Styles
 * Dedicated CSS file for consistent sidebar styling across all modules
 */

/* ============================================================================
   MODULE SIDEBAR CONTAINER
   ============================================================================ */

.module-sidebar {
  flex: 0 0 320px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  padding: 0;
  height: fit-content;
  position: sticky;
  top: 1.5rem;
}

/* ============================================================================
   SIDEBAR SECTIONS AND STRUCTURE
   ============================================================================ */

.module-sidebar .sidebar-section {
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
  background: #fff;
}

.module-sidebar .sidebar-section:not(:last-child) {
  border-bottom: 1px solid #e5e7eb;
}

.module-sidebar .sidebar-header {
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin: 0;
  border-radius: 0;
}

.module-sidebar .sidebar-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
}

.module-sidebar .sidebar-title i {
  margin-right: 0.5rem;
  color: #667eea;
}

.module-sidebar .sidebar-content {
  padding: 0.75rem;
}

.module-sidebar .sidebar-content.p-0 {
  padding: 0;
}

/* ============================================================================
   SIDEBAR NAVIGATION
   ============================================================================ */

.module-sidebar .sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.module-sidebar .sidebar-nav-item {
  border-bottom: 1px solid #f0f0f0;
}

.module-sidebar .sidebar-nav-item:last-child {
  border-bottom: none;
}

.module-sidebar .sidebar-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  color: #374151;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.module-sidebar .sidebar-nav-link:hover {
  background: #f8fafc;
  color: #667eea;
  text-decoration: none;
}

.module-sidebar .sidebar-nav-link.active {
  background: linear-gradient(90deg, #f8fafc 0%, #e0e7ff 100%);
  color: #667eea;
  border-right: 3px solid #667eea;
  font-weight: 600;
}

.module-sidebar .nav-icon {
  margin-right: 0.75rem;
  width: 20px;
  text-align: center;
}

/* ============================================================================
   SIDEBAR LISTS AND ITEMS
   ============================================================================ */

.module-sidebar .sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.module-sidebar .sidebar-list-item {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
  font-size: 0.85rem;
}

.module-sidebar .sidebar-list-item:last-child {
  border-bottom: none;
}

.module-sidebar .sidebar-list-item:hover {
  background: #f8fafc;
}

/* ============================================================================
   SIDEBAR BADGES AND COUNTERS
   ============================================================================ */

.module-sidebar .unread-badge,
.module-sidebar .count-badge {
  background: #dc3545;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.module-sidebar .count-badge {
  background: #6c757d;
}

.module-sidebar .pinned-count-badge {
  background: #f59e0b;
}

.module-sidebar .urgent-badge {
  background: #dc3545;
}

.module-sidebar .success-badge {
  background: #28a745;
}

.module-sidebar .info-badge {
  background: #17a2b8;
}

.module-sidebar .warning-badge {
  background: #ffc107;
  color: #212529;
}

/* ============================================================================
   SIDEBAR FORMS AND INPUTS
   ============================================================================ */

.module-sidebar .form-control {
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.module-sidebar .form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.module-sidebar .btn {
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

.module-sidebar .btn-sm {
  font-size: 0.75rem;
  padding: 0.375rem 0.5rem;
}

/* ============================================================================
   SIDEBAR SEARCH AND FILTERS
   ============================================================================ */

.module-sidebar .search-container {
  padding: 0.75rem;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.module-sidebar .search-container .form-control {
  border: 1px solid #d1d5db;
  background: white;
}

.module-sidebar .filter-group {
  margin-bottom: 1rem;
}

.module-sidebar .filter-group:last-child {
  margin-bottom: 0;
}

.module-sidebar .filter-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
  .module-sidebar {
    flex: none;
    width: 100%;
    order: 2;
    position: relative;
    top: 0;
  }

  .module-sidebar .sidebar-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .module-sidebar .sidebar-content {
    padding: 0.5rem;
  }

  .module-sidebar .sidebar-nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .module-sidebar .sidebar-list-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
}

/* ============================================================================
   SIDEBAR QUICK ACTIONS
   ============================================================================ */

.module-sidebar .quick-actions {
  padding: 0.75rem;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.module-sidebar .quick-actions .btn {
  width: 100%;
  margin-bottom: 0.5rem;
}

.module-sidebar .quick-actions .btn:last-child {
  margin-bottom: 0;
}

/* ============================================================================
   SIDEBAR STATS AND METRICS
   ============================================================================ */

.module-sidebar .stats-container {
  padding: 0.75rem;
  background: #f8fafc;
}

.module-sidebar .stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.85rem;
}

.module-sidebar .stat-item:last-child {
  border-bottom: none;
}

.module-sidebar .stat-label {
  color: #6b7280;
}

.module-sidebar .stat-value {
  font-weight: 600;
  color: #374151;
}
