/* =========================================================================
   Página pública de uma nota/ata de evento — /nota/<token>
   Servida por app/event-note-public.php (standalone, sem header/footer da app).
   Prefixo: .enp-*
   ========================================================================= */

:root {
  --enp-accent: #4f46e5;
  --enp-accent-deep: #3730a3;
  --enp-ink: #0f172a;
  --enp-ink-2: #475569;
  --enp-ink-3: #64748b;
  --enp-ink-4: #94a3b8;
  --enp-line: #e6e9f0;
  --enp-line-soft: #eef1f5;
  --enp-surface: #ffffff;
  --enp-canvas: #f4f5f9;
}

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

.enp-body {
  margin: 0;
  min-height: 100vh;
  background: var(--enp-canvas);
  background-image: radial-gradient(1200px 560px at 50% -12%, color-mix(in srgb, var(--enp-accent) 14%, transparent) 0%, transparent 70%);
  font-family: "Inter Tight", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--enp-ink);
  -webkit-font-smoothing: antialiased;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  line-height: 1;
  user-select: none;
}

/* ------------------------------------------------------------------ topbar */

.enp-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  min-height: 64px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--enp-line);
}

.enp-topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--enp-ink);
  min-width: 0;
}

.enp-topbar__brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--enp-line);
  background: #fff;
}

.enp-topbar__mono {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--enp-accent) 0%, var(--enp-accent-deep) 100%);
}

.enp-topbar__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40vw;
}

.enp-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.enp-topbar__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 15px;
  border-radius: 11px;
  border: 1.5px solid var(--enp-line);
  background: #fff;
  color: var(--enp-ink-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: 0.15s ease;
  white-space: nowrap;
}

.enp-topbar__btn .material-symbols-outlined { font-size: 19px; }
.enp-topbar__btn:hover { background: #f8fafc; border-color: #cbd5e1; }

.enp-topbar__btn--primary {
  background: var(--enp-accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--enp-accent) 26%, transparent);
}

.enp-topbar__btn--primary:hover {
  background: var(--enp-accent-deep);
  border-color: transparent;
  filter: none;
  transform: translateY(-1px);
}

/* -------------------------------------------------------------------- main */

.enp-main {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 34px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.enp-card {
  background: var(--enp-surface);
  border: 1px solid var(--enp-line);
  border-radius: 20px;
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.04);
}

/* -------------------------------------------------------------------- hero */

.enp-hero { display: flex; flex-direction: column; gap: 14px; }

.enp-draft {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 13.5px;
  line-height: 1.45;
}

.enp-draft .material-symbols-outlined { font-size: 22px; flex: 0 0 auto; }

.enp-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  padding: 6px 13px 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--enp-accent) 11%, #fff);
  border: 1px solid color-mix(in srgb, var(--enp-accent) 24%, #fff);
  color: var(--enp-accent-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.enp-hero__kicker .material-symbols-outlined { font-size: 17px; }

.enp-hero__title {
  margin: 0;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.03em;
  color: var(--enp-ink);
}

.enp-hero__summary {
  margin: 0;
  font-size: 17px;
  line-height: 1.62;
  color: var(--enp-ink-2);
  max-width: 68ch;
}

.enp-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.enp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--enp-line);
  color: var(--enp-ink-3);
  font-size: 12.5px;
  font-weight: 600;
  max-width: 100%;
}

.enp-chip .material-symbols-outlined { font-size: 16px; opacity: 0.85; }

.enp-chip--event {
  background: color-mix(in srgb, var(--enp-accent) 9%, #fff);
  border-color: color-mix(in srgb, var(--enp-accent) 22%, #fff);
  color: var(--enp-accent-deep);
  font-weight: 700;
}

/* ------------------------------------------------------------------- prose */

.enp-prose {
  padding: 30px 34px 34px;
  font-size: 16.5px;
  line-height: 1.75;
  color: #1e293b;
  overflow-wrap: break-word;
}

.enp-prose > *:first-child { margin-top: 0; }
.enp-prose > *:last-child { margin-bottom: 0; }

.enp-prose h1, .enp-prose h2, .enp-prose h3, .enp-prose h4 {
  margin: 1.9em 0 0.6em;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.28;
  color: var(--enp-ink);
}

.enp-prose h1 { font-size: 1.62em; }
.enp-prose h2 { font-size: 1.36em; }
.enp-prose h3 { font-size: 1.16em; }
.enp-prose h4 { font-size: 1.04em; }

.enp-prose p { margin: 0 0 1.1em; }

.enp-prose a {
  color: var(--enp-accent-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.enp-prose strong, .enp-prose b { font-weight: 700; color: var(--enp-ink); }

.enp-prose ul, .enp-prose ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.enp-prose li { margin-bottom: 0.5em; }

.enp-prose blockquote {
  margin: 1.4em 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid color-mix(in srgb, var(--enp-accent) 45%, #fff);
  color: var(--enp-ink-2);
  font-style: italic;
}

.enp-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 0.5em 0;
  border: 1px solid var(--enp-line-soft);
}

.enp-prose hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--enp-line);
}

.enp-prose table {
  width: 100%;
  margin: 1.4em 0;
  border-collapse: collapse;
  font-size: 14.5px;
  display: block;
  overflow-x: auto;
}

.enp-prose th, .enp-prose td {
  padding: 10px 12px;
  border: 1px solid var(--enp-line);
  text-align: left;
}

.enp-prose th { background: #f8fafc; font-weight: 700; }

.enp-prose pre {
  margin: 1.3em 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 13.5px;
  line-height: 1.6;
  overflow-x: auto;
}

.enp-prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #f1f5f9;
  font-size: 0.9em;
}

.enp-prose pre code { padding: 0; background: transparent; color: inherit; }

/* ------------------------------------------------------------------ blocos */

.enp-block { display: flex; flex-direction: column; gap: 14px; }

.enp-block__title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--enp-ink);
}

.enp-block__title .material-symbols-outlined {
  font-size: 21px;
  color: var(--enp-accent);
}

.enp-icon-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1.5px solid var(--enp-line);
  background: #fff;
  color: var(--enp-ink-3);
  text-decoration: none;
  cursor: pointer;
  transition: 0.15s ease;
}

.enp-icon-btn .material-symbols-outlined { font-size: 20px; }

.enp-icon-btn:hover {
  background: color-mix(in srgb, var(--enp-accent) 8%, #fff);
  border-color: color-mix(in srgb, var(--enp-accent) 32%, #fff);
  color: var(--enp-accent-deep);
}

/* -------------------------------------------------------------------- áudio */

.enp-audio { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; }

.enp-audio__head { display: flex; align-items: center; gap: 13px; }

.enp-audio__icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--enp-accent) 0%, var(--enp-accent-deep) 100%);
}

.enp-audio__info { flex: 1 1 auto; min-width: 0; }

.enp-audio__name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--enp-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.enp-audio__sub { margin-top: 2px; font-size: 12.5px; color: var(--enp-ink-4); }

.enp-audio__player {
  width: 100%;
  height: 42px;
  border-radius: 10px;
}

/* ------------------------------------------------------------- transcrição */

.enp-tx { border-top: 1px solid var(--enp-line-soft); padding-top: 12px; }

.enp-tx__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 11px;
  border: 1.5px solid var(--enp-line);
  background: #fff;
  color: var(--enp-ink-2);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s ease;
}

.enp-tx__toggle .material-symbols-outlined { font-size: 18px; }
.enp-tx__toggle:hover { background: #f8fafc; }

.enp-tx__toggle.is-open {
  background: color-mix(in srgb, var(--enp-accent) 9%, #fff);
  border-color: color-mix(in srgb, var(--enp-accent) 28%, #fff);
  color: var(--enp-accent-deep);
}

.enp-tx__chevron { transition: transform 0.18s ease; }
.enp-tx__toggle.is-open .enp-tx__chevron { transform: rotate(180deg); }

.enp-tx__body {
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--enp-line-soft);
}

.enp-tx__text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.72;
  color: #334155;
  white-space: pre-line;
  max-height: 420px;
  overflow-y: auto;
}

.enp-tx__foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  font-size: 11.5px;
  color: var(--enp-ink-4);
}

.enp-tx__foot .material-symbols-outlined { font-size: 15px; }

/* -------------------------------------------------------------------- vídeo */

.enp-video { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 12px; }

.enp-video__head { display: flex; align-items: center; gap: 12px; padding: 0 4px; }

.enp-video__name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--enp-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.enp-video__host {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
  aspect-ratio: 16 / 9;
}

.enp-video__host media-player,
.enp-video__host .enp-video__el,
.enp-video__host video {
  width: 100%;
  height: 100%;
  display: block;
}

/* ----------------------------------------------------------------- galeria */

.enp-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.enp-gallery__item {
  position: relative;
  padding: 0;
  border: 1px solid var(--enp-line);
  border-radius: 14px;
  overflow: hidden;
  background: #f1f5f9;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
  transition: 0.16s ease;
}

.enp-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.enp-gallery__item:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--enp-accent) 40%, #fff);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

/* --------------------------------------------------------------- arquivos */

.enp-files { display: flex; flex-direction: column; gap: 10px; }

.enp-file {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--enp-line);
  text-decoration: none;
  transition: 0.15s ease;
}

.enp-file:hover {
  border-color: color-mix(in srgb, var(--enp-accent) 34%, #fff);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--enp-accent) 12%, transparent);
  transform: translateY(-1px);
}

.enp-file__icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 22px;
  background: color-mix(in srgb, var(--enp-accent) 10%, #fff);
  color: var(--enp-accent-deep);
}

.enp-file__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.enp-file__name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--enp-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.enp-file__meta { font-size: 12px; color: var(--enp-ink-4); }

.enp-file__dl { flex: 0 0 auto; font-size: 21px; color: var(--enp-ink-4); }
.enp-file:hover .enp-file__dl { color: var(--enp-accent); }

.enp-files__hint {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--enp-ink-4);
}

.enp-files__hint .material-symbols-outlined { font-size: 16px; }

/* -------------------------------------------------------------------- foot */

.enp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 22px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--enp-accent) 0%, var(--enp-accent-deep) 100%);
  color: #fff;
  box-shadow: 0 14px 32px color-mix(in srgb, var(--enp-accent) 26%, transparent);
}

.enp-foot__left { min-width: 0; }

.enp-foot__title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.enp-foot__sub { font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, 0.82); }

.enp-foot__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.15s ease;
}

.enp-foot__cta .material-symbols-outlined { font-size: 20px; }
.enp-foot__cta:hover { background: rgba(255, 255, 255, 0.26); color: #fff; }

.enp-powered {
  text-align: center;
  font-size: 12px;
  color: var(--enp-ink-4);
}

.enp-powered a { color: var(--enp-ink-3); font-weight: 700; text-decoration: none; }

/* ---------------------------------------------------------------- lightbox */

.enp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

/* display:grid acima vence o [hidden] nativo — sem isso o overlay bloqueia a página inteira */
.enp-lightbox[hidden] { display: none !important; }
.enp-lightbox.is-on {
  opacity: 1;
  pointer-events: auto;
}

.enp-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.enp-lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: 0.15s ease;
}

.enp-lightbox__close:hover { background: rgba(255, 255, 255, 0.22); }
.enp-lightbox__close .material-symbols-outlined { font-size: 24px; }

/* ------------------------------------------------------------------- toast */

.enp-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 14px);
  z-index: 120;
  padding: 12px 20px;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.3);
  opacity: 0;
  transition: 0.2s ease;
  pointer-events: none;
}

.enp-toast[hidden] { display: none !important; }
.enp-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* -------------------------------------------------------------- responsivo */

@media (max-width: 720px) {
  .enp-topbar { padding: 10px 16px; min-height: 58px; }
  .enp-topbar__btn-label { display: none; }
  .enp-topbar__btn { width: 40px; padding: 0; justify-content: center; }
  .enp-main { padding: 24px 16px 52px; gap: 22px; }
  .enp-prose { padding: 22px 20px 26px; font-size: 16px; }
  .enp-audio, .enp-video { padding: 15px 15px 17px; }
  .enp-foot { padding: 20px; }
  .enp-foot__cta { width: 100%; justify-content: center; }
  .enp-gallery { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

@media (max-width: 420px) {
  .enp-hero__title { font-size: 26px; }
  .enp-hero__summary { font-size: 15.5px; }
}

@media print {
  .enp-topbar, .enp-foot__cta, .enp-toast, .enp-lightbox { display: none !important; }
  .enp-body { background: #fff; }
  .enp-card { box-shadow: none; border-color: #ddd; }
}
