/**
 * Sidebar Component Styles
 * 侧边栏组件样式
 */

.sidebar {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  margin-bottom: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.125);
}

.sidebar-title {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Contact Info in Sidebar */
.contact-info {
  padding: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f8f9fa;
  color: #6c757d;
  font-size: 0.9rem;
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-item i {
  width: 20px;
  text-align: center;
}

.contact-item span {
  flex: 1;
}

/* Category Item */
.sidebar-category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  color: #495057;
  text-decoration: none;
  border-bottom: 1px solid #f8f9fa;
  transition: all 0.3s ease;
}

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

.sidebar-category-item:hover {
  background-color: #f8f9fa;
  color: #007bff;
  text-decoration: none;
}

.sidebar-category-item span {
  flex: 1;
  font-size: 0.9rem;
}

.category-action-btn {
  background: none;
  border: none;
  color: #6c757d;
  font-size: 0.8rem;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
}

.sidebar-category-item:hover .category-action-btn {
  color: #007bff;
  background-color: rgba(0, 123, 255, 0.1);
}

/* Article Item */
.sidebar-article-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  color: #495057;
  text-decoration: none;
  border-bottom: 1px solid #f8f9fa;
  transition: all 0.3s ease;
}

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

.sidebar-article-item:hover {
  background-color: #f8f9fa;
  color: #007bff;
  text-decoration: none;
}

.article-title {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-action-btn {
  background: none;
  border: none;
  color: #6c757d;
  font-size: 0.8rem;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
  margin-left: 0.5rem;
}

.sidebar-article-item:hover .article-action-btn {
  color: #007bff;
  background-color: rgba(0, 123, 255, 0.1);
}

/* Responsive */
@media (max-width: 991.98px) {
  .sidebar {
    margin-bottom: 1rem;
  }
  .sidebar-title {
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
  }
  .contact-info {
    padding: 0.8rem;
  }
  .sidebar-category-item,
  .sidebar-article-item {
    padding: 0.6rem 0.8rem;
  }
}
