/* ==========================================================================
   css/btn-nav.css
   Botões de navegação por asset de imagem — Enciclopédia IK Educa
   Carregado por último: tem precedência sobre todos os estilos visuais
   conflitantes sem precisar de !important em cascata.
   ========================================================================== */

/* ---- Utilitário de acessibilidade ---------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Base comum a todos os botões de imagem ------------------------------ */
.btn-nav {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  box-shadow: none;
  transition: transform 0.15s ease, filter 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-nav img {
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.btn-nav:hover  { filter: brightness(1.08); transform: translateY(-1px); }
.btn-nav:active { filter: brightness(0.94); transform: translateY(1px);  }

.btn-nav:focus-visible {
  outline: 2px solid rgba(40, 90, 180, 0.35);
  outline-offset: 3px;
  border-radius: 10px;
}

/* ---- Botão Voltar — header da tela do país ------------------------------- */
.btn-nav--voltar img { height: 36px; width: auto; }

/* ---- Botão Mapa-Múndi — header da tela do continente -------------------- */
.btn-nav--mapa img { height: 36px; width: auto; }

/* ---- Botão Voltar — header do quiz --------------------------------------- */
.btn-nav--quiz-voltar img { height: 42px; width: auto; }

/* ---- Popup de descoberta: anterior / voltar / próximo -------------------- */
.popup-descoberta__btn.btn-nav {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  min-width: 0;
  height: auto;
  border-radius: 0;
  font-size: inherit;
  color: inherit;
}

.popup-descoberta__btn.btn-nav img {
  height: 42px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* ---- Popup final do quiz: ver passaporte / voltar ao mapa ---------------- */
.popup-final-visto__btn.btn-nav {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  align-self: center;
  margin-top: 0;
}

.popup-final-visto__btn.btn-nav img {
  height: 52px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* ---- Responsivo ---------------------------------------------------------- */

/* Mobile vertical pequeno */
@media (max-width: 640px) {
  .popup-descoberta__btn.btn-nav img {
    height: 38px;
    width: 100%;
  }
}

@media (max-width: 420px) {
  .btn-nav--voltar img,
  .btn-nav--mapa img          { height: 30px; }
  .btn-nav--quiz-voltar img   { height: 36px; }
  .popup-descoberta__btn.btn-nav img  { height: 34px; }
  .popup-final-visto__btn.btn-nav img { height: 44px; }
}

/* Mobile landscape */
@media (orientation: landscape) and (max-height: 500px) {
  .btn-nav--quiz-voltar img            { height: 34px; }
  .popup-final-visto__btn.btn-nav img  { height: 40px; }
  .popup-descoberta__btn.btn-nav img   { height: 34px; }
}
