.meme-dialog-tooltip-wrapper {
  position: relative;
}

.meme-dialog-tooltip {
  position: absolute;
  bottom: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.meme-dialog-tooltip-wrapper:hover .meme-dialog-tooltip {
  opacity: 1;
}
.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1rem;
}

.grid-item {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
}

.meme-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.loading {
  text-align: center;
  margin: 2rem 0;
}

.meme-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.meme-dialog-actions {
  display: flex;
  gap: 0.5rem;
}

.meme-dialog-actions button {
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 0.85rem;
}

.meme-dialog-body {
  position: relative;
}

.meme-dialog-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.meme-dialog-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.meme-dialog-nav-prev {
  left: 0.5rem;
}

.meme-dialog-nav-next {
  right: 0.5rem;
}

/* Skeleton loader for images */
.meme-skeleton {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(128, 128, 128, 0.1) 0%,
    rgba(128, 128, 128, 0.2) 50%,
    rgba(128, 128, 128, 0.1) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.meme-img-loading {
  opacity: 0;
}

.meme-img {
  transition: opacity 0.3s ease;
}

/* Mobile swipe hint */
@media (max-width: 768px) {
  .meme-dialog-nav {
    opacity: 0.5;
    width: 2rem;
    height: 2rem;
  }
  
  .meme-dialog-body {
    touch-action: pan-y pinch-zoom;
  }
}
