﻿/* Página de seleção de imagem.
   Depende de style-shared-theme.css (variáveis, .glass-panel, .aida-button...). */

.selecao-page::before {
  background:
    linear-gradient(180deg, rgba(8, 31, 29, 0.82), rgba(11, 43, 40, 0.9)),
    url("../assets/images/FundoAlternativo.png") center/cover no-repeat;
  opacity: 0.72;
}

.selecao-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.selecao-main {
  padding: 8px 0 56px;
  display: grid;
  place-items: center;
  /* Centraliza verticalmente descontando o cabeçalho, sem travar a altura:
     se o conteúdo crescer (telas baixas), a página rola normalmente. */
  min-height: calc(100vh - 170px);
  min-height: calc(100dvh - 170px);
  position: relative;
  z-index: 1;
}

.selecao-panel {
  width: 100%;
  max-width: 760px;
  padding: clamp(24px, 4vw, 40px);
  display: grid;
  gap: clamp(18px, 2.4vw, 24px);
  animation: rise-up 0.72s ease both;
}

.selecao-intro {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.selecao-intro .page-title {
  /* Menor que o padrão do tema: aqui o título divide o painel com o cartão de
     upload, e o tamanho cheio empurrava o botão para fora da primeira dobra. */
  font-size: clamp(1.9rem, 3.2vw, 2.9rem);
  max-width: 18ch;
}

.selecao-intro .page-copy {
  max-width: 58ch;
}

/* Passos ------------------------------------------------------------------ */

.selecao-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.selecao-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(229, 231, 235, 0.12);
  background: rgba(229, 231, 235, 0.07);
  color: var(--neutral-strong);
  font-weight: 600;
}

.selecao-step span {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(143, 216, 183, 0.16);
  color: var(--highlight);
  font-weight: 700;
}

.selecao-step strong {
  font-size: 0.98rem;
}

/* Cartão de upload -------------------------------------------------------- */

.selecao-upload {
  padding: clamp(22px, 3.2vw, 32px);
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
  border-style: dashed;
  border-color: rgba(143, 216, 183, 0.28);
  min-width: 0;
}

.selecao-upload:hover {
  border-color: rgba(143, 216, 183, 0.42);
}

.selecao-upload-icon {
  width: clamp(60px, 12vw, 76px);
  height: clamp(60px, 12vw, 76px);
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(143, 216, 183, 0.22);
  background: var(--highlight-soft);
  color: var(--highlight);
}

.selecao-upload-icon svg {
  width: 46%;
  height: auto;
  display: block;
}

.selecao-upload-copy {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
}

.selecao-upload-copy h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  letter-spacing: -0.02em;
}

.selecao-upload-copy p {
  margin: 0;
  max-width: 42ch;
  color: var(--text-soft);
  line-height: 1.6;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--highlight);
}

.section-tag::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--highlight);
}

.selecao-upload .aida-button {
  min-width: min(280px, 100%);
  padding: 0 32px;
  letter-spacing: 0.04em;
}

.selecao-formats {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-soft);
}

/* Estado de arrasto: o cartao inteiro e alvo do arquivo solto. */
.selecao-upload.arrastando {
  border-color: rgba(143, 216, 183, 0.75);
  background: rgba(143, 216, 183, 0.08);
}

.selecao-erro {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(224, 138, 30, 0.35);
  background: rgba(224, 138, 30, 0.12);
  color: #f0c07a;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Métodos ----------------------------------------------------------------- */

.metodos-detalhes {
  border-radius: 18px;
  border: 1px solid rgba(229, 231, 235, 0.12);
  background: rgba(229, 231, 235, 0.04);
  padding: 14px 18px;
}

.metodos-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.metodos-summary::-webkit-details-marker {
  display: none;
}

.metodos-summary-texto {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.metodos-summary-texto strong {
  font-size: 1.02rem;
  color: var(--neutral-strong);
}

/* Seta propria: o marcador nativo varia demais entre navegadores. */
.metodos-summary::after {
  content: "";
  margin-left: auto;
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
  opacity: 0.65;
}

.metodos-detalhes[open] > .metodos-summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.metodos-summary:hover,
.metodos-summary:focus-visible {
  opacity: 0.85;
}

.metodos-corpo {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.metodos-intro,
.metodos-aviso {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.metodos-aviso {
  padding-top: 14px;
  border-top: 1px solid rgba(229, 231, 235, 0.1);
  font-size: 0.92rem;
}

.metodo-original {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.metodo-original img {
  width: min(240px, 60%);
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(229, 231, 235, 0.12);
}

.metodo-original figcaption {
  color: var(--text-soft);
  font-size: 0.88rem;
}

.metodos-grade {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.metodo-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(229, 231, 235, 0.1);
  background: rgba(7, 31, 30, 0.5);
  min-width: 0;
}

.metodo-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.metodo-texto {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.metodo-texto strong {
  color: var(--neutral-strong);
  font-size: 0.98rem;
}

.metodo-texto span {
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.55;
}

.selecao-note {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.selecao-note a {
  color: var(--highlight);
  font-weight: 700;
  border-bottom: 1px solid rgba(143, 216, 183, 0.28);
}

@keyframes rise-up {
  from {
    opacity: 0;
    transform: translateY(26px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 900px) {
  .selecao-main {
    min-height: 0;
    padding-bottom: 40px;
  }
}

@media (max-width: 640px) {
  .page-header .selecao-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .selecao-header-actions .top-link {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 140px;
  }

  .selecao-step {
    flex: 1 1 100%;
  }

  .selecao-upload-copy p,
  .selecao-formats {
    font-size: 0.95rem;
  }
}

@media (max-width: 420px) {
  .selecao-panel {
    border-radius: var(--radius-lg);
  }

  .selecao-upload {
    padding: 22px 16px;
  }

  .selecao-upload-copy h2 {
    font-size: 1.25rem;
  }

  .selecao-header-actions .top-link {
    min-width: 0;
    padding: 10px 14px;
  }
}

/* Telas baixas (celular deitado): evita o cartão ocupar a tela toda. */
@media (max-height: 620px) and (min-width: 641px) {
  .selecao-main {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .selecao-panel {
    animation: none;
  }
}

/* Três passos (imagem, vídeo, áudio, documentos): mesmo desenho em todas as telas de envio. */
.selecao-steps--tres .selecao-step {
  flex: 1 1 180px;
  justify-content: center;
}

@media (max-width: 640px) {
  .selecao-steps--tres .selecao-step {
    flex-basis: 100%;
    justify-content: flex-start;
  }
}
