*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Lato', sans-serif;
  line-height: 1.5;
  color: #1a1a1a;
  background: #ffffff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.pagina {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 16px 48px;
  text-align: center;
}

/* Logo */
.logo img {
  margin: 0 auto;
  width: 100%;
  max-width: 960px;
  border-radius: 6px;
}

/* Título */
.titulo {
  margin: 32px 0 40px;
  font-size: clamp(1.75rem, 6vw, 3.5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Lojas */
.lojas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px 64px;
}

.loja {
  flex: 1 1 280px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loja[hidden] {
  display: none;
}

.loja img {
  width: 100%;
  max-width: 300px;
}

.btn-loja {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 300px;
  min-height: 56px;
  padding: 14px 24px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  background-color: #1e90ff;
  border-radius: 999px;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-loja:hover,
.btn-loja:focus-visible {
  background-color: #0b74de;
}

.btn-loja:focus-visible {
  outline: 3px solid #0b74de;
  outline-offset: 3px;
}

.btn-loja:active {
  transform: scale(0.98);
}

.btn-loja .icone {
  width: 1.2em;
  height: 1.2em;
  flex-shrink: 0;
}

/* Android 15+: etapas (vídeo + download).
   Títulos alinhados à esquerda; botões com a mesma largura, centralizados. */
.loja[data-loja="android-apk"] {
  max-width: 400px;
  gap: 64px; /* espaço entre o botão do vídeo e o item 2 */
}

.etapa {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.etapa-titulo {
  align-self: stretch;
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}

.etapa-numero {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-size: 0.95rem;
  color: #ffffff;
  background-color: #1e90ff;
  border-radius: 50%;
}

.btn-video {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 300px;
  min-height: 56px;
  padding: 10px 18px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  color: #ffffff;
  text-decoration: none;
  background-color: #cc0000;
  border-radius: 999px;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-video:hover,
.btn-video:focus-visible {
  background-color: #a30000;
}

.btn-video:focus-visible {
  outline: 3px solid #a30000;
  outline-offset: 3px;
}

.btn-video:active {
  transform: scale(0.98);
}

.btn-video .icone {
  width: 1.6em;
  height: 1.6em;
  flex-shrink: 0;
}

/* Link "Copiar link ..." no final de cada bloco (ver js/copiar-link.js) */
.link-copiar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  padding: 8px 4px;
  font: inherit;
  font-size: 0.95rem;
  color: #0b74de;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: none;
  cursor: pointer;
}

/* Apple e Android 14: dobra o espaço entre "Ir para a loja" e o link (24px -> 48px) */
.loja[data-loja="ios"] .link-copiar,
.loja[data-loja="android"] .link-copiar {
  margin-top: 28px; /* + 20px do espaçamento do bloco = 48px */
}

.link-copiar[hidden] {
  display: none;
}

.link-copiar:hover {
  color: #08559f;
}

.link-copiar:focus-visible {
  outline: 3px solid #0b74de;
  outline-offset: 2px;
  border-radius: 4px;
}

.link-copiar .icone {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
}

.link-copiar.copiado {
  color: #1a7f37;
  text-decoration: none;
}

/* App indisponível (link vazio): o bloco mostra só a mensagem (ver js/main.js) */
.loja > [hidden] {
  display: none !important;
}

.indisponivel {
  margin: 0;
  width: 100%;
  max-width: 340px;
  padding: 18px 20px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  color: #6b4e00;
  background-color: #fff5e0;
  border: 1px solid #f0d9a8;
  border-radius: 14px;
}

/* Celulares */
@media (max-width: 600px) {
  .pagina {
    padding-top: 24px;
  }

  .titulo {
    margin: 24px 0 28px;
  }

  .lojas {
    flex-direction: column;
    align-items: center;
    gap: 36px;
  }

  .loja {
    flex: none;
    width: 100%;
  }

  .loja img {
    max-width: 240px;
  }

  .btn-loja,
  .btn-video {
    max-width: 280px;
  }

  .btn-loja {
    font-size: 1.125rem;
  }
}

/* Popup (usado pelo vídeo do YouTube) */
.popup {
  width: min(800px, calc(100% - 32px));
  height: min(90vh, 900px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.popup[open] {
  display: flex;
  flex-direction: column;
}

.popup::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.popup-cabecalho {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 10px 18px;
  background: #1e90ff;
  color: #ffffff;
}

.popup-titulo {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.popup-fechar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 10px;
  color: #ffffff;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.popup-fechar:hover,
.popup-fechar:focus-visible {
  background: rgba(255, 255, 255, 0.2);
}

.popup-fechar svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Impede a página de fundo de rolar com o popup aberto */
body.popup-aberto {
  overflow: hidden;
}

/* No celular o popup ocupa a tela inteira */
@media (max-width: 600px) {
  .popup {
    width: 100%;
    height: 100%;
    max-height: 100dvh;
    border-radius: 0;
  }
}

/* Popup do vídeo do YouTube */
.popup.popup-video {
  width: min(900px, calc(100% - 32px));
  height: fit-content;
  max-height: calc(100dvh - 32px);
  background: #000000;
  border-radius: 12px;
}

.popup-video-moldura {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.popup-video-moldura iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* No celular o vídeo ocupa a largura toda, centralizado na tela */
@media (max-width: 600px) {
  .popup.popup-video {
    width: 100%;
    height: fit-content;
    max-height: 100dvh;
    margin: auto;
    border-radius: 0;
  }
}

.popup-video-rodape {
  margin: 0;
  padding: 10px 16px;
  font-size: 0.95rem;
  text-align: center;
  color: #dddddd;
  background: #111111;
}

.popup-video-rodape a {
  color: #ffffff;
  font-weight: 700;
}
