/* RESET GERAL */
* {
  font-family: "Inter", Arial, Helvetica, sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
}

.none {
  display: none !important;
}

body {
  background: #f5f5f5;
  --color-primary: #009245;
  --color-secondary: #72b261;
  --color-terciary: #dfdfdf;
  --color-white: #ffffff;
  --color-black: #232323;
}

html,
body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

/* CONTAINER CENTRAL */
.main-container {
  max-width: 1050px;
  margin: 36px auto 40px auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(30, 50, 90, 0.11);
  padding: 36px 36px 40px 36px;
}

/* === FILTROS DO TOPO - Centralizados e responsivos === */
.filtros-topo-central {
  width: 100%;
  max-width: 1240px;
  margin: 36px auto 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.filtros-duas-colunas {
  width: 100%;
  display: flex;
  gap: 40px;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 14px;
}

.filtro-campo {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 210px;
  max-width: 320px;
  flex: 1 1 240px;
}

.filtro-campo-meio {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 210px;
  max-width: 100%;
  flex: 1 1 5px;
}

.label-branco {
  color: #fff !important;
  margin-bottom: 7px;
  align-items: center;
  text-align: center;
  gap: 7px;
}

.filtro-campo select {
  font-size: 1.09rem;
  padding: 8px 32px 8px 14px;
  border-radius: 8px;
  border: 2px solid #009245;
  color: #232323;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.99);
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23009245' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 14px 12px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: border 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(30, 50, 90, 0.1);
}

.filtro-campo select:focus {
  outline: none;
  border-color: #046837;
  box-shadow: 0 0 0 2px #b2e4cb55;
}

.filtro-botao {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 8px;
  margin-bottom: 32px; /* aumenta o espaço abaixo do botão */
}

.filtro-botao button {
  min-width: 210px;
  max-width: 400px;
  width: 90%;
  font-size: 1.15rem;
  padding: 14px 0;
  border-radius: 8px;
  background: #009245;
  color: #fff;
  font-weight: bold;
  letter-spacing: 0.07em;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(30, 50, 90, 0.1);
  transition: background 0.18s;
}

.filtro-botao button:hover {
  background: #046837;
}

/* RESPONSIVO PARA FILTROS DO TOPO */
@media (max-width: 750px) {
  .filtros-duas-colunas {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  .filtro-botao button {
    width: 100%;
    font-size: 1.07rem;
    padding: 12px 0;
  }

  .filtros-topo-central {
    padding-left: 5vw;
    padding-right: 5vw;
  }
}

/* === GRID DE FILTROS PADRÃO PARA OUTROS BLOCOS === */
.filtros-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 36px;
  margin-bottom: 30px;
}

.filtro-bloco {
  flex: 1 1 320px;
  min-width: 270px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* LABELS UNIFORMES */
.filtro-bloco label,
.filtro-bloco span,
.campo-seletor label,
.campo-seletor span {
  font-size: 1rem;
  font-weight: bold;
  color: #1c3136;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* SELECT PADRÃO VERDE PARA OUTROS BLOCOS */
.filtro-bloco select,
.campo-seletor select,
select {
  color: #232323;
  border: 2px solid #009245;
  background-color: #fff;
  font-weight: bold;
  font-size: 1.18rem;
  border-radius: 8px;
  padding: 8px 42px 8px 14px;
  margin-bottom: 4px;
  text-transform: uppercase;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23009245' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 14px 12px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: border 0.2s, box-shadow 0.2s;
}

.filtro-bloco select:focus,
.campo-seletor select:focus,
select:focus {
  outline: none;
  border-color: #046837;
  box-shadow: 0 0 0 2px #b2e4cb77;
}

/* MAIS RESPIRO ENTRE FILTROS, ITENS E BLOCOS */
.filtro-bloco,
.campo-seletor,
.block-selection,
.info-block,
.card,
.tabela-funcionamento,
.alert {
  margin-bottom: 20px;
}

/* Ajuste de inputs se precisar */
.filtro-bloco input[type="text"],
input[type="text"] {
  border: 1.5px solid #bfc8c1;
  border-radius: 6px;
  padding: 11px 16px;
  font-size: 1.09rem;
  width: 100%;
  background: #fff;
}

/* Para ícones nos labels (ajustar espaçamento vertical) */
.filtro-bloco label svg,
.filtro-bloco span svg {
  margin-bottom: -3px;
}

/* BLOCOS DE ALERTA E INFO */
.alert {
  background: #fffbe2 !important;
  border: 1px solid #f2cd56;
  color: #827900 !important;
  font-size: 1.02rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 22px;
}

/* TÍTULO DA LINHA */
.titulo-linha-bloco {
  align-items: center;
  font-family: "Arial", sans-serif;
  font-weight: bold;
  font-size: 1.4rem;
  color: #444;
}

.codigo-linha {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  border-radius: 8px;
  min-width: 90px;
  height: 44px;
  letter-spacing: 1px;
  box-shadow: 0 1px 5px rgba(30, 50, 90, 0.08);
  padding: 0 16px;
}

.icone-sentido {
  align-items: center;
  justify-content: center;
  background: #d60000;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(30, 20, 20, 0.12);
}

.nome-linha {
  font-size: 1.18rem;
  /*font-weight: 600;*/
  color: var(--color-black);
  margin-left: 4px;
  letter-spacing: 1px;
  /*text-transform: uppercase;*/
}

/* TABELAS */
.table-lines,
.tabela-funcionamento {
  width: 100%;
  overflow: hidden;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 8px;
  border-collapse: collapse;
  border-spacing: 0;
  background: #fff;
  box-shadow: 0 2px 12px rgba(30, 50, 90, 0.07);
}

.table-lines thead,
.tabela-funcionamento thead {
  background-color: #f2f2f2;
  font-weight: bold;
}

.table-lines th,
.table-lines td,
.tabela-funcionamento th,
.tabela-funcionamento td {
  padding: 10px 8px;
  line-height: 1.5;
  border: 1px solid #eee;
  font-size: 1rem;
}

/* TABELA DE ITINERÁRIO */
.table-itinerary tbody {
  max-height: 600px;
  overflow-y: auto;
  display: block;
  background: #fff;
}

.table-itinerary tr {
  display: flex;
  width: 100%;
}

.table-itinerary .icon {
  width: 12px;
  height: 12px;
  background-color: #3498db;
  border-radius: 50%;
  z-index: 1;
  margin: 6px 0;
}

.table-itinerary .line {
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #3498db;
}

.table-itinerary tr:first-child .line {
  top: 15px;
}

.table-itinerary tr:last-child .line {
  height: 25px;
}

.table-itinerary td:first-child {
  width: 40px;
  padding-right: 0;
}

.table-itinerary td:last-child {
  flex: 1;
}

/* OPÇÕES DE HORÁRIO */
.hour-option {
  padding: 7px 15px;
  border-radius: 5px;
  font-weight: bold;
  font-size: 0.97rem;
  background-color: #e6eae5;
  margin: 4px 6px 8px 0;
  display: inline-block;
  box-shadow: 0 1px 4px rgba(20, 40, 60, 0.06);
  cursor: pointer;
  border: 1px solid #d1e2d1;
  transition: background 0.2s, border 0.2s;
}

.hour-option-selected {
  background-color: var(--color-secondary);
  border: 1.5px solid var(--color-primary);
  color: #fff;
}

/* BUTTONS GERAIS */
button {
  padding: 0.6rem 1.4rem;
  color: var(--color-white);
  text-transform: uppercase;
  background-color: #27536c;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

button:hover {
  background-color: #5c8c4f;
}

.button-search-selected {
  background-color: #72b261;
}

/* MAPA */
iframe,
.map {
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(30, 50, 90, 0.08);
  min-height: 300px;
  width: 100%;
  margin-bottom: 20px;
}

/* RESPONSIVO: 1 coluna no mobile */
@media (max-width: 900px) {
  .main-container {
    padding: 10px 2vw 18px 2vw;
    border-radius: 10px;
  }

  .filtros-grid {
    flex-direction: column;
    gap: 18px 0;
  }

  .filtro-bloco {
    min-width: unset;
    width: 100%;
    gap: 7px;
  }

  .codigo-linha {
    min-width: 45px;
    height: 34px;
    font-size: 1.05rem;
    margin-bottom: 6px;
  }

  .icone-sentido {
    width: 25px;
    height: 25px;
    font-size: 0.96rem;
  }

  .nome-linha {
    font-size: 1rem;
  }

  .rotas-label-bloco {
    max-width: 1050px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding-top: 10px;
    padding-bottom: 4px;
  }

  .rotas-label-bloco {
    width: 100%;
    max-width: 650px; /* Fica alinhado com o resto */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
  }

  #select-route {
    max-width: 1050px;
    width: 100%;
    margin: 0 auto 16px auto;
    display: block;
  }
}

#div-search-result {
  width: 100%;
  max-width: 1050px;
  margin: 40px auto 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

#div-search-result .text-center {
  width: 100%;
}

#div-search-result .text-center span {
  font-size: 1.25rem;
  color: #232323;
  letter-spacing: 0.02em;
  padding: 12px 0;
  display: block;
}

.rotas-label-bloco span {
  color: #232323;
  font-size: 1.18rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rotas-label-bloco select {
  width: 100%;
  min-width: 220px;
  max-width: 1240px;
  font-size: 1.09rem;
  padding: 8px 40px 8px 14px;
  border-radius: 8px;
  border: 2px solid #009245;
  color: #232323;
  font-weight: 600;
  background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23009245' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 14px 12px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: border 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(30, 50, 90, 0.1);
}

.rotas-label-bloco select:focus {
  outline: none;
  max-width: 1240px;
  border-color: #046837;
  box-shadow: 0 0 0 2px #b2e4cb55;
}

@media (max-width: 800px) {
  #div-search-result,
  .rotas-label-bloco {
    max-width: 99vw;
  }
}

.label-preta {
  color: #232323 !important;
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 7px;
  text-transform: uppercase;
  justify-content: space-around;
  align-items: left;
  gap: 7px;
}

/* Só reforçando para os selects do bloco (se já não estiver): */
.filtro-campo select {
  color: #232323 !important;
  background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23009245' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 14px 12px;
  font-weight: 600;
}

.block-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 20px;
}

.block-selection > div {
  flex: 1 1 10px;
  min-width: 270px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Para mobile, vira uma coluna só */
@media (max-width: 900px) {
  .block-selection {
    flex-direction: column;
    gap: 18px;
  }

  .block-selection > div {
    min-width: unset;
    width: 100%;
  }

  .horario-linha {
    margin-top: 20px; /* Espaço acima */
    margin-bottom: 20px; /* Espaço abaixo */
  }
}

/* RESPONSIVO MOBILE */
@media (max-width: 600px) {
  body {
    padding: 0 !important;
  }

  .icone-sentido {
    display: none !important;
  }

  .main-container {
    max-width: 98%;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
  }

  .filtros-topo-central,
  .block-selection,
  .rotas-label-bloco,
  #div-search-result {
    max-width: 100vw !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 0 10px 0 !important;
    gap: 8px !important;
  }

  .filtros-duas-colunas {
    flex-direction: column !important;
    gap: 26px !important; /* bem menor */
    align-items: stretch !important;
    margin-bottom: 10px !important;
  }

  .filtro-campo {
    flex: 1 1 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    gap: 3px !important; /* Reduza o gap para dar menos espaço entre os campos */
    margin-bottom: 4px !important; /* Ou ajuste conforme preferir */
  }

  .label-branco,
  .font-bold,
  .nome-linha {
    font-size: 1rem !important;
    margin-bottom: 3px;
  }

  select,
  .filtro-campo select,
  .rotas-label-bloco select {
    font-size: 0.98rem !important;
    padding: 8px 34px 8px 12px !important;
    border-radius: 6px !important;
    width: 100% !important;
  }

  .filtro-botao,
  .filtro-botao button {
    width: 100% !important;
    margin-top: 2px !important;
    margin-bottom: 12px !important;
    padding: 0 !important;
    min-width: unset;
    max-width: unset;
  }

  .filtro-botao button {
    font-size: 1rem !important;
    padding: 12px 0 !important;
    border-radius: 6px;
  }

  .text-center span {
    font-size: 1.04rem !important;
  }

  /* Tabelas compactas */
  .tabela-funcionamento,
  .table-itinerary {
    font-size: 0.93rem !important;
    padding: 0 !important;
    margin-bottom: 12px !important;
  }

  .table-lines th,
  .table-lines td,
  .tabela-funcionamento th,
  .tabela-funcionamento td {
    padding: 6px 4px !important;
    font-size: 0.95rem !important;
  }

  /* Itinerário compacto */
  .table-itinerary tbody {
    max-height: 460px !important;
  }

  /* Mapa menor */
  .map,
  iframe {
    min-height: 180px !important;
    max-height: 250px !important;
    margin-bottom: 10px !important;
  }

  /* Diminui blocos info, alerta */
  .alert,
  .info-block,
  .box-tempo,
  .box-partidas {
    margin-bottom: 10px !important;
    padding: 9px 8px !important;
    font-size: 0.96rem !important;
  }

  /* Espaço entre todos os blocos principais */
  .block-selection,
  .filtros-topo-central,
  .rotas-label-bloco,
  #div-search-result {
    margin-bottom: 12px !important;
  }
}

.control-dia,
.control-horario,
.control-trajetos {
  display: flex;
  margin-top: 15px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.control-dia > label,
.control-horario > label,
.control-trajetos > label {
  color: #fff;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  padding: 12px 0;
  display: flex;
  align-items: end;
}

.control-dia > label > img,
.control-horario > label > img,
.control-trajetos > label > img {
  margin-right: 10px;
  margin-bottom: -2px;
}

button.btn-dia,
button.btn-horario {
  padding: 7px 15px;
  font-weight: 400;
  font-size: 0.97rem;
  background-color: #e6eae5;
  margin: 4px 6px 8px 0;
  display: inline-block;
  box-shadow: 0 1px 4px rgba(20, 40, 60, 0.06);
  cursor: pointer;
  border: 1px solid #fff;
  border-width: 2px !important;
  transition: background 0.2s, border 0.2s;
  color: #666;
}

button.btn-dia:hover,
button.btn-horario:hover {
  background-color: #fff;
  color: #666;
}

button.btn-dia--selected,
button.btn-horario--selected {
  background-color: var(--color-secondary);
  border: 1.5px solid var(--color-primary);
  color: #fff;
}

button.btn-dia.btn-dia--selected:hover,
button.btn-horario--selected:hover {
  background-color: var(--color-secondary);
  color: #fff;
}

#list-horario {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

#list-horario button.btn-horario {
  margin: 4px;
}

.h28px {
  height: 28px !important;
}

#block-time > .text-time,
.tabela-funcionamento,
.control-enderecos,
#block-dias-valor .table-lines,
.control-valor-tarifa .table-lines {
  border: 2px solid #fff !important;
  box-shadow: 0 2px 12px rgba(30, 50, 90, 0.07);
  border-radius: 8px;
}

.table-lines.table-itinerary {
  border: 0 !important;
  box-shadow: none !important;
}

.table-lines.table-itinerary > tbody > tr:first-child > td {
  border: 0 !important;
}

.table-lines.table-itinerary > tbody > tr > td:first-child {
  border-left: 0 !important;
}

.table-lines.table-itinerary > tbody > tr > td:last-child {
  border-right: 0 !important;
}

.table-lines.table-itinerary > tbody > tr:last-child > td {
  border-bottom: 0 !important;
}

.table-lines.table-itinerary thead:first-child tr:first-child th {
  border: 0 !important;
}

#table-lines-options-tarifa > td {
  background-color: #fff !important;
}

img[height="20"] {
  height: 20px !important;
}

img[height="28"] {
  height: 28px !important;
}

.subtitle-1 {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  line-height: 1;
  color: #666;
}

.subtitle-2 {
  display: flex;
  align-items: center;
  gap: 8px;
  /* justify-content: center; */
  line-height: 1;
  /* color: #666; */
}

#notification {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background-color: rgba(0, 0, 0, 0.5);
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: 100%;
}

#notification-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background-color: #fff;
  padding: 15px 30px;
  border-radius: 10px;
}

#notification-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: #000;
  text-align: center;
}

#notification-actions {
  display: flex;
  gap: 20px;
}

button#notification-cancel {
  display: none;
  background-color: #000;
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  text-transform: none;
  font-weight: 500;
  font-size: 14px;
}

#notification-download {
  display: none;
  background-color: #069e51;
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  text-transform: none;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
}

#button-download-pdf {
  height: 43px;
}

#button-download-pdf button {
  height: 43px;
}

/* Estilos para dropdown de horários com múltiplas rotas */
.dropdown-horario {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 240px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.dropdown-content .dropdown-option {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  background: white;
  cursor: pointer;
}

.dropdown-content .dropdown-option:hover {
  background-color: #f1f1f1;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #ccc;
  min-width: 280px;
  max-width: 480px;
  width: fit-content;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  border-radius: 8px;
  overflow: hidden;
  padding: 4px;
  flex-direction: column;
  gap: 4px;
}

.dropdown-horario:hover .dropdown-content {
  display: block;
}

.dropdown-option {
  width: 100%;
  padding: 8px 16px;
  text-align: left;
  border: none;
  background-color: white;
  cursor: pointer;
  transition: background-color 0.2s;
  color: #000;
  font-size: 14px;
}

.dropdown-option:hover {
  background-color: #f1f1f1;
}

/* Ajustes para manter consistência com os botões existentes */
.btn-horario {
  transition: all 0.2s;
}
