@charset "UTF-8";

/* Importação da fonte Chakra Petch */
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;700&display=swap');

/* =========================
   SEARCH BAR
   ========================= */
.search-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(70%, 85vw, 90%);
  max-width: min(1500px, 90%);
  height: clamp(2.5rem, 8vw, 3.5rem);
  padding: clamp(0.3rem, 1vw, 0.5rem);
  background-color: #F4F6FE;        /* antes era var(--cor0) */
  border-bottom: 2px solid #ccc;
  border-radius: 0.625rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(0.2rem, 0.8vw, 0.4rem);
  font-family: 'Chakra Petch', sans-serif;
}

/* Escondida */
.search-bar.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Input */
.search-bar input[type="text"] {
  width: clamp(50%, 55vw, 60%);
  padding: clamp(0.2rem, 0.8vw, 0.4rem);
  font-size: clamp(0.7rem, 2vw, 0.85rem);
  border: 1px solid #ccc;
  border-radius: 0.25rem;
  font-family: 'Chakra Petch', sans-serif;
}

/* Botões */
.search-bar button {
  padding: clamp(0.2rem, 0.8vw, 0.4rem) clamp(0.3rem, 1vw, 0.5rem);
  font-size: clamp(0.7rem, 2vw, 0.85rem);
  background-color: #0068B5;        /* antes era var(--cor9) */
  color: white;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  font-family: 'Chakra Petch', sans-serif;
  transition: all 0.3s ease;
  white-space: nowrap;
  min-width: 15%;
}

.search-bar button:hover {
  background-color: #2E58A2;        /* antes era var(--cor1) */
}

/* =========================
   HIGHLIGHT
   ========================= */
 
.highlight {
  background: #efba32; /* amarelo */
  padding: 0 2px;
  border-radius: 2px;
}
.highlight-current {
  background: #ffdf80; /* mais claro para a atual */
  outline: 2px solid #2E58A2;
}

/* =========================
   MEDIA QUERIES
   ========================= */

/* Telas muito grandes (>1400px) */
@media (min-width: 1400px) {
  .search-bar {
    width: clamp(80%, 85vw, 90%);
    max-width: 1000px;
    height: 4rem;
  }
}

/* Telas grandes (>1000px) */
@media (min-width: 1000px) {
  .search-bar {
    width: clamp(80%, 85vw, 90%);
    max-width: 978px;
  }
}

/* Telas médias (até 768px) */
@media (max-width: 768px) {
  .search-bar {
    width: clamp(80%, 90vw, 95%);
    max-width: 95%;
    height: clamp(2.2rem, 7vw, 3rem);
    padding: clamp(0.2rem, 0.8vw, 0.4rem);
    gap: clamp(0.15rem, 0.6vw, 0.3rem);
  }

  .search-bar input[type="text"] {
    width: clamp(50%, 60vw, 65%);
    font-size: clamp(0.65rem, 1.8vw, 0.8rem);
  }

  .search-bar button {
    padding: clamp(0.15rem, 0.6vw, 0.3rem) clamp(0.2rem, 0.8vw, 0.4rem);
    font-size: clamp(0.65rem, 1.8vw, 0.8rem);
    min-width: 18%;
  }
}

/* Telas pequenas (até 480px) */
@media (max-width: 480px) {
  .search-bar {
    width: clamp(85%, 95vw, 98%);
    max-width: 98%;
    height: clamp(1.8rem, 6vw, 2.2rem);
    padding: clamp(0.15rem, 0.6vw, 0.3rem);
    gap: clamp(0.1rem, 0.5vw, 0.2rem);
    flex-wrap: nowrap;
  }

  .search-bar input[type="text"] {
    width: clamp(45%, 50vw, 55%);
    font-size: clamp(0.6rem, 1.6vw, 0.75rem);
  }

  .search-bar button {
    padding: clamp(0.1rem, 0.5vw, 0.2rem) clamp(0.15rem, 0.6vw, 0.3rem);
    font-size: clamp(0.6rem, 1.6vw, 0.75rem);
    min-width: 20%;
  }
}

/* Telas muito pequenas (até 320px) */
@media (max-width: 320px) {
  .search-bar {
    width: clamp(90%, 98vw, 100%);
    max-width: 100%;
    height: clamp(1.6rem, 5.5vw, 2rem);
    padding: clamp(0.1rem, 0.5vw, 0.2rem);
    gap: clamp(0.05rem, 0.4vw, 0.15rem);
  }

  .search-bar input[type="text"] {
    width: clamp(40%, 45vw, 50%);
    font-size: clamp(0.55rem, 1.5vw, 0.7rem);
  }

  .search-bar button {
    padding: clamp(0.05rem, 0.4vw, 0.15rem) clamp(0.1rem, 0.5vw, 0.2rem);
    font-size: clamp(0.55rem, 1.5vw, 0.7rem);
    min-width: 22%;
  }
}
