/**
 * WD Social Feeds - Frontend Styles
 *
 * Uses BEM methodology and CSS custom properties for customization.
 * 4-breakpoint responsive system: Desktop, Laptop, Tablet, Phone
 */

/* CSS Custom Properties */
:root {
  /* Default values (Desktop) */
  --wdsf-columns: 4;
  --wdsf-gap: 16px;

  /* Responsive breakpoint values */
  --wdsf-columns-laptop: 3;
  --wdsf-gap-laptop: 16px;
  --wdsf-columns-tablet: 2;
  --wdsf-gap-tablet: 12px;
  --wdsf-columns-phone: 1;
  --wdsf-gap-phone: 8px;

  /* Appearance */
  --wdsf-aspect-ratio: 9 / 16;
  --wdsf-border-radius: 8px;
  --wdsf-overlay-bg: rgba(0, 0, 0, 0.6);
  --wdsf-transition: 0.2s ease;

  /* Colors */
  --wdsf-text-primary: #1a1a1a;
  --wdsf-text-secondary: #666;
  --wdsf-text-muted: #999;
  --wdsf-bg-card: #fff;
  --wdsf-bg-subtle: #f5f5f5;
  --wdsf-border-color: #e5e5e5;
  --wdsf-accent-color: #0095f6;
}

/* ============================================
   FEED CONTAINER
   ============================================ */
.wdsf-feed {
  width: 100%;
  box-sizing: border-box;
}

.wdsf-feed *,
.wdsf-feed *::before,
.wdsf-feed *::after {
  box-sizing: border-box;
}

/* ============================================
   GRID LAYOUT
   ============================================ */
.wdsf-feed--grid .wdsf-feed__items {
  display: grid;
  grid-template-columns: repeat(var(--wdsf-columns), 1fr);
  gap: var(--wdsf-gap);
}

/* ============================================
   SLIDER LAYOUT
   ============================================ */
.wdsf-feed--slider {
  position: relative;
}

.wdsf-feed--slider .wdsf-feed__items {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: var(--wdsf-gap);
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}

.wdsf-feed--slider .wdsf-feed__items::-webkit-scrollbar {
  display: none;
}

.wdsf-feed--slider .wdsf-item {
  flex: 0 0
    calc(
      (100% - (var(--wdsf-columns) - 1) * var(--wdsf-gap)) / var(--wdsf-columns)
    );
  scroll-snap-align: start;
}

/* LTR Direction for Slide style - rotate container and items */
.wdsf-feed--slider.wdsf-feed--style-slide.wdsf-feed--direction-ltr .wdsf-feed__items {
  transform: rotateY(180deg);
}

/* Rotate items back so content displays correctly */
.wdsf-feed--slider.wdsf-feed--style-slide.wdsf-feed--direction-ltr .wdsf-item {
  transform: rotateY(180deg);
}


/* ============================================
   MASONRY LAYOUT
   ============================================ */
.wdsf-feed--masonry .wdsf-feed__items {
  columns: var(--wdsf-columns);
  column-gap: var(--wdsf-gap);
}

.wdsf-feed--masonry .wdsf-item {
  break-inside: avoid;
  margin-bottom: var(--wdsf-gap);
}

/* Masonry size variations */
.wdsf-feed--masonry .wdsf-item--size-0 {
  aspect-ratio: 1 / 1;
}
.wdsf-feed--masonry .wdsf-item--size-1 {
  aspect-ratio: 3 / 4;
}
.wdsf-feed--masonry .wdsf-item--size-2 {
  aspect-ratio: 9 / 16;
}
.wdsf-feed--masonry .wdsf-item--size-3 {
  aspect-ratio: 4 / 5;
}

/* ============================================
   FEED ITEM
   ============================================ */
.wdsf-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--wdsf-border-radius);
  background-color: var(--wdsf-bg-card);
  border: 1px solid var(--wdsf-border-color);
  display: flex;
  flex-direction: column;
}

/* Items without header/actions/caption - media fills the item */
.wdsf-feed--grid
  .wdsf-item:not(:has(.wdsf-item__header)):not(:has(.wdsf-item__actions)):not(
    :has(.wdsf-item__caption)
  ),
.wdsf-feed--slider
  .wdsf-item:not(:has(.wdsf-item__header)):not(:has(.wdsf-item__actions)):not(
    :has(.wdsf-item__caption)
  ) {
  /* No extra padding/space - media controls the size */
  overflow: hidden;
}

/* Aspect ratio variations */
.wdsf-feed[data-aspect-ratio="square"] {
  --wdsf-aspect-ratio: 1 / 1;
}
.wdsf-feed[data-aspect-ratio="portrait"] {
  --wdsf-aspect-ratio: 9 / 16;
}
.wdsf-feed[data-aspect-ratio="landscape"] {
  --wdsf-aspect-ratio: 16 / 9;
}
.wdsf-feed[data-aspect-ratio="original"] .wdsf-item {
  aspect-ratio: auto;
}

/* ============================================
   ITEM HEADER
   ============================================ */
.wdsf-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background-color: var(--wdsf-bg-card);
}

.wdsf-item__user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wdsf-item__avatar-link {
  flex-shrink: 0;
}

.wdsf-item__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.wdsf-item__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.wdsf-item__username {
  font-size: 14px;
  font-weight: 600;
  color: var(--wdsf-text-primary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

a.wdsf-item__username:hover {
  color: var(--wdsf-text-secondary);
}

/* Header actions wrapper (follow button + platform icon) */
.wdsf-item__header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Follow button (in header) */
.wdsf-item__follow-btn {
  display: inline-flex;
  align-items: center;
  padding: 2px 14px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: all var(--wdsf-transition);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Instagram follow button style */
.wdsf-feed--instagram .wdsf-item__follow-btn {
  background: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
  color: white;
}

.wdsf-feed--instagram .wdsf-item__follow-btn:hover {
  opacity: 0.9;
}

/* YouTube follow button style */
.wdsf-feed--youtube .wdsf-item__follow-btn {
  background-color: #ff0000;
  color: white;
}

.wdsf-feed--youtube .wdsf-item__follow-btn:hover {
  background-color: #cc0000;
}

/* TikTok follow button style */
.wdsf-feed--tiktok .wdsf-item__follow-btn {
  background-color: #000;
  color: white;
}

.wdsf-feed--tiktok .wdsf-item__follow-btn:hover {
  background-color: #333;
}

/* Facebook follow button style */
.wdsf-feed--facebook .wdsf-item__follow-btn {
  background-color: #1877f2;
  color: white;
}

.wdsf-feed--facebook .wdsf-item__follow-btn:hover {
  background-color: #166fe5;
}

.wdsf-item__date {
  font-size: 12px;
  color: var(--wdsf-text-muted);
}

.wdsf-item__platform-link {
  flex-shrink: 0;
  padding: 4px;
  color: var(--wdsf-text-muted);
  transition: color var(--wdsf-transition);
}

.wdsf-item__platform-link:hover {
  color: var(--wdsf-text-primary);
}

.wdsf-item__platform-link svg {
  display: block;
}

/* ============================================
   ITEM MEDIA
   ============================================ */
.wdsf-item__link {
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

/* Media always has aspect ratio */
.wdsf-item__media {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: var(--wdsf-bg-subtle);
  aspect-ratio: var(--wdsf-aspect-ratio);
  flex-shrink: 0;
}

/* When item has no header/actions, media fills the available space */
.wdsf-item:not(:has(.wdsf-item__header)):not(:has(.wdsf-item__actions))
  .wdsf-item__media {
  flex: 1;
  aspect-ratio: auto;
}

.wdsf-item__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--wdsf-transition), opacity var(--wdsf-transition);
}

/* Video Icon (shown on video items) */
.wdsf-item__video-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: white;
  pointer-events: none;
  z-index: 10;
  opacity: 1;
}

.wdsf-item__video-icon svg {
  width: 20px;
  height: 20px;
  opacity: 1;
}

/* ============================================
   ITEM ACTIONS (Likes, Comments, Share)
   ============================================ */
.wdsf-item__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background-color: var(--wdsf-bg-card);
  border-top: 1px solid var(--wdsf-border-color);
}

.wdsf-item__stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wdsf-item__likes,
.wdsf-item__comments {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--wdsf-text-secondary);
}

.wdsf-item__likes svg,
.wdsf-item__comments svg {
  color: var(--wdsf-text-muted);
}

.wdsf-item__share {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--wdsf-text-muted);
  transition: color var(--wdsf-transition);
}

.wdsf-item__share:hover {
  color: var(--wdsf-text-primary);
}

/* ============================================
   ITEM CAPTION
   ============================================ */
.wdsf-item__caption {
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--wdsf-text-primary);
  background-color: var(--wdsf-bg-card);
  border-top: 1px solid var(--wdsf-border-color);
}

/* ============================================
   HOVER EFFECTS
   ============================================ */
.wdsf-item--hover-zoom:hover .wdsf-item__image {
  transform: scale(1.05);
}

.wdsf-item--hover-zoom:hover .wdsf-item__video-icon {
  background-color: rgba(0, 0, 0, 0.8);
}

.wdsf-item--hover-fade:hover .wdsf-item__image {
  opacity: 0.8;
}

/* ============================================
   SLIDER NAVIGATION
   ============================================ */
.wdsf-feed__nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  pointer-events: none;
}

.wdsf-feed__nav-prev,
.wdsf-feed__nav-next {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  transition: background-color var(--wdsf-transition),
    transform var(--wdsf-transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.wdsf-feed__nav-prev:hover,
.wdsf-feed__nav-next:hover {
  background-color: white;
  transform: scale(1.05);
}

.wdsf-feed__nav-prev:disabled,
.wdsf-feed__nav-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wdsf-feed__nav svg {
  width: 24px;
  height: 24px;
  color: var(--wdsf-text-primary);
}

/* Slider Dots */
.wdsf-feed__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.wdsf-feed__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #d1d5db;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color var(--wdsf-transition),
    transform var(--wdsf-transition);
}

.wdsf-feed__dot:hover {
  background-color: #9ca3af;
}

.wdsf-feed__dot--active {
  background-color: var(--wdsf-text-primary);
  transform: scale(1.25);
}

/* ============================================
   TICKER / SMOOTH CAROUSEL
   ============================================ */
.wdsf-feed--slider.wdsf-feed--ticker {
  overflow: hidden;
}

.wdsf-feed--slider.wdsf-feed--ticker .wdsf-feed__items {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  overflow: visible;
  scroll-snap-type: none;
  animation: wdsf-ticker linear infinite;
  animation-play-state: running;
}

.wdsf-feed--slider.wdsf-feed--ticker .wdsf-feed__items:hover {
  animation-play-state: paused;
}

.wdsf-feed--slider.wdsf-feed--ticker .wdsf-item {
  flex: 0 0 auto;
  width: var(--wdsf-ticker-item-width, 280px);
  scroll-snap-align: none;
}

/* Default Ticker - items scroll right to left (standard ticker behavior) */
@keyframes wdsf-ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(var(--wdsf-ticker-scroll, -50%));
  }
}

/* LTR Ticker - items scroll left to right (reverse) */
.wdsf-feed--slider.wdsf-feed--ticker-ltr .wdsf-feed__items {
  animation-name: wdsf-ticker-ltr;
}

@keyframes wdsf-ticker-ltr {
  0% {
    transform: translateX(var(--wdsf-ticker-scroll, -50%));
  }
  100% {
    transform: translateX(0);
  }
}

/* ============================================
   LIGHTBOX
   ============================================ */
.wdsf-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.9);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wdsf-lightbox--open {
  opacity: 1;
  visibility: visible;
}

.wdsf-lightbox__content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wdsf-lightbox__media {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
}

.wdsf-lightbox__caption {
  margin-top: 16px;
  padding: 16px;
  max-width: 600px;
  color: white;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.wdsf-lightbox__close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 24px;
  opacity: 0.7;
  transition: opacity var(--wdsf-transition);
}

.wdsf-lightbox__close:hover {
  opacity: 1;
}

/* Lightbox Navigation */
.wdsf-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--wdsf-transition),
    background-color var(--wdsf-transition);
  z-index: 10;
}

.wdsf-lightbox__nav:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.25);
}

.wdsf-lightbox__nav--prev {
  left: 20px;
}

.wdsf-lightbox__nav--next {
  right: 20px;
}

.wdsf-lightbox__nav svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .wdsf-lightbox__nav {
    width: 40px;
    height: 40px;
  }

  .wdsf-lightbox__nav--prev {
    left: 10px;
  }

  .wdsf-lightbox__nav--next {
    right: 10px;
  }

  .wdsf-lightbox__nav svg {
    width: 20px;
    height: 20px;
  }
}

.wdsf-lightbox__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 8px 16px;
  min-width: 280px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.wdsf-lightbox__stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wdsf-lightbox__likes,
.wdsf-lightbox__comments {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: white;
  font-size: 14px;
}

.wdsf-lightbox__likes svg,
.wdsf-lightbox__comments svg {
  opacity: 0.9;
}

.wdsf-lightbox__share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color var(--wdsf-transition);
}

.wdsf-lightbox__share:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.wdsf-lightbox__link {
  margin-top: 12px;
  padding: 8px 16px;
  background-color: white;
  color: var(--wdsf-text-primary);
  text-decoration: none;
  font-size: 14px;
  border-radius: 4px;
  transition: background-color var(--wdsf-transition);
}

.wdsf-lightbox__link:hover {
  background-color: #f0f0f0;
}

/* ============================================
   LIGHTBOX CARD LAYOUT
   ============================================ */
.wdsf-lightbox--card .wdsf-lightbox__content {
  max-width: 420px;
  width: 90vw;
}

.wdsf-lightbox-card {
  background-color: var(--wdsf-bg-card);
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
}

.wdsf-lightbox-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background-color: var(--wdsf-bg-card);
}

.wdsf-lightbox-card__user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wdsf-lightbox-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.wdsf-lightbox-card__meta {
  display: flex;
  flex-direction: column;
}

.wdsf-lightbox-card__username {
  font-size: 14px;
  font-weight: 600;
  color: var(--wdsf-text-primary);
}

.wdsf-lightbox-card__date {
  font-size: 12px;
  color: var(--wdsf-text-muted);
}

.wdsf-lightbox-card__platform-link {
  padding: 4px;
  color: var(--wdsf-text-muted);
  transition: color var(--wdsf-transition);
}

.wdsf-lightbox-card__platform-link:hover {
  color: var(--wdsf-text-primary);
}

.wdsf-lightbox-card__media {
  width: 100%;
  background-color: var(--wdsf-bg-subtle);
}

.wdsf-lightbox-card__image,
.wdsf-lightbox-card__video {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: block;
}

.wdsf-lightbox-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: var(--wdsf-bg-card);
  border-top: 1px solid var(--wdsf-border-color);
}

.wdsf-lightbox-card__stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wdsf-lightbox-card__likes,
.wdsf-lightbox-card__comments {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--wdsf-text-secondary);
}

.wdsf-lightbox-card__likes svg,
.wdsf-lightbox-card__comments svg {
  color: var(--wdsf-text-muted);
}

.wdsf-lightbox-card__share {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--wdsf-text-muted);
  transition: color var(--wdsf-transition);
}

.wdsf-lightbox-card__share:hover {
  color: var(--wdsf-text-primary);
}

.wdsf-lightbox-card__caption {
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--wdsf-text-primary);
  background-color: var(--wdsf-bg-card);
  border-top: 1px solid var(--wdsf-border-color);
  max-height: 200px;
  overflow-y: auto;
}

.wdsf-lightbox-card__caption::-webkit-scrollbar {
  width: 6px;
}

.wdsf-lightbox-card__caption::-webkit-scrollbar-track {
  background: transparent;
}

.wdsf-lightbox-card__caption::-webkit-scrollbar-thumb {
  background-color: var(--wdsf-border-color);
  border-radius: 3px;
}

.wdsf-lightbox-card__caption::-webkit-scrollbar-thumb:hover {
  background-color: var(--wdsf-text-muted);
}

/* ============================================
   STATES
   ============================================ */
/* Empty State */
.wdsf-feed--empty {
  padding: 40px;
  text-align: center;
  color: var(--wdsf-text-secondary);
  background-color: var(--wdsf-bg-subtle);
  border-radius: var(--wdsf-border-radius);
}

/* Error State */
.wdsf-error {
  padding: 16px;
  color: #721c24;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: var(--wdsf-border-radius);
}

/* ============================================
   4-BREAKPOINT RESPONSIVE SYSTEM
   ============================================ */

/* Laptop: 992-1200px */
@media (max-width: 1200px) {
  .wdsf-feed--grid .wdsf-feed__items {
    grid-template-columns: repeat(var(--wdsf-columns-laptop), 1fr);
    gap: var(--wdsf-gap-laptop);
  }

  .wdsf-feed--masonry .wdsf-feed__items {
    columns: var(--wdsf-columns-laptop);
    column-gap: var(--wdsf-gap-laptop);
  }

  .wdsf-feed--masonry .wdsf-item {
    margin-bottom: var(--wdsf-gap-laptop);
  }

  .wdsf-feed--slider .wdsf-feed__items {
    gap: var(--wdsf-gap-laptop);
  }

  .wdsf-feed--slider .wdsf-item {
    flex: 0 0
      calc(
        (100% - (var(--wdsf-columns-laptop) - 1) * var(--wdsf-gap-laptop)) /
          var(--wdsf-columns-laptop)
      );
  }
}

/* Tablet: 768-991px */
@media (max-width: 991px) {
  .wdsf-feed--grid .wdsf-feed__items {
    grid-template-columns: repeat(var(--wdsf-columns-tablet), 1fr);
    gap: var(--wdsf-gap-tablet);
  }

  .wdsf-feed--masonry .wdsf-feed__items {
    columns: var(--wdsf-columns-tablet);
    column-gap: var(--wdsf-gap-tablet);
  }

  .wdsf-feed--masonry .wdsf-item {
    margin-bottom: var(--wdsf-gap-tablet);
  }

  .wdsf-feed--slider .wdsf-feed__items {
    gap: var(--wdsf-gap-tablet);
  }

  .wdsf-feed--slider .wdsf-item {
    flex: 0 0
      calc(
        (100% - (var(--wdsf-columns-tablet) - 1) * var(--wdsf-gap-tablet)) /
          var(--wdsf-columns-tablet)
      );
  }

  /* Reduce header padding */
  .wdsf-item__header {
    padding: 10px;
  }

  .wdsf-item__actions {
    padding: 8px 10px;
  }
}

/* Phone: <768px */
@media (max-width: 767px) {
  .wdsf-feed--grid .wdsf-feed__items {
    grid-template-columns: repeat(var(--wdsf-columns-phone), 1fr);
    gap: var(--wdsf-gap-phone);
  }

  .wdsf-feed--masonry .wdsf-feed__items {
    columns: var(--wdsf-columns-phone);
    column-gap: var(--wdsf-gap-phone);
  }

  .wdsf-feed--masonry .wdsf-item {
    margin-bottom: var(--wdsf-gap-phone);
  }

  .wdsf-feed--slider .wdsf-feed__items {
    gap: var(--wdsf-gap-phone);
  }

  .wdsf-feed--slider .wdsf-item {
    flex: 0 0
      calc(
        (100% - (var(--wdsf-columns-phone) - 1) * var(--wdsf-gap-phone)) /
          var(--wdsf-columns-phone)
      );
  }

  /* Smaller nav buttons on mobile */
  .wdsf-feed__nav-prev,
  .wdsf-feed__nav-next {
    width: 36px;
    height: 36px;
  }

  .wdsf-feed__nav svg {
    width: 20px;
    height: 20px;
  }

  /* Smaller avatar */
  .wdsf-item__avatar {
    width: 28px;
    height: 28px;
  }

  .wdsf-item__username {
    font-size: 13px;
  }

  .wdsf-item__date {
    font-size: 11px;
  }
}

/* ============================================
   VIDEO AUTOPLAY SUPPORT
   ============================================ */
.wdsf-item__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

/* Smooth transition for image when video takes over */
.wdsf-item--video .wdsf-item__image {
  transition: opacity 0.3s ease;
}

/* Hide video icon when video is playing */
.wdsf-item--video-playing .wdsf-item__video-icon {
  opacity: 0;
  pointer-events: none;
}

/* Lightbox video wrapper */
.wdsf-lightbox-card__video-wrapper {
  position: relative;
  width: 100%;
}

/* Lightbox video play/pause overlay */
.wdsf-lightbox-card__play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.wdsf-lightbox-card__play-overlay:hover,
.wdsf-lightbox-card__play-overlay:focus {
  opacity: 1;
}

/* Show play icon by default */
.wdsf-lightbox-card__play-overlay .wdsf-play-icon {
  display: block;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.wdsf-lightbox-card__play-overlay .wdsf-pause-icon {
  display: none;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* When video is playing, show pause icon */
.wdsf-lightbox-card__play-overlay--playing .wdsf-play-icon {
  display: none;
}

.wdsf-lightbox-card__play-overlay--playing .wdsf-pause-icon {
  display: block;
}

/* Toast notification for share */
.wdsf-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 24px;
  background-color: var(--wdsf-text-primary);
  color: white;
  font-size: 14px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 999998;
}

.wdsf-toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
