/* =========================================================
   Edital Animal SP — ONGs participantes, votação e telas de retorno
   Depende de main.css, paginas.css e form.css.
   ========================================================= */

/* ---------- Avatar e etiquetas ---------- */
.avatar {
  flex: none; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 18px;
  font-family: var(--font-display); font-size: 1.35rem; letter-spacing: 0.02em; line-height: 1;
  background: var(--yellow); color: var(--ink);
  transform: rotate(-3deg);
}
.avatar--1 { background: var(--blue); color: var(--white); transform: rotate(2deg); }
.avatar--2 { background: var(--ink); color: var(--yellow); transform: rotate(-1deg); }
.avatar--lg { width: clamp(68px, 9vw, 92px); height: clamp(68px, 9vw, 92px); border-radius: 24px; font-size: clamp(1.7rem, 3vw, 2.3rem); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  padding: 4px 10px; border-radius: 99px;
  background: #eef3ff; color: var(--blue-800);
  font-size: 0.76rem; font-weight: 700; line-height: 1.3;
}
.tags .tags__more { background: rgba(11, 11, 15, 0.06); color: var(--muted); }
.tags--light li { background: rgba(255, 255, 255, 0.12); color: var(--white); }

/* ---------- Diretório ---------- */
.directory {
  position: relative; z-index: 2;
  margin-top: clamp(-96px, -8vw, -60px);
  padding-bottom: clamp(64px, 9vw, 120px);
}
.toolbar {
  display: grid; gap: 14px;
  padding: clamp(16px, 2.6vw, 24px);
  background: var(--white); border-radius: var(--radius);
  box-shadow: 0 2px 0 rgba(11, 11, 15, 0.04), 0 34px 70px -38px rgba(3, 14, 60, 0.55);
}
.search { position: relative; display: block; }
.search svg { position: absolute; left: 18px; top: 50%; width: 22px; height: 22px; margin-top: -11px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 52px !important; height: 58px !important; font-size: 1.02rem !important; border-radius: 16px !important; }
.search input::-webkit-search-cancel-button { cursor: pointer; }

.filters {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin-inline: calc(clamp(16px, 2.6vw, 24px) * -1); padding: 2px clamp(16px, 2.6vw, 24px);
  scroll-snap-type: x proximity;
}
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: none; scroll-snap-align: start;
  min-height: 40px; padding: 0 14px; border-radius: 99px;
  border: 1.5px solid var(--field-border); background: var(--white);
  font-size: 0.86rem; font-weight: 650; white-space: nowrap; color: var(--ink-700);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.filter:hover { border-color: rgba(11, 11, 15, 0.45); }
.filter.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }
.filter:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.toolbar__count { font-size: 0.86rem; font-weight: 650; color: var(--muted); }
@media (min-width: 1024px) {
  .filters { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding: 0; }
}

.ong-grid { display: grid; gap: 14px; margin-top: 22px; }
@media (min-width: 640px) { .ong-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ong-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }

.ong-card {
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; align-content: start;
  padding: 18px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--line);
  transition: border-color 0.2s var(--ease);
}
.ong-card:hover { border-color: rgba(11, 11, 15, 0.35); }
.ong-card__body { min-width: 0; display: grid; gap: 6px; align-content: start; }
.ong-card__name { font-size: 1.08rem; font-weight: 800; line-height: 1.25; }
.ong-card__name a { text-decoration: none; }
.ong-card__name a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; } /* card inteiro clicável */
.ong-card__name a:focus-visible { outline: none; }
.ong-card:has(.ong-card__name a:focus-visible) { outline: 3px solid var(--blue); outline-offset: 3px; }
.ong-card__city { display: flex; align-items: center; gap: 5px; font-size: 0.86rem; color: var(--muted); }
.ong-card__city svg { width: 15px; height: 15px; flex: none; }
.ong-card .tags { margin-top: 4px; }
.ong-card__actions {
  position: relative; z-index: 1; /* acima do link que cobre o card */
  grid-column: 1 / -1; display: flex; gap: 8px; align-items: center;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.ong-card__actions .btn { flex: 1; }
.icon-btn {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; border: 1.5px solid var(--field-border); background: var(--white); color: var(--ink);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.icon-btn:hover { border-color: var(--ink); background: var(--paper); }
.icon-btn svg { width: 20px; height: 20px; }

.empty { display: grid; justify-items: center; gap: 8px; padding: 56px 16px; text-align: center; color: var(--ink-700); }
.empty svg { width: 40px; height: 40px; color: var(--muted); }
.empty__title { font-weight: 800; font-size: 1.15rem; color: var(--ink); }

/* ---------- Página da ONG / votação ---------- */
.page-hero--ong { padding-bottom: clamp(96px, 11vw, 140px); }
.ong-hero { display: grid; gap: 18px; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  font-size: 0.88rem; font-weight: 700; color: rgba(255, 255, 255, 0.82); text-decoration: none;
}
.back-link svg { width: 18px; height: 18px; }
.back-link:hover { color: var(--yellow); }
.ong-hero__id { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 22px); }
.ong-hero__name { font-size: clamp(2.2rem, 6vw, 4.4rem); }
.ong-hero__meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 650; color: rgba(255, 255, 255, 0.82); }
.ong-hero__meta svg { width: 17px; height: 17px; flex: none; }

.vote {
  position: relative; z-index: 2;
  display: grid; gap: 24px; align-items: start;
  margin-top: clamp(-104px, -9vw, -64px);
  padding-bottom: clamp(64px, 9vw, 120px);
}
@media (min-width: 1024px) {
  .vote { grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; }
  .ong-about { position: sticky; top: calc(var(--header-h) + var(--demo-h) + 24px); }
}
.vote__title { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 0.98; }
.vote__title span { color: var(--blue); }
.vote__intro { margin-top: 10px; color: var(--ink-700); }
.vote__intro + .errors { margin-top: 20px; }
.vote__form .group-title:first-of-type { margin-top: 30px; }
.why { margin-top: 26px; border-radius: 14px; background: var(--paper); }
.why summary {
  cursor: pointer; list-style: none; padding: 14px 16px;
  font-weight: 750; font-size: 0.94rem;
}
.why summary::-webkit-details-marker { display: none; }
.why summary::after { content: '+'; float: right; font-weight: 800; color: var(--blue); }
.why[open] summary::after { content: '–'; }
.why p { padding: 0 16px 16px; font-size: 0.92rem; color: var(--ink-700); }
.why a { color: var(--blue); font-weight: 650; }
.vote__actions { margin-top: 28px; }
.vote__actions .btn { width: 100%; }
.vote__captcha { margin-top: 14px; font-size: 0.78rem; line-height: 1.5; color: var(--muted); }
.vote__captcha a { color: inherit; }
/* O selo flutuante do Google some; o aviso acima do formulário substitui (permitido pelos termos do reCAPTCHA) */
.grecaptcha-badge { visibility: hidden; }
@media (min-width: 640px) { .vote__actions .btn { width: auto; min-width: 280px; } }

.ong-about {
  display: grid; gap: 10px;
  padding: clamp(20px, 3vw, 28px); border-radius: var(--radius);
  background: var(--ink); color: rgba(255, 255, 255, 0.8);
}
.ong-about__title { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1.7rem; line-height: 1; color: var(--white); }
.ong-about h3 { margin-top: 10px; font-size: 0.86rem; font-weight: 800; color: var(--yellow); }
.ong-about p { font-size: 0.95rem; line-height: 1.55; }
.ong-about__link { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--white); font-weight: 700; font-size: 0.92rem; text-underline-offset: 4px; overflow-wrap: anywhere; }
.ong-about__link svg { width: 18px; height: 18px; flex: none; color: var(--yellow); }
.ong-about__share { margin-top: 14px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.12); display: grid; gap: 12px; }
.ong-about__share strong { color: var(--white); }
.ong-about__share .btn { width: fit-content; }

/* ---------- Telas de retorno ---------- */
.page-hero--status { padding: calc(var(--header-h) + var(--demo-h) + 40px) 0 150px; }
.feedback-wrap { position: relative; z-index: 2; margin-top: -120px; padding-bottom: clamp(64px, 9vw, 120px); }
.feedback {
  display: grid; justify-items: center; gap: 16px; text-align: center;
  max-width: 720px; margin-inline: auto; padding-block: clamp(36px, 6vw, 60px);
}
.feedback__badge { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; animation: pop 0.7s var(--ease-snap) both; }
.feedback__badge svg { width: 42px; height: 42px; }
.feedback__badge--ok { background: var(--yellow); color: var(--ink); }
.feedback__badge--ok svg { stroke-width: 3; }
.feedback__badge--azul { background: #eef3ff; color: var(--blue); }
.feedback__badge--amarelo { background: var(--yellow-soft); color: #6b4600; }
.feedback__badge--vermelho { background: var(--danger-bg); color: var(--danger); }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } }
.feedback__title { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 0.95; text-wrap: balance; }
.feedback__lead { max-width: 54ch; color: var(--ink-700); font-size: 1.04rem; }
.feedback__note { max-width: 54ch; font-size: 0.94rem; color: var(--muted); }
.feedback__list { display: grid; gap: 8px; max-width: 520px; text-align: left; color: var(--ink-700); }
.feedback__list li { position: relative; padding-left: 20px; }
.feedback__list li::before { content: ''; position: absolute; left: 2px; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.feedback__actions { display: grid; justify-items: center; gap: 14px; margin-top: 10px; }
.feedback__help { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 0.88rem; font-weight: 700; color: var(--ink-700); text-underline-offset: 4px; }
.feedback__help svg { width: 18px; height: 18px; color: #1faa53; }

.boost {
  width: 100%; display: grid; gap: 14px; text-align: left; margin-top: 8px;
  padding: 18px; border-radius: 18px; background: var(--paper);
}
@media (min-width: 640px) {
  .boost { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .boost__actions { grid-column: 1 / -1; }
}
.boost__title { font-weight: 800; color: var(--ink); }
.boost__text p:not(.boost__title) { font-size: 0.92rem; color: var(--ink-700); }
.boost__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.boost__actions .btn { flex: 1 1 200px; --h: 52px; }
.btn--whats { background: #1faa53; color: var(--white); }
.btn--whats:hover { color: var(--white); }

/* ---------- Aviso rápido (copiar link) ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 120;
  transform: translateX(-50%); padding: 12px 18px; border-radius: 99px;
  background: var(--ink); color: var(--white); font-size: 0.9rem; font-weight: 650;
  box-shadow: 0 16px 34px -16px rgba(0, 0, 0, 0.6);
  animation: toast-in 0.35s var(--ease-out) both;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }

@media (prefers-reduced-motion: reduce) {
  .feedback__badge, .toast { animation: none; }
}
