/* ===== FILTROS MOBILE - RESPONSIVIDADE ===== */

/* Melhorias para Mobile - Botões de Filtro */
@media (max-width: 768px) {
  /* Container dos filtros */
  .bg-white.rounded-xl.shadow-sm {
    padding: 1rem !important;
  }

  /* Título dos filtros */
  .text-sm.font-medium.text-gray-700 {
    font-size: 0.875rem !important;
    margin-bottom: 0.75rem !important;
  }

  /* Container dos botões de filtro */
  .flex.flex-wrap.justify-center.gap-2 {
    gap: 0.5rem !important;
    justify-content: center !important;
  }

  /* Botões de filtro de prioridade (Avisos) */
  .priority-filter-btn {
    padding: 0.625rem 1rem !important;
    font-size: 0.875rem !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.375rem !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
  }

  /* Botões de categoria (Notícias e Galeria) */
  .category-btn,
  .gallery-filter {
    padding: 0.625rem 1rem !important;
    font-size: 0.875rem !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.375rem !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
  }

  /* Ícones dentro dos botões */
  .priority-filter-btn i,
  .category-btn i,
  .gallery-filter i {
    font-size: 0.875rem !important;
    margin-right: 0.25rem !important;
  }

  /* Seção de ordenação e limpar filtros */
  .flex.flex-col.sm\\:flex-row.items-center.justify-between {
    flex-direction: column !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  /* Select de ordenação */
  select {
    padding: 0.625rem 0.75rem !important;
    font-size: 0.875rem !important;
    min-height: 44px !important;
    width: 100% !important;
  }

  /* Botão de limpar filtros */
  #clearFilters,
  #clearGalleryFilters {
    padding: 0.625rem 1rem !important;
    font-size: 0.875rem !important;
    min-height: 44px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Container do select de ordenação */
  .flex.items-center.gap-2 {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .flex.items-center.gap-2 span {
    text-align: center !important;
    font-size: 0.875rem !important;
  }

  /* Barra de busca */
  .relative.w-full.max-w-md {
    max-width: 100% !important;
  }

  #searchInput,
  #searchNews,
  #searchGallery {
    padding: 0.75rem 1rem 0.75rem 3rem !important;
    font-size: 0.875rem !important;
    min-height: 48px !important;
  }

  /* Espaçamento entre seções */
  .space-y-6 > * + * {
    margin-top: 1.25rem !important;
  }

  .space-y-4 > * + * {
    margin-top: 1rem !important;
  }
}

/* Mobile Extra Pequeno (até 480px) */
@media (max-width: 480px) {
  /* Reduzir ainda mais o padding dos botões em telas muito pequenas */
  .priority-filter-btn,
  .category-btn,
  .gallery-filter {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.8125rem !important;
    min-height: 40px !important;
  }

  /* Ícones menores */
  .priority-filter-btn i,
  .category-btn i,
  .gallery-filter i {
    font-size: 0.75rem !important;
  }

  /* Barra de busca menor */
  #searchInput,
  #searchNews,
  #searchGallery {
    padding: 0.625rem 0.875rem 0.625rem 2.75rem !important;
    font-size: 0.8125rem !important;
    min-height: 44px !important;
  }

  /* Select menor */
  select {
    padding: 0.5rem 0.625rem !important;
    font-size: 0.8125rem !important;
    min-height: 40px !important;
  }

  /* Botão limpar filtros menor */
  #clearFilters,
  #clearGalleryFilters {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.8125rem !important;
    min-height: 40px !important;
  }
}

/* Mobile Extra Pequeno (até 360px) */
@media (max-width: 360px) {
  /* Container dos filtros com menos padding */
  .bg-white.rounded-xl.shadow-sm {
    padding: 0.75rem !important;
  }

  /* Botões ainda menores */
  .priority-filter-btn,
  .category-btn,
  .gallery-filter {
    padding: 0.5rem 0.625rem !important;
    font-size: 0.75rem !important;
    min-height: 38px !important;
    gap: 0.25rem !important;
  }

  /* Ocultar texto "Filtrar por" em telas muito pequenas */
  .text-sm.font-medium.text-gray-700 {
    font-size: 0.75rem !important;
  }

  /* Reduzir gap entre botões */
  .flex.flex-wrap.justify-center.gap-2 {
    gap: 0.375rem !important;
  }
}

/* ===== MELHORIAS DE ACESSIBILIDADE ===== */

/* Aumentar área de toque para todos os botões interativos */
@media (max-width: 768px) {
  button,
  .priority-filter-btn,
  .category-btn,
  .gallery-filter {
    min-height: 44px !important;
    min-width: 44px !important;
    touch-action: manipulation !important;
  }

  /* Feedback visual ao tocar */
  button:active,
  .priority-filter-btn:active,
  .category-btn:active,
  .gallery-filter:active {
    transform: scale(0.97) !important;
    transition: transform 0.1s ease !important;
  }
}

/* ===== ESTADOS ATIVOS DOS FILTROS ===== */

/* Garantir que o estado ativo seja visível no mobile */
@media (max-width: 768px) {
  .priority-filter-btn.active,
  .category-btn.active,
  .gallery-filter.active {
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  }
}

