.busca-revista-container {
  display: flex;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.busca-revista-sidebar {
  flex: 0 0 300px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 25px;
  height: fit-content;
  position: sticky;
  top: 20px;
}

.busca-revista-header h3 {
  margin: 0 0 25px 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 15px;
}

.busca-revista-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

.busca-revista-controls button {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  background: #ffffff;
  color: #666;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.busca-revista-controls button:hover {
  border-color: #007cba;
  color: #007cba;
  transform: translateY(-1px);
}

.busca-revista-controls button.active {
  background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
  border-color: #007cba;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.busca-revista-filters {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.search-input,
.filter-select {
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #fafafa;
}

.search-input:focus,
.filter-select:focus {
  outline: none;
  border-color: #007cba;
  background: white;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Updated radio-group to checkbox-group for multiple category selection */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.checkbox-item:hover {
  background: #f5f5f5;
}

.checkbox-item input[type="checkbox"] {
  margin: 0;
  accent-color: #007cba;
  width: 16px;
  height: 16px;
}

.checkbox-item span {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

/* Estilo para checkbox selecionado */
.checkbox-item input[type="checkbox"]:checked + span {
  font-weight: 600;
  color: #007cba;
}

/* Destaque visual para a opção "Todas" */
.checkbox-item input[type="checkbox"][value="todas"]:checked + span {
  color: #005a87;
  font-weight: 700;
}

.busca-revista-content {
  flex: 1;
  min-height: 400px;
  position: relative;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #666;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f0f0f0;
  border-top: 4px solid #007cba;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Updated grid layout to single column compact list */
.revistas-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 10px;
}

.revista-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
  border: 1px solid #f0f0f0;
}

.revista-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.revista-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 15px;
  gap: 15px;
}

/* Compact thumbnail container for small images */
.revista-thumbnail-container {
  flex-shrink: 0;
  width: 80px;
  height: 100px;
  overflow: hidden;
  border-radius: 6px;
  background: #f8f8f8;
}

.revista-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.revista-item:hover .revista-thumbnail {
  transform: scale(1.05);
}

.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
  color: #999;
  font-size: 12px;
  text-align: center;
}

/* Updated content layout for compact display */
.revista-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.revista-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.revista-date {
  font-size: 12px;
  color: #007cba;
  font-weight: 500;
  background: rgba(0, 124, 186, 0.1);
  padding: 3px 6px;
  border-radius: 3px;
  display: inline-block;
  width: fit-content;
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.no-results p {
  margin: 0;
  font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .busca-revista-container {
    flex-direction: column;
    gap: 20px;
    padding: 15px;
  }

  .busca-revista-sidebar {
    flex: none;
    position: static;
  }

  /* Maintain single column layout on mobile */
  .revistas-grid {
    gap: 12px;
  }

  .revista-link {
    padding: 12px;
    gap: 12px;
  }

  .revista-thumbnail-container {
    width: 60px;
    height: 75px;
  }
}

@media (max-width: 480px) {
  .busca-revista-controls {
    flex-direction: column;
  }

  .revista-title {
    font-size: 15px;
  }

  .revista-thumbnail-container {
    width: 50px;
    height: 65px;
  }
}

/* Added styles for list view mode (titles only) */
.revistas-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

.revista-item-list {
  background: white;
  border-radius: 6px;
  border: 1px solid #f0f0f0;
  transition: all 0.2s ease;
}

.revista-item-list:hover {
  background: #f8f9fa;
  border-color: #007cba;
  transform: translateX(5px);
}

.revista-link-list {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 12px 16px;
}

.revista-title-list {
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.4;
  display: block;
}

.revista-item-list:hover .revista-title-list {
  color: #007cba;
}
