/* Paper Digest — "new since your last visit" banner. */

.digest-new-since-visit {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem 0;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  background: linear-gradient(90deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid #f59e0b;
  color: #78350f;
  font-size: 0.92rem;
  line-height: 1.4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.digest-new-badge {
  display: inline-block;
  background: #f59e0b;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
  animation: digest-new-pulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
}

.digest-new-text {
  flex: 1;
}

.digest-new-dismiss {
  background: transparent;
  border: none;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: #92400e;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: background-color 0.15s ease-in-out;
}

.digest-new-dismiss:hover {
  background: rgba(146, 64, 14, 0.12);
}

.digest-new-dismiss:focus {
  outline: 2px solid #92400e;
  outline-offset: 2px;
}

@keyframes digest-new-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
  }
}

/* Reduced-motion users get a static badge, not an animated one. */
@media (prefers-reduced-motion: reduce) {
  .digest-new-badge {
    animation: none;
  }
}

/* Dark-theme palette — MkDocs Material uses [data-md-color-scheme="slate"]. */
[data-md-color-scheme="slate"] .digest-new-since-visit {
  background: linear-gradient(90deg, #3f2a0b 0%, #4a3210 100%);
  border-left-color: #fbbf24;
  color: #fde68a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

[data-md-color-scheme="slate"] .digest-new-badge {
  background: #fbbf24;
  color: #1f2937;
}

[data-md-color-scheme="slate"] .digest-new-dismiss {
  color: #fde68a;
}

[data-md-color-scheme="slate"] .digest-new-dismiss:hover {
  background: rgba(253, 230, 138, 0.12);
}
