/* Blog Category Filter Styles */
.blog-category-filter {
  position: relative;
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 20px 0;
}

.filter-dropdown {
  position: relative;
  min-width: 280px;
}

.filter-selected {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.filter-selected:hover {
  border-color: #c1c7cd;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.filter-label {
  color: #6b7280;
  font-weight: 500;
  font-size: 14px;
}

.filter-value {
  color: #374151;
  font-weight: 600;
  font-size: 14px;
  margin-left: 4px;
}

.filter-arrow {
  color: #6b7280;
  font-size: 12px;
  transition: transform 0.3s ease;
}

.filter-dropdown.active .filter-arrow {
  transform: rotate(180deg);
}

.filter-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  margin-top: 4px;
}

.filter-dropdown.active .filter-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.filter-option {
  padding: 12px 16px;
  cursor: pointer;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s ease;
}

.filter-option:last-child {
  border-bottom: none;
}

.filter-option:hover {
  background-color: #f8fafc;
  color: #1f2937;
}

.filter-option:active {
  background-color: #e5e7eb;
}

/* Custom scrollbar for dropdown */
.filter-options::-webkit-scrollbar {
  width: 6px;
}

.filter-options::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.filter-options::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.filter-options::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Responsive design */
@media (max-width: 768px) {
  .filter-dropdown {
    min-width: 100%;
    width: 100%;
  }

  .blog-category-filter {
    width: 100%;
  }
}

/* Loading state */
.filter-dropdown.loading .filter-selected {
  opacity: 0.7;
  pointer-events: none;
}

.filter-dropdown.loading .filter-arrow {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
