/* ==========================================================
   Nota de esclarecimento — aviso flutuante + leitor
   (o leitor reaproveita a "casca" .exam de css/exames.css)
   ========================================================== */

/* ---------- aviso flutuante ---------- */
.notice {
  --amber: #f5b400;
  --amber-100: #fff4d1;
  position: fixed; z-index: 84;
  left: 14px; bottom: calc(var(--dock-h) + 22px + env(safe-area-inset-bottom));
  display: flex; align-items: center;
  max-width: calc(100vw - 14px - 14px - 58px - 12px); /* não encosta no WhatsApp */
  transition: opacity .3s, transform .35s var(--ease);
  animation: notice-in .6s 1.4s var(--ease) both;
}
.notice__btn {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  min-height: 58px; padding: 8px 40px 8px 8px; border-radius: 18px;
  background: var(--paper); border: 1.5px solid var(--amber); color: var(--ink);
  text-align: left; cursor: pointer;
  box-shadow: 0 10px 28px rgba(5, 58, 32, .18);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.notice__btn:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(5, 58, 32, .24); }
.notice__btn:active { transform: scale(.97); }
.notice__icon {
  position: relative; flex: none;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--amber); color: #3b2a00;
}
.notice__icon .i { width: 22px; height: 22px; stroke-width: 2.2; }
/* ponto pulsando para chamar atenção */
.notice__icon::after {
  content: ""; position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--coral); border: 2px solid var(--paper);
  animation: notice-dot 1.8s ease-in-out infinite;
}
.notice__text { display: grid; min-width: 0; line-height: 1.2; }
.notice__text small {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9a7000;
}
.notice__text strong { font-size: .86rem; font-weight: 700; }
.notice__cta { display: none; }
.notice__min {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 0; background: transparent; color: var(--ink-3); cursor: pointer;
}
.notice__min:hover { background: var(--sand); color: var(--ink); }
.notice__min .i { width: 15px; height: 15px; }

/* minimizado: só o ícone */
.notice.is-min .notice__btn { padding: 8px; min-height: 0; border-radius: 16px; }
.notice.is-min .notice__text, .notice.is-min .notice__min, .notice.is-min .notice__cta { display: none !important; }

/* some junto com o dock (teclado aberto) e com painéis abertos */
.dock.is-hidden ~ .notice { opacity: 0; pointer-events: none; transform: translateY(20px); }
body.is-locked .notice { opacity: 0; pointer-events: none; }

@keyframes notice-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes notice-dot { 50% { transform: scale(1.25); } }

/* ---------- leitor ---------- */
.exam.nota .nota__icon { display: grid; background: #f5b400; color: #3b2a00; } /* vence a regra das etapas do .exam */
.nota__icon .i { stroke-width: 2.2; }

.nota__body {
  position: relative; flex: 1; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: var(--sand);
  padding: 16px 12px 24px;
}
.nota__resumo {
  max-width: 820px; margin: 0 auto 14px; padding: 12px 16px; border-radius: 14px;
  background: #fff4d1; color: #5c4300; font-size: .9rem; font-weight: 600;
}
.nota__pages { display: grid; gap: 14px; max-width: 820px; margin: 0 auto; }
.nota__pages img {
  width: 100%; height: auto; border-radius: 10px;
  background: linear-gradient(90deg, #efeadf 0%, #f8f5ee 50%, #efeadf 100%) 0 0 / 200% 100%;
  animation: shimmer 1.3s linear infinite;
  box-shadow: 0 2px 6px rgba(5, 58, 32, .08), 0 12px 30px rgba(5, 58, 32, .1);
}
.nota__pages img.is-loaded { background: #fff; animation: none; }

.nota__foot { justify-content: flex-end; gap: 10px; }
.nota__foot .btn { flex: 1; }

@media (min-width: 720px) {
  .nota { width: min(900px, calc(100vw - 48px)); height: calc(100dvh - 48px); }
  .nota__body { padding: 24px 32px 32px; }
  .nota__foot .btn { flex: none; }
}

/* ---------- desktop ---------- */
@media (min-width: 960px) {
  .notice { left: 24px; bottom: 24px; max-width: 420px; }
  .notice__btn { padding-right: 44px; }
  .notice__cta {
    display: inline-flex; align-items: center; gap: 4px; margin-left: 6px;
    padding: 6px 12px; border-radius: 999px;
    background: var(--forest-800); color: #fff; font-size: .8rem; font-weight: 700;
  }
  .notice__cta .i { width: 14px; height: 14px; }
  .notice__text strong { font-size: .92rem; }
}

@media (prefers-reduced-motion: reduce) {
  .notice, .notice__icon::after, .nota__pages img { animation: none; }
}
