/* Runtime-only animation primitives for the live Photo and Video task cards. */

#taskGrid.cv-visual-tool-grid .cv-vtp-vector-demo {
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 20%, rgba(103, 231, 255, .20), transparent 42%),
    radial-gradient(circle at 82% 18%, rgba(158, 112, 255, .24), transparent 45%),
    linear-gradient(135deg, #090b18, #151126 48%, #071421);
}

#taskGrid.cv-visual-tool-grid .cv-vtp-vector-demo::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .34;
  background-image:
    linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, #000, transparent 82%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 82%);
  animation: cvVectorGridDrift 8s linear infinite;
}

#taskGrid.cv-visual-tool-grid .cv-vtp-vector-inner {
  position: absolute;
  z-index: 2;
  inset: 15px 13px 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

#taskGrid.cv-visual-tool-grid .cv-vtp-vector-panel {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 18px;
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 16px 34px rgba(0, 0, 0, .25);
}

#taskGrid.cv-visual-tool-grid .cv-vtp-vector-panel.raster {
  image-rendering: pixelated;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, .10) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .10) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, .10) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .10) 75%),
    linear-gradient(135deg, rgba(111, 91, 255, .28), rgba(49, 207, 255, .14));
  background-position: 0 0, 8px 8px, 0 0;
  background-size: 16px 16px, 16px 16px, auto;
}

#taskGrid.cv-visual-tool-grid .cv-vtp-vector-panel.vector {
  background:
    radial-gradient(circle at 48% 48%, rgba(68, 230, 255, .14), transparent 47%),
    linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025));
}

#taskGrid.cv-visual-tool-grid .cv-vtp-vector-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  color: rgba(255, 255, 255, .86);
  background: rgba(6, 8, 18, .58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 7px;
  font-weight: 950;
  letter-spacing: .08em;
}

#taskGrid.cv-visual-tool-grid .cv-vtp-vector-caption {
  display: none;
}

#taskGrid.cv-visual-tool-grid .cv-vtp-raster-mark,
#taskGrid.cv-visual-tool-grid .cv-vtp-vector-mark {
  position: absolute;
  inset: 24px 13px 22px;
  border-radius: 16px;
}

#taskGrid.cv-visual-tool-grid .cv-vtp-raster-mark {
  filter: blur(.35px);
  background:
    linear-gradient(135deg, transparent 0 28%, #fff 28% 35%, transparent 35% 100%),
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, .92) 0 19%, transparent 20%),
    linear-gradient(135deg, #8565ff, #3cd7ff);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .08), 0 18px 34px rgba(0, 0, 0, .32);
  animation: cvRasterPulse 4.8s ease-in-out infinite;
}

#taskGrid.cv-visual-tool-grid .cv-vtp-raster-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .55;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(255, 255, 255, .20) 48% 52%, transparent 52%),
    linear-gradient(0deg, transparent 0 48%, rgba(255, 255, 255, .20) 48% 52%, transparent 52%);
  background-size: 11px 11px;
}

#taskGrid.cv-visual-tool-grid .cv-vtp-vector-mark {
  display: grid;
  place-items: center;
}

#taskGrid.cv-visual-tool-grid .cv-vtp-vector-mark svg {
  width: 88%;
  height: 88%;
  overflow: visible;
}

#taskGrid.cv-visual-tool-grid .cv-vtp-vector-mark path {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 12px rgba(74, 219, 255, .55));
  stroke-dasharray: 360;
  stroke-dashoffset: 360;
  animation: cvVectorDraw 4.8s cubic-bezier(.72, 0, .28, 1) infinite;
}

#taskGrid.cv-visual-tool-grid .cv-vtp-vector-mark path + path {
  animation-delay: .22s;
}

#taskGrid.cv-visual-tool-grid .cv-vtp-vector-node {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  background: #50e6ff;
  box-shadow: 0 0 14px rgba(80, 230, 255, .75);
  opacity: 0;
  transform: scale(.55);
  animation: cvVectorNodePulse 4.8s ease-in-out infinite;
}

#taskGrid.cv-visual-tool-grid .cv-vtp-vector-node:nth-child(2) { left: 23%; top: 34%; animation-delay: .85s; }
#taskGrid.cv-visual-tool-grid .cv-vtp-vector-node:nth-child(3) { right: 25%; top: 33%; animation-delay: 1.02s; }
#taskGrid.cv-visual-tool-grid .cv-vtp-vector-node:nth-child(4) { left: 31%; bottom: 26%; animation-delay: 1.2s; }
#taskGrid.cv-visual-tool-grid .cv-vtp-vector-node:nth-child(5) { right: 30%; bottom: 23%; animation-delay: 1.36s; }

#taskGrid.cv-visual-tool-grid .cv-vtp-vector-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, rgba(123, 93, 255, .72), rgba(62, 199, 255, .70));
  box-shadow: 0 10px 24px rgba(63, 156, 255, .22);
  font-size: 15px;
  font-weight: 950;
  animation: cvVectorArrowPulse 4.8s ease-in-out infinite;
}

@keyframes cvVectorGridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 18px 18px, 18px 18px; }
}

@keyframes cvRasterPulse {
  0%, 100% { transform: scale(1); filter: blur(.35px) saturate(.92); opacity: .88; }
  42% { transform: scale(.96); filter: blur(.55px) saturate(.75); opacity: .64; }
  62% { transform: scale(1.02); filter: blur(.18px) saturate(1.08); opacity: .95; }
}

@keyframes cvVectorDraw {
  0%, 22% { stroke-dashoffset: 360; opacity: .18; }
  52%, 78% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: .82; }
}

@keyframes cvVectorNodePulse {
  0%, 30% { opacity: 0; transform: scale(.55); }
  48%, 78% { opacity: 1; transform: scale(1); }
  100% { opacity: .30; transform: scale(.72); }
}

@keyframes cvVectorArrowPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 10px 24px rgba(63, 156, 255, .22); }
  46% { transform: scale(1.08); box-shadow: 0 10px 28px rgba(84, 221, 255, .36), 0 0 22px rgba(123, 93, 255, .20); }
}

@keyframes cvVtpReveal {
  0%, 10% { clip-path: inset(0 100% 0 0); -webkit-clip-path: inset(0 100% 0 0); }
  43%, 62% { clip-path: inset(0 0 0 0); -webkit-clip-path: inset(0 0 0 0); }
  92%, 100% { clip-path: inset(0 100% 0 0); -webkit-clip-path: inset(0 100% 0 0); }
}

@keyframes cvVtpScan {
  0%, 10% { left: 0; opacity: 0; }
  13% { opacity: 1; }
  43%, 62% { left: calc(100% - 2px); opacity: 1; }
  65% { opacity: 0; }
  89% { left: calc(100% - 2px); opacity: 0; }
  92% { opacity: 1; }
  100% { left: 0; opacity: 0; }
}

@keyframes cvVtpRevealLongAfter {
  0%, 13% { clip-path: inset(0 100% 0 0); -webkit-clip-path: inset(0 100% 0 0); }
  24%, 88% { clip-path: inset(0 0 0 0); -webkit-clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 100% 0 0); -webkit-clip-path: inset(0 100% 0 0); }
}

@keyframes cvVtpScanLongAfter {
  0%, 13% { left: 0; opacity: 0; }
  16% { opacity: 1; }
  24%, 88% { left: calc(100% - 2px); opacity: 1; }
  91%, 100% { left: 0; opacity: 0; }
}

@keyframes cvShowcaseKenBurns {
  from { transform: scale(1.04) translate3d(0, 0, 0); filter: saturate(1.02) contrast(1.01); }
  to { transform: scale(1.115) translate3d(-1.4%, -1.1%, 0); filter: saturate(1.12) contrast(1.04); }
}

@keyframes cvShowcaseLightSweep {
  0%, 18% { opacity: 0; transform: translateX(-58%) rotate(8deg); }
  38% { opacity: .75; }
  56%, 100% { opacity: 0; transform: translateX(58%) rotate(8deg); }
}

@media (prefers-reduced-motion: reduce) {
  #taskGrid.cv-visual-tool-grid .cv-vtp-vector-demo *,
  #taskGrid.cv-visual-tool-grid .cv-vtp-vector-demo::before {
    animation: none !important;
  }
}
