/* =========================
   NOTA EM POPOVER (shortcode [nota])
========================= */

.ofisp-nota {
  position: relative;
  cursor: help;
  text-decoration: underline dotted;
  text-decoration-color: var(--color-accent);
  color: var(--color-accent);
  text-underline-offset: 3px;
}

.ofisp-nota__popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + var(--space-2));
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 280px;
  background: var(--color-heading);
  color: var(--color-white);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-base);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.ofisp-nota__popover::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--color-heading);
}

.ofisp-nota__popover em,
.ofisp-nota__popover i {
  font-style: italic;
}

.ofisp-nota__popover strong,
.ofisp-nota__popover b {
  font-weight: var(--font-weight-semibold);
}

.ofisp-nota__popover a {
  color: var(--color-secondary);
  text-decoration: underline;
}

.ofisp-nota__popover a:hover {
  color: var(--color-white);
}

.ofisp-nota:hover .ofisp-nota__popover,
.ofisp-nota:focus-within .ofisp-nota__popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
  .ofisp-nota__popover {
    max-width: 220px;
  }
}
