.route-cover {
  position: relative;
  isolation: isolate;
}

.route-raster-preview {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity .28s ease, transform .45s ease;
}

.route-preview-loaded .route-raster-preview {
  opacity: 1;
  transform: scale(1);
}

.route-preview-loaded .route-cover > .cover-grid,
.route-preview-loaded .route-cover > .cover-route {
  opacity: 0;
  transition: opacity .2s ease;
}

.route-cover .cover-top {
  z-index: 3;
}

.route-preview-attribution {
  position: absolute;
  z-index: 3;
  left: 8px;
  bottom: 7px;
  padding: 3px 6px;
  border-radius: 7px;
  background: rgba(7, 16, 28, .72);
  color: rgba(255, 255, 255, .82);
  font-size: 9px;
  line-height: 1;
  letter-spacing: .01em;
  backdrop-filter: blur(5px);
}

.route-preview-loading .route-cover::after {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.08) 46%, transparent 62%);
  transform: translateX(-100%);
  animation: route-preview-shimmer 1.7s ease-in-out infinite;
}

.route-preview-failed .route-cover::after {
  content: 'Схема маршрута';
  position: absolute;
  z-index: 3;
  right: 8px;
  bottom: 7px;
  padding: 3px 6px;
  border-radius: 7px;
  background: rgba(7, 16, 28, .72);
  color: rgba(255, 255, 255, .7);
  font-size: 9px;
  line-height: 1;
}

@keyframes route-preview-shimmer {
  0%, 20% { transform: translateX(-100%); }
  70%, 100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .route-raster-preview { transition: none; }
  .route-preview-loading .route-cover::after { animation: none; }
}
