/* ============================================================
   AI Transparency — MeuPetAmor
   ============================================================ */

.ait-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;
}

/* ── Barra compacta (rodapé) ────────────────────────────────── */
.ait-barra {
  border-top: 1px solid rgba(30,77,43,.1);
  padding: .45rem 0;
  background: var(--cinza-quente, #F2F0EB);
}

.ait-barra__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
  text-align: center;
}

.ait-barra__texto {
  font-size: .72rem;
  color: var(--texto-suave, #8A9E90);
  line-height: 1.4;
}

.ait-barra__link {
  font-size: .72rem;
  font-weight: 700;
  color: var(--verde, #1E4D2B);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: inherit;
  white-space: nowrap;
  opacity: .75;
  transition: opacity .15s;
}
.ait-barra__link:hover { opacity: 1; }

/* ── Overlay ────────────────────────────────────────────────── */
.ait-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(10, 20, 14, .65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.ait-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}
body.ait-modal-aberto { overflow: hidden; }

/* ── Modal ──────────────────────────────────────────────────── */
.ait-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 80px rgba(0,0,0,.22), 0 8px 24px rgba(0,0,0,.1);
  transform: translateY(16px) scale(.98);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
  overflow: hidden;
}
.ait-overlay[aria-hidden="false"] .ait-modal {
  transform: translateY(0) scale(1);
}

/* Topo */
.ait-modal__topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--verde, #1E4D2B);
  flex-shrink: 0;
}

.ait-modal__topo-esq {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.ait-modal__avatar {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.ait-modal__titulo {
  font-family: var(--fonte-display, Georgia, serif);
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin: 0 0 .15rem;
}

.ait-modal__sub {
  font-size: .75rem;
  color: rgba(255,255,255,.6);
  margin: 0;
}

.ait-modal__x {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: none;
  color: rgba(255,255,255,.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
}
.ait-modal__x:hover { background: rgba(255,255,255,.22); color: #fff; }
.ait-modal__x:focus-visible { outline: 2px solid #F97316; outline-offset: 2px; }

/* Corpo */
.ait-modal__corpo {
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: #E2DED8 transparent;
}
.ait-modal__corpo::-webkit-scrollbar { width: 4px; }
.ait-modal__corpo::-webkit-scrollbar-thumb { background: #E2DED8; border-radius: 4px; }

/* Lista de itens */
.ait-lista {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.ait-item {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .85rem .75rem;
  border-radius: 10px;
  font-size: .88rem;
  color: #2A2A28;
  line-height: 1.55;
  transition: background .15s;
}
.ait-item:hover { background: #F7F6F3; }
.ait-item--alerta { background: #FEF9EC; }
.ait-item--alerta:hover { background: #FEF3D6; }

.ait-item__ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--verde-palido, #EBF5EE);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  margin-top: .05rem;
}
.ait-item--alerta .ait-item__ic { background: #FEF0C7; }

.ait-item strong {
  display: block;
  font-weight: 700;
  font-size: .82rem;
  color: #1A1A18;
  margin-bottom: .15rem;
}

/* Rodapé */
.ait-modal__rodape {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #E2DED8;
  background: #FAFAF7;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.ait-modal__rodape-links {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.ait-modal__rodape-links a {
  font-size: .78rem;
  color: var(--verde-medio, #2D6B3F);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ait-modal__rodape-links a:hover { color: var(--verde, #1E4D2B); }

.ait-modal__ok {
  background: var(--verde, #1E4D2B);
  color: #fff;
  border: none;
  padding: .55rem 1.4rem;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.ait-modal__ok:hover { background: #2D6B3F; transform: translateY(-1px); }
.ait-modal__ok:focus-visible { outline: 2px solid #F97316; outline-offset: 2px; }

/* ── Badge inline em artigos ────────────────────────────────── */
.ait-badge-wrap {
  position: relative;
  display: inline-block;
}

.ait-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(30,77,43,.07);
  color: var(--verde, #1E4D2B);
  border: 1px solid rgba(30,77,43,.15);
  border-radius: 999px;
  padding: .2rem .65rem;
  font-size: .68rem;
  font-weight: 700;
  font-family: var(--fonte-corpo, sans-serif);
  letter-spacing: .04em;
  cursor: default;
  white-space: nowrap;
  user-select: none;
}

.ait-badge__dot {
  width: 5px; height: 5px;
  background: currentColor;
  border-radius: 50%;
  opacity: .6;
  animation: ait-pulse 2.4s ease-in-out infinite;
}
@keyframes ait-pulse {
  0%, 100% { opacity: .3; transform: scale(1); }
  50%       { opacity: .8; transform: scale(1.3); }
}

.ait-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1A1A18;
  color: #FAFAF7;
  font-size: .75rem;
  line-height: 1.5;
  font-family: var(--fonte-corpo, sans-serif);
  padding: .55rem .85rem;
  border-radius: 8px;
  width: max-content;
  max-width: 220px;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s, transform .2s;
  pointer-events: none;
  z-index: 9100;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.ait-tooltip::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1A1A18;
}
.ait-badge-wrap:hover .ait-tooltip,
.ait-badge-wrap:focus-within .ait-tooltip {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.ait-tooltip__link {
  display: block;
  margin-top: .3rem;
  color: #7DC894;
  background: none;
  border: none;
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* ── Responsivo ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .ait-modal {
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    align-self: flex-end;
    max-width: 100%;
  }
  .ait-overlay { align-items: flex-end; padding: 0; }
  .ait-modal__topo  { padding: 1rem 1.25rem; }
  .ait-modal__corpo { padding: 1rem 1.25rem; }
  .ait-modal__rodape {
    flex-direction: column-reverse;
    align-items: stretch;
    padding: .9rem 1.25rem;
  }
  .ait-modal__ok { text-align: center; }
  .ait-modal__rodape-links { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .ait-overlay, .ait-modal, .ait-badge__dot, .ait-tooltip {
    transition: none; animation: none;
  }
}
