/* 
 * ESTILOS DO FILTRO DE BUSCA - AGRONEG
 * --------------------------------
 * Estilos para o componente de filtro sobreposto ao banner
 * Organizado em mobile-first com separação clara para desktop
 */

/*=============================
  ESTILOS BASE (COMPARTILHADOS)
  Estilos que se aplicam a TODOS os dispositivos
=============================*/
.filter-container {
  position: absolute;
  width: 100%;
  z-index: 10;
  bottom: 30px;
  left: 0;
  padding: 0 15px;
}

.filter-content {
  background-color: rgba(13, 63, 41, 0.85); /* Verde escuro semi-transparente */
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
}

.filter-title {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

.filter-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  margin-bottom: 15px;
  text-align: center;
}

.filter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
}

.filter-select, .filter-button {
  height: 44px;
  border-radius: 6px;
  border: none;
  padding: 0 15px;
  font-family: var(--font-primary);
  font-size: 0.9rem;
}

.filter-select {
  background-color: white;
  color: var(--gray-700);
  width: 100%;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23505050' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
  cursor: pointer;
}

.filter-select:disabled {
  background-color: rgba(255, 255, 255, 0.7);
  color: var(--gray-400);
  cursor: not-allowed;
}

.filter-button {
  background-color: var(--orange-400);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.filter-button:hover {
  background-color: var(--orange-500);
  transform: translateY(-2px);
}

.filter-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  justify-content: center;
  width: 100%;
}

.category-option {
  background: #ff9900;
  color: #fff;
  border-radius: 24px;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 1.1em;
  text-align: center;
  border: none;
  box-shadow: 0 4px 16px rgba(255,153,0,0.18);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
  opacity: 1;
  pointer-events: auto;
  letter-spacing: 0.5px;
  cursor: pointer;
  margin-bottom: 6px;
  min-width: 140px;
}

.category-option:hover, .category-option.active, .category-option:active {
  background: #e67c00;
  color: #fff;
  box-shadow: 0 6px 20px rgba(255,153,0,0.25);
  transform: translateY(-2px) scale(1.04);
}

/*=============================
  ESTILOS MOBILE (PADRÃO)
  Configurações específicas para mobile
=============================*/
@media (max-width: 576px) {
  .filter-container {
    position: relative;
    bottom: 0;
    margin-top: -30px;
    padding: 0 10px;
  }
  
  .filter-content {
    padding: 15px;
    border-radius: 4px;
  }
  
  /* Título principal sobre o banner */
  .filter-title {
    position: absolute;
    top: -140px;
    left: 0;
    width: 100%;
    font-size: 1.4rem;
    font-weight: 700;
    padding: 10px 15px;
    text-align: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    background-color: rgba(0, 0, 0, 0.4);
    white-space: normal;
    line-height: 1.3;
    max-width: 100%;
    margin-bottom: 25px;
  }
  
  /* Subtítulo e instrução combinados */
  .filter-subtitle {
    display: none; /* Esconder para evitar redundância */
  }
  
  /* Instrução clara para o usuário */
  .filter-container::before {
    content: "Selecione seu estado e município";
    position: absolute;
    top: -33px;
    left: 10px;
    right: 10px;
    width: auto;
    text-align: center;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 9px 10px;
    background-color: #0A5C36;
    border-radius: 4px;
    z-index: 15;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
  }
  
  /* Restante dos estilos */
  .filter-form {
    gap: 10px;
    margin-top: 10px;
  }
  
  .filter-row {
    margin-bottom: 5px;
  }
  
  .filter-label {
    font-size: 0.8rem;
    margin-bottom: 2px;
  }
  
  .filter-select, .filter-button {
    height: 42px;
    font-size: 0.85rem;
  }
  
  .filter-button {
    margin-top: 5px;
  }
  
  .filter-categories {
    flex-wrap: wrap;
    gap: 12px 8px;
    margin-top: 16px;
    justify-content: center;
    width: 100%;
    row-gap: 12px;
  }
  
  .category-option {
    flex: 1 1 45%;
    min-width: 140px;
    max-width: 100%;
    font-size: 1.05em;
    padding: 12px 0;
    margin: 0 4px 8px 4px;
    text-align: center;
    display: block;
    box-sizing: border-box;
  }
}

/*=============================
  ESTILOS TABLET
  Ajustes para tablets
=============================*/
@media (min-width: 577px) and (max-width: 991px) {
  .filter-container {
    bottom: 50px;
  }
  
  .filter-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 15px;
  }
  
  .filter-row:last-child {
    grid-column: span 2;
  }
  
  .category-option {
    flex: 1 0 calc(33.333% - 8px);
  }
}

/*=============================
  ESTILOS DESKTOP
  Layout diferente para desktop
=============================*/
@media (min-width: 992px) {
  .filter-container {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    padding: 0 30px;
  }
  
  .filter-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 35px;
    background-color: rgba(13, 63, 41, 0.90);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
  }
  
  .filter-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    position: relative;
    color: white;
    text-align: center;
  }
  
  .filter-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--orange-400);
    margin: 10px auto 0;
    border-radius: 2px;
  }
  
  .filter-subtitle {
    font-size: 1.1rem;
    margin-bottom: 25px;
    max-width: 700px;
    opacity: 0.9;
    font-weight: 400;
    color: white;
    text-align: center;
    margin-top: 5px;
  }
  
  .filter-form {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 20px;
    width: 100%;
    margin-top: 5px;
  }
  
  .filter-row {
    flex: 1;
  }
  
  .filter-label {
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.95);
  }
  
  .filter-select {
    transition: all 0.2s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
  
  .filter-select:hover {
    border-color: rgba(230, 126, 34, 0.3);
  }
  
  .filter-select:focus {
    border-color: var(--orange-400);
    outline: none;
    box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.2);
  }
  
  .filter-row.button-row {
    flex: 0 0 auto;
    align-self: flex-end;
    margin-bottom: 0;
  }
  
  .filter-button {
    height: 44px;
    min-width: 140px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(230, 126, 34, 0.3);
    transition: all 0.3s ease;
  }
  
  .filter-button:hover {
    background-color: var(--orange-500);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(230, 126, 34, 0.4);
  }
  
  .filter-button:active {
    transform: translateY(-1px);
  }
  
  .filter-categories {
    margin-top: 20px;
    gap: 12px;
    width: 100%;
    justify-content: center;
  }
  
  .category-option {
    flex: 0 0 auto;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
  }
  
  .category-option:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
  }
  
  .category-option.active {
    background-color: var(--orange-400);
    border-color: var(--orange-400);
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  }
} 