/* Scoped Instagram feed renderer styles */
.instagram-feed {
  position: relative;
  min-width: 0;
  color: #000000;
}

.instagram-feed .instagram-rail {
  display: flex;
  gap: 1rem;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 1rem;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.instagram-feed .instagram-card {
  display: block;
  flex: 0 0 calc((100% - 3rem) / 4);
  width: auto;
  min-width: 0;
  border: 1px solid #000000;
  border-radius: 0;
  background: #ffffff;
  color: #000000;
  overflow: hidden;
  text-decoration: none;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.instagram-feed .instagram-media {
  position: relative;
  background: #000000;
}

.instagram-feed .instagram-media::before {
  content: "";
  display: block;
  padding-top: var(--ratio, 177.78%);
}

.instagram-feed .instagram-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.instagram-feed .instagram-meta {
  margin: 0;
  padding: 0.75rem;
  font-size: 0.85rem;
  color: #000000;
}

.instagram-feed .instagram-card:focus-visible {
  outline: 3px solid #000000;
  outline-offset: 2px;
}

@media (max-width: 48rem) {
  .instagram-feed .instagram-rail {
    display: flex;
    gap: 1rem;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .instagram-feed .instagram-card {
    flex: 0 0 min(82vw, 20rem);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}

@media (prefers-reduced-motion: reduce) {
  .instagram-feed * {
    animation: none !important;
    transition: none !important;
  }
}
