/* Loading skeletons, See more, and the image viewer.
   Moved from trending.css 1355-1542. Rules unchanged. */

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

.x-shimmer,
.x-img-loading {
  background: linear-gradient(
    90deg,
    var(--skeleton-base) 25%,
    var(--skeleton-highlight) 50%,
    var(--skeleton-base) 75%
  );
  background-size: 200% 100%;
  animation: alterwordsShimmer 1.35s ease-in-out infinite;
}

.x-post-skeleton {
  display: flex;
  flex-direction: row;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--x-border);
  background: transparent;
}

.x-skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.x-skeleton-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.x-skeleton-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.x-skeleton-line {
  display: block;
  height: 12px;
  border-radius: 6px;
}

.x-skeleton-author {
  width: 120px;
}

.x-skeleton-handle {
  width: 85px;
}

.x-skeleton-text-1 {
  width: 92%;
}

.x-skeleton-text-2 {
  width: 68%;
}

.x-skeleton-media {
  width: 100%;
  height: 150px;
  border-radius: 12px;
  margin-top: 4px;
}


/* =========================================
   "See More" Icon Bar on the Last Post
   ========================================= */
.x-see-more-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px 14px 16px;
  border-bottom: 1px solid var(--x-border);
  background: transparent;
}

.x-see-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 6px 16px;
  border-radius: 9999px;
  border: 1px solid var(--x-border-strong);
  background: transparent;
  color: var(--x-text-primary);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
}

.x-see-more-btn:hover {
  border-color: var(--x-accent-blue);
  color: var(--x-accent-blue);
  transform: translateY(-1px);
}

.x-see-more-btn:active {
  transform: scale(0.96);
}

.x-see-more-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =========================================
   Full-Screen Image Lightbox Viewer (Tapping Any Post Picture)
   ========================================= */
.x-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3500;
  background: rgba(5, 6, 8, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.x-image-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.x-image-lightbox-img {
  max-width: min(94vw, 1080px);
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  transform: scale(0.95);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.x-image-lightbox.active .x-image-lightbox-img {
  transform: scale(1);
}

.x-image-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.x-image-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: scale(1.06);
}
