/**
 * Blog Categories Sidebar Block Styles
 * Styles for the blog categories listing in the sidebar
 */

/* Blog categories block container */
#block-blog-categories-listing {
  margin-bottom: 30px;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

/* Blog categories block title */
#block-blog-categories-listing h2 {
  background: #253980;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  margin: 0;
  padding: 12px 15px;
  text-transform: uppercase;
  font-family: clearsans-medium, Arial, sans-serif;
  border-radius: 4px 4px 0 0;
}

/* Views container inside block */
#block-blog-categories-listing .views-element-container {
  padding: 0;
  margin: 0;
}

/* Individual category rows */
#block-blog-categories-listing .views-row {
  border-bottom: 1px solid #e5e5e5;
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#block-blog-categories-listing .views-row:last-child {
  border-bottom: none;
}

#block-blog-categories-listing .views-row:hover {
  background-color: #f0f0f0;
}

/* Category name styling */
#block-blog-categories-listing .views-field-name {
  flex: 1;
}

#block-blog-categories-listing .views-field-name a {
  color: #253980;
  text-decoration: none;
  font-size: 14px;
  font-family: ClearSans-Regular, Arial, sans-serif;
  transition: color 0.3s ease;
}

#block-blog-categories-listing .views-field-name a:hover {
  color: #fb6100;
  text-decoration: underline;
}

/* Post count styling */
#block-blog-categories-listing .views-field-nid {
  margin-left: 10px;
}

#block-blog-categories-listing .blog-category-count {
  background: #e3e3e3;
  border-radius: 12px;
  color: #666;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 8px;
  min-width: 20px;
  text-align: center;
  display: inline-block;
  font-family: ClearSans-Medium, Arial, sans-serif;
}

/* Remove default field styling */
#block-blog-categories-listing .field-content {
  margin: 0;
}

#block-blog-categories-listing .views-field {
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #block-blog-categories-listing .views-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  
  #block-blog-categories-listing .views-field-nid {
    margin-left: 0;
    align-self: flex-end;
  }
}

/* Integration with existing sidebar styles */
.right-sidebar #block-blog-categories-listing {
  width: 100%;
}

/* Make sure it fits well with other sidebar blocks */
.right-sidebar .block {
  margin-bottom: 20px;
}

#block-blog-categories-listing + .block {
  margin-top: 20px;
}

/* Blog categories widget (used in page template) */
.blog-categories-widget {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 30px;
}

.blog-categories-widget h3 {
  background: #253980;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  margin: 0;
  padding: 12px 15px;
  text-transform: uppercase;
  font-family: clearsans-medium, Arial, sans-serif;
  border-radius: 4px 4px 0 0;
}

/* Blog categories view content styling in widget */
.blog-categories-widget .view-content {
  margin: 0;
  padding: 0;
}

.blog-categories-widget .views-row {
  border-bottom: 1px solid #e5e5e5;
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-categories-widget .views-row:last-child {
  border-bottom: none;
}

.blog-categories-widget .views-row:hover {
  background-color: #f0f0f0;
}

.blog-categories-widget .views-field-name {
  flex: 1;
}

.blog-categories-widget .views-field-name a {
  color: #253980;
  text-decoration: none;
  font-size: 14px;
  font-family: ClearSans-Regular, Arial, sans-serif;
  transition: color 0.3s ease;
}

.blog-categories-widget .views-field-name a:hover {
  color: #fb6100;
  text-decoration: underline;
}

.blog-categories-widget .field-content {
  margin: 0;
}

.blog-categories-widget .views-field {
  margin: 0;
}

/* Responsive for widget */
@media (max-width: 768px) {
  .blog-categories-widget .views-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}
