/* View-only shading and blue shimmer follow pending content through pagination. */
.cv-docs-prosemirror .cv-processing-pending {
  position: relative;
  background: rgb(128 137 148 / 15%);
  filter: blur(1.7px);
  opacity: .65;
}

.cv-docs-prosemirror .cv-processing-shimmer,
.cv-docs-prosemirror .cv-processing-shimmer-lane {
  position: absolute;
  inset: 0;
  display: block;
  font: inherit;
  pointer-events: none;
  user-select: none;
}

.cv-docs-prosemirror .cv-processing-shimmer {
  overflow: hidden;
}

.cv-docs-prosemirror .cv-processing-shimmer-lane {
  /* Parent opacity brings this highlight to the mockup's 27% blue tint. */
  background-image: linear-gradient(105deg, transparent 42%, rgb(36 71 255 / 42%) 50%, transparent 58%);
  background-size: 220% 100%;
  background-repeat: no-repeat;
  background-position: 120% 0;
  /* Each lane covers every third visual line without splitting the text. */
  mask-image: repeating-linear-gradient(to bottom, #000 0 1lh, transparent 1lh 3lh);
  mask-size: 100% 3lh;
  mask-repeat: repeat;
  animation: cv-processing-blue-shimmer 1.2s ease-in-out infinite;
}

.cv-docs-prosemirror .cv-processing-shimmer-lane:nth-child(2) {
  mask-position: 0 1lh;
  animation-delay: -.95s;
}

.cv-docs-prosemirror .cv-processing-shimmer-lane:nth-child(3) {
  mask-position: 0 2lh;
  animation-delay: -.7s;
}

@keyframes cv-processing-blue-shimmer {
  0%, 10% { background-position: 120% 0; }
  85%, 100% { background-position: -20% 0; }
}

/* Keep the existing countdown modal above the document's view-only effects. */
.cv-processing-overlay { z-index: 5; }

@media (prefers-reduced-motion: reduce) {
  .cv-docs-prosemirror .cv-processing-shimmer { display: none; }
}

@media print {
  .cv-docs-prosemirror .cv-processing-shimmer { display: none; }
  .cv-docs-prosemirror .cv-processing-pending {
    background: none;
    filter: none;
    opacity: 1;
  }
}
