/**
 * Returnvoid Technologies - Instagram Feed UI Stylesheet
 * Responsive Multi-Column Feed (3+ columns on desktop) with Uncropped Full-View Media.
 */

:root {
  --rv-instafeed-bg: #fafafa;
  --rv-instafeed-card-bg: #ffffff;
  --rv-instafeed-sidebar-bg: #ffffff;
  --rv-instafeed-border: #dbdbdb;
  --rv-instafeed-text: #262626;
  --rv-instafeed-secondary-text: #8e8e8e;
  --rv-instafeed-accent: #0095f6;
  --rv-instafeed-like: #ed4956;
  --rv-instafeed-save: #262626;
  --rv-instafeed-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --rv-instafeed-radius: 8px;
  --rv-instafeed-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.rv-instafeed-theme-dark {
  --rv-instafeed-bg: #000000;
  --rv-instafeed-card-bg: #121212;
  --rv-instafeed-sidebar-bg: #121212;
  --rv-instafeed-border: #262626;
  --rv-instafeed-text: #fafafa;
  --rv-instafeed-secondary-text: #a8a8a8;
  --rv-instafeed-accent: #0095f6;
  --rv-instafeed-like: #ed4956;
  --rv-instafeed-save: #fafafa;
  --rv-instafeed-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Page Wrapper that integrates between theme header and footer */
.rv-instafeed-page-wrapper {
  background-color: var(--rv-instafeed-bg);
  color: var(--rv-instafeed-text);
  font-family: var(--rv-instafeed-font);
  width: 100%;
  padding: 12px 10px 24px;
  box-sizing: border-box;
}

.rv-instafeed-page-wrapper *,
.rv-instafeed-page-wrapper *::before,
.rv-instafeed-page-wrapper *::after {
  box-sizing: border-box;
}

.rv-instafeed-app-layout {
  display: flex;
  justify-content: center;
  gap: 14px;
  max-width: 1680px;
  margin: 0 auto;
}

.rv-instafeed-main-content {
  display: flex;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

.rv-instafeed-feed-column {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

/* ==========================================================================
   CATEGORIES: STORY STYLE ON BIG SCREENS, SIMPLE LIST ON SMALL SCREENS
   ========================================================================== */

/* Big screens (>= 992px): Sticky on left with authentic Story style */
@media (min-width: 992px) {
  .rv-instafeed-categories-sidebar {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 32px;
    height: fit-content;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    scrollbar-width: thin;
    padding: 18px 14px;
    background-color: var(--rv-instafeed-card-bg);
    border: 1px solid var(--rv-instafeed-border);
    border-radius: var(--rv-instafeed-radius);
    box-shadow: var(--rv-instafeed-shadow);
  }

  .rv-instafeed-categories-header {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rv-instafeed-border);
  }

  .rv-instafeed-categories-heading {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--rv-instafeed-secondary-text);
  }

  .rv-instafeed-categories-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .rv-instafeed-category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 8px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--rv-instafeed-text);
    transition: background-color 0.15s ease;
  }

  .rv-instafeed-category-item:hover {
    background-color: rgba(0, 0, 0, 0.04);
  }

  .rv-instafeed-theme-dark .rv-instafeed-category-item:hover {
    background-color: rgba(255, 255, 255, 0.06);
  }

  .rv-instafeed-category-item.active-category {
    background-color: rgba(0, 149, 246, 0.08);
    font-weight: 600;
    color: var(--rv-instafeed-accent);
  }

  /* Authentic Story Style with gradient ring on big screens */
  .rv-instafeed-category-ring {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    padding: 2.5px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .rv-instafeed-category-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--rv-instafeed-card-bg);
    border: 2px solid var(--rv-instafeed-card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--rv-instafeed-accent);
  }

  .rv-instafeed-category-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .rv-instafeed-category-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rv-instafeed-category-count {
    font-size: 11px;
    color: var(--rv-instafeed-secondary-text);
    line-height: 14px;
  }

  .rv-instafeed-categories-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--rv-instafeed-border);
    font-size: 11px;
    color: var(--rv-instafeed-secondary-text);
    line-height: 16px;
  }

  .rv-instafeed-categories-footer p {
    margin: 0;
  }
}

/* Small screens (< 992px): Show as clean simple list with NO alphabetical categorization */
@media (max-width: 991px) {
  .rv-instafeed-main-content {
    flex-direction: column;
    gap: 12px;
  }

  .rv-instafeed-categories-sidebar {
    width: 100%;
    position: static;
    max-height: none;
    padding: 8px 10px;
    background-color: var(--rv-instafeed-card-bg);
    border: 1px solid var(--rv-instafeed-border);
    border-radius: var(--rv-instafeed-radius);
    box-shadow: var(--rv-instafeed-shadow);
  }

  .rv-instafeed-categories-header {
    padding-bottom: 6px;
    border-bottom: 1px solid var(--rv-instafeed-border);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .rv-instafeed-categories-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--rv-instafeed-secondary-text);
  }

  /* Natural un-alphabetized list on small screens - Touch-scrollable & swipable on mobile phone */
  .rv-instafeed-categories-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2px 2px 4px;
    cursor: grab;
    user-select: none;
  }

  .rv-instafeed-categories-list::-webkit-scrollbar {
    display: none;
  }

  .rv-instafeed-categories-list:active {
    cursor: grabbing;
  }

  .rv-instafeed-category-item {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background-color: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: var(--rv-instafeed-text);
    font-size: 13px;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }

  .rv-instafeed-theme-dark .rv-instafeed-category-item {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .rv-instafeed-category-item:hover {
    background-color: rgba(0, 0, 0, 0.08);
  }

  .rv-instafeed-theme-dark .rv-instafeed-category-item:hover {
    background-color: rgba(255, 255, 255, 0.12);
  }

  .rv-instafeed-category-item.active-category {
    font-weight: 600;
    color: #ffffff !important;
    background-color: var(--rv-instafeed-accent) !important;
    border-color: var(--rv-instafeed-accent) !important;
  }

  /* No story rings on small screens */
  .rv-instafeed-category-ring {
    display: none;
  }

  .rv-instafeed-category-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .rv-instafeed-category-name {
    font-size: 12px;
    font-weight: 500;
  }

  .rv-instafeed-category-count {
    font-size: 11px;
    color: var(--rv-instafeed-secondary-text);
    background-color: rgba(0, 0, 0, 0.06);
    padding: 1px 6px;
    border-radius: 10px;
  }

  .rv-instafeed-category-item.active-category .rv-instafeed-category-count {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.25);
  }

  .rv-instafeed-theme-dark .rv-instafeed-category-count {
    background-color: rgba(255, 255, 255, 0.12);
  }

  .rv-instafeed-categories-footer {
    display: none;
  }
}

/* ==========================================================================
   FEED CARDS - RESPONSIVE 3-COLUMN & WIDE SCREEN GRID
   ========================================================================== */

.rv-instafeed-timeline-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
  align-items: stretch;
}

/* 2 columns on tablet */
@media (min-width: 680px) {
  .rv-instafeed-timeline-layout {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 3 columns on standard desktop */
@media (min-width: 1024px) {
  .rv-instafeed-timeline-layout {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 4 columns on large screens */
@media (min-width: 1440px) {
  .rv-instafeed-timeline-layout {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 5 columns on extra large monitors */
@media (min-width: 1800px) {
  .rv-instafeed-timeline-layout {
    grid-template-columns: repeat(5, 1fr);
  }
}

.rv-instafeed-card {
  width: 100%;
  max-width: 100%;
  height: 100%;
  background-color: var(--rv-instafeed-card-bg);
  border: 1px solid var(--rv-instafeed-border);
  border-radius: var(--rv-instafeed-radius);
  box-shadow: var(--rv-instafeed-shadow);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.rv-instafeed-hidden {
  display: none !important;
}

/* Header */
.rv-instafeed-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
}

.rv-instafeed-author-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--rv-instafeed-text);
  overflow: hidden;
}

.rv-instafeed-avatar-frame {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rv-instafeed-story-ring-active {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  padding: 2px;
}

.rv-instafeed-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--rv-instafeed-card-bg);
  border: 2px solid var(--rv-instafeed-card-bg);
  display: block;
}

.rv-instafeed-author-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rv-instafeed-author-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  color: var(--rv-instafeed-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rv-instafeed-category-tag {
  font-size: 11px;
  color: var(--rv-instafeed-secondary-text);
  line-height: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rv-instafeed-options-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--rv-instafeed-text);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.rv-instafeed-options-btn:hover {
  opacity: 0.6;
}

/* Media Section - Full Uncropped View with Uniform Grid Frame */
.rv-instafeed-media-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Feed cards: Uniform 1:1 square frame so all cards in the multi-column grid align */
.rv-instafeed-card:not(.rv-instafeed-single-post-card) .rv-instafeed-media-wrapper {
  aspect-ratio: 1 / 1;
  height: auto;
}

.rv-instafeed-media-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  cursor: pointer;
}

.rv-instafeed-card:not(.rv-instafeed-single-post-card) .rv-instafeed-media-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Single post page: Natural uncropped view without 1:1 restriction */
.rv-instafeed-single-post-card .rv-instafeed-media-wrapper {
  aspect-ratio: auto;
  height: auto;
}

.rv-instafeed-single-post-card .rv-instafeed-media-image {
  width: 100%;
  height: auto;
  max-height: 700px;
  object-fit: contain;
  display: block;
}

.rv-instafeed-media-fallback {
  width: 100%;
  height: 100%;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background: linear-gradient(135deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
  color: #ffffff;
}

.rv-instafeed-media-fallback h3 {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

/* Double tap heart pop */
.rv-instafeed-heart-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 80px;
  height: 80px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffffff"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
  pointer-events: none;
  animation: rvHeartPopKeyframes 0.85s ease-out forwards;
}

@keyframes rvHeartPopKeyframes {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  35% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
  60% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0; }
}

/* Action Bar */
.rv-instafeed-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 2px;
}

.rv-instafeed-action-group-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rv-instafeed-action-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--rv-instafeed-text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.rv-instafeed-action-btn:hover {
  opacity: 0.7;
}

.rv-instafeed-action-btn:active {
  transform: scale(0.9);
}

.rv-instafeed-action-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.rv-instafeed-btn-like.active-liked {
  color: var(--rv-instafeed-like);
}

.rv-instafeed-btn-like.active-liked svg {
  fill: var(--rv-instafeed-like);
}

/* Likes */
.rv-instafeed-likes-section {
  padding: 1px 10px 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rv-instafeed-text);
}

/* Caption Block - 30 characters shrinked by default with text toggle link */
.rv-instafeed-caption-block {
  padding: 0 10px 4px;
  font-size: 14px;
  line-height: 20px;
  color: var(--rv-instafeed-text);
  word-break: break-word;
}

.rv-instafeed-caption-author {
  font-weight: 600;
  margin-right: 6px;
  text-decoration: none;
  color: var(--rv-instafeed-text);
  display: inline;
}

.rv-instafeed-caption-short,
.rv-instafeed-caption-full {
  display: inline;
  color: var(--rv-instafeed-text);
}

.rv-instafeed-caption-full a,
.rv-instafeed-single-prose a {
  color: var(--rv-instafeed-accent);
  text-decoration: underline;
  cursor: pointer;
  position: relative;
  z-index: 2;
  word-break: break-word;
}

.rv-instafeed-caption-full a:hover,
.rv-instafeed-single-prose a:hover {
  opacity: 0.8;
}

/* Pure text link - NOT appearing like a button */
.rv-instafeed-caption-toggle-link {
  color: var(--rv-instafeed-secondary-text);
  font-size: 13px;
  line-height: inherit;
  cursor: pointer;
  font-weight: 500;
  margin-left: 4px;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  display: inline !important;
  text-decoration: none;
  user-select: none;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.rv-instafeed-caption-toggle-link:hover,
.rv-instafeed-caption-toggle-link:focus {
  color: var(--rv-instafeed-text);
  text-decoration: underline;
  outline: none;
}

/* Comments Section on Feed */
.rv-instafeed-comments-section {
  padding: 2px 10px 4px;
}

.rv-instafeed-comments-link {
  font-size: 13px;
  color: var(--rv-instafeed-secondary-text);
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
}

.rv-instafeed-comments-link:hover {
  text-decoration: underline;
}

.rv-instafeed-comments-preview-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rv-instafeed-feed-comment-row {
  font-size: 13px;
  line-height: 18px;
}

.rv-instafeed-comment-username {
  font-weight: 600;
  margin-right: 6px;
  color: var(--rv-instafeed-text);
}

.rv-instafeed-comment-text {
  color: var(--rv-instafeed-text);
  word-break: break-word;
}

.rv-instafeed-comment-text a {
  color: var(--rv-instafeed-accent);
  text-decoration: underline;
}

/* Timestamp */
.rv-instafeed-timestamp {
  padding: 2px 10px 6px;
  font-size: 10px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  margin-top: auto;
}

.rv-instafeed-timestamp a {
  color: var(--rv-instafeed-secondary-text);
  text-decoration: none;
}

.rv-instafeed-timestamp a:hover {
  text-decoration: underline;
}

/* Inline Comment Form on Feed & Single */
.rv-instafeed-card:not(.rv-instafeed-single-post-card) .rv-instafeed-comment-input-form {
  display: none;
  animation: rvFadeInComment 0.2s ease-out;
}

.rv-instafeed-card:not(.rv-instafeed-single-post-card) .rv-instafeed-comment-input-form.is-active {
  display: flex;
}

@keyframes rvFadeInComment {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rv-instafeed-single-post-card .rv-instafeed-comment-input-form {
  display: flex;
}

.rv-instafeed-comment-input-form {
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-top: 1px solid var(--rv-instafeed-border);
  background-color: var(--rv-instafeed-card-bg);
  transition: background-color 0.2s ease;
}

.rv-instafeed-comment-input-form:focus-within {
  background-color: rgba(0, 0, 0, 0.02);
}

.rv-instafeed-theme-dark .rv-instafeed-comment-input-form:focus-within {
  background-color: rgba(255, 255, 255, 0.03);
}

.rv-instafeed-comment-icon-prefix {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rv-instafeed-secondary-text);
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.rv-instafeed-comment-icon-prefix svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.rv-instafeed-comment-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 13px;
  line-height: 18px;
  color: var(--rv-instafeed-text);
  padding: 4px 0 !important;
  margin: 0 !important;
  font-family: inherit;
}

.rv-instafeed-comment-input::placeholder {
  color: var(--rv-instafeed-secondary-text);
}

.rv-instafeed-comment-submit-btn {
  background: none;
  border: none;
  color: var(--rv-instafeed-accent);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  flex-shrink: 0;
  border-radius: 4px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.rv-instafeed-comment-submit-btn:hover {
  opacity: 0.8;
  transform: scale(1.04);
}

/* ==========================================================================
   INDIVIDUAL POST PAGE - POLISHED, ELEGANT, UNCLUTTERED
   ========================================================================== */

.rv-instafeed-single-main {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.rv-instafeed-single-post-card {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  border: 1px solid var(--rv-instafeed-border);
  border-radius: 12px;
  background-color: var(--rv-instafeed-card-bg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.rv-instafeed-single-content-body {
  padding: 20px 24px 16px;
}

.rv-instafeed-single-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 16px;
  color: var(--rv-instafeed-text);
  letter-spacing: -0.3px;
}

.rv-instafeed-single-prose {
  font-size: 16px;
  line-height: 1.8;
  color: var(--rv-instafeed-text);
}

.rv-instafeed-single-prose p {
  margin: 0 0 18px;
}

.rv-instafeed-single-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.rv-instafeed-single-comments-section {
  padding: 20px 24px;
  border-top: 1px solid var(--rv-instafeed-border);
  background-color: rgba(0, 0, 0, 0.01);
}

.rv-instafeed-comments-heading {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--rv-instafeed-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.rv-instafeed-comment-count-badge {
  background-color: var(--rv-instafeed-border);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
}

.rv-instafeed-comments-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.rv-instafeed-comment-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 20px;
}

.rv-instafeed-comment-avatar img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.rv-instafeed-comment-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.rv-instafeed-comment-meta {
  font-size: 11px;
  color: var(--rv-instafeed-secondary-text);
}

/* ==========================================================================
   INFINITE SCROLL LOADER & ALL CAUGHT UP
   ========================================================================== */

.rv-instafeed-infinite-sentinel {
  width: 100%;
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: 1 / -1;
  cursor: pointer;
}

.rv-instafeed-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--rv-instafeed-accent);
  border-radius: 50%;
  animation: rvSpinnerSpin 0.75s linear infinite;
}

.rv-instafeed-theme-dark .rv-instafeed-spinner {
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--rv-instafeed-accent);
}

@keyframes rvSpinnerSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.rv-instafeed-caught-up-banner {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  text-align: center;
  color: var(--rv-instafeed-secondary-text);
}

.rv-instafeed-caught-up-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--rv-instafeed-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.rv-instafeed-caught-up-icon svg {
  width: 26px;
  height: 26px;
  fill: var(--rv-instafeed-accent);
}

.rv-instafeed-caught-up-banner h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--rv-instafeed-text);
}

/* Options Modal Dialog */
.rv-instafeed-options-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.65);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.rv-instafeed-options-dialog {
  background-color: var(--rv-instafeed-card-bg);
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.rv-instafeed-option-btn {
  background: none;
  border: none;
  border-bottom: 1px solid var(--rv-instafeed-border);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--rv-instafeed-text);
  cursor: pointer;
  text-align: center;
  font-weight: 500;
  transition: background-color 0.15s ease;
}

.rv-instafeed-option-btn:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.rv-instafeed-option-btn.action-highlight {
  color: var(--rv-instafeed-accent);
  font-weight: 700;
}

.rv-instafeed-option-btn.action-cancel {
  border-bottom: none;
  color: var(--rv-instafeed-secondary-text);
}

/* Toast */
.rv-instafeed-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: rgba(38, 38, 38, 0.95);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100001;
  pointer-events: none;
}

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

/* ==========================================================================
   INSTAGRAM PROFILE PAGE HEADER
   ========================================================================== */

.rv-instafeed-profile-header {
  display: flex;
  align-items: flex-start;
  gap: 48px;
  padding: 24px;
  background-color: var(--rv-instafeed-card-bg);
  border: 1px solid var(--rv-instafeed-border);
  border-radius: var(--rv-instafeed-radius);
  box-shadow: var(--rv-instafeed-shadow);
  margin-bottom: 20px;
}

.rv-instafeed-profile-avatar-col {
  flex-shrink: 0;
}

.rv-instafeed-profile-avatar-ring {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  padding: 3px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rv-instafeed-profile-avatar-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--rv-instafeed-card-bg);
  border: 3px solid var(--rv-instafeed-card-bg);
  display: block;
}

.rv-instafeed-profile-content-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.rv-instafeed-profile-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.rv-instafeed-profile-username {
  font-size: 20px;
  font-weight: 600;
  color: var(--rv-instafeed-text);
  margin: 0;
  line-height: 1.2;
}

.rv-instafeed-verified-badge {
  display: inline-flex;
  align-items: center;
  color: var(--rv-instafeed-accent);
  width: 18px;
  height: 18px;
}

.rv-instafeed-verified-badge svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.rv-instafeed-profile-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.rv-instafeed-profile-btn {
  background-color: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--rv-instafeed-border);
  color: var(--rv-instafeed-text);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.rv-instafeed-profile-btn:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.rv-instafeed-theme-dark .rv-instafeed-profile-btn {
  background-color: rgba(255, 255, 255, 0.1);
}

.rv-instafeed-theme-dark .rv-instafeed-profile-btn:hover {
  background-color: rgba(255, 255, 255, 0.16);
}

.rv-instafeed-profile-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
  color: var(--rv-instafeed-text);
}

.rv-instafeed-profile-stats strong {
  font-weight: 600;
}

.rv-instafeed-profile-bio-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  line-height: 20px;
}

.rv-instafeed-profile-fullname {
  font-weight: 600;
  color: var(--rv-instafeed-text);
}

.rv-instafeed-profile-biotext {
  color: var(--rv-instafeed-text);
  word-break: break-word;
}

.rv-instafeed-profile-weblink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--rv-instafeed-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  margin-top: 4px;
}

.rv-instafeed-profile-weblink:hover {
  text-decoration: underline;
}

.rv-instafeed-profile-weblink svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.rv-instafeed-profile-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--rv-instafeed-border);
  margin-bottom: 24px;
}

.rv-instafeed-profile-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--rv-instafeed-secondary-text);
  text-transform: uppercase;
  border-top: 1px solid transparent;
  margin-top: -1px;
  cursor: default;
}

.rv-instafeed-profile-tab.active-tab {
  color: var(--rv-instafeed-text);
  border-top-color: var(--rv-instafeed-text);
}

.rv-instafeed-profile-tab svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

@media (max-width: 680px) {
  .rv-instafeed-profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 16px;
  }
  .rv-instafeed-profile-content-col {
    align-items: center;
  }
  .rv-instafeed-profile-title-row {
    justify-content: center;
  }
  .rv-instafeed-profile-actions {
    margin-left: 0;
  }
  .rv-instafeed-profile-stats {
    justify-content: center;
    gap: 18px;
  }
}

/* Responsive */
@media (max-width: 1100px) {
  .rv-instafeed-right-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .rv-instafeed-page-wrapper {
    padding: 12px 8px 24px;
  }
  .rv-instafeed-card {
    border-radius: 8px;
  }
  .rv-instafeed-single-post-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}


/* Picasa Photo Viewer Lightbox - Iconic Proportional Sizing & Refined Styling */
.rv-instafeed-picasa-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background-color: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  user-select: none;
  animation: rvPicasaFadeIn 0.2s ease-out;
  overflow: hidden;
}

@keyframes rvPicasaFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Top Bar: Sleek 50px translucent gradient bar */
.rv-instafeed-picasa-topbar {
  height: 50px;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 30;
}

.rv-instafeed-picasa-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 120px);
  overflow: hidden;
}

.rv-instafeed-picasa-title {
  color: #f3f4f6;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}

.rv-instafeed-picasa-counter {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 9px;
  border-radius: 12px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.rv-instafeed-picasa-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}

.rv-instafeed-picasa-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

.rv-instafeed-picasa-close-btn:active {
  transform: scale(0.95);
}

/* Viewport Area: Image fills the entire viewport space */
.rv-instafeed-picasa-viewport {
  flex: 1;
  position: relative;
  width: 100%;
  height: calc(100vh - 50px);
  overflow: hidden;
  display: block;
}

/* Image wrapper fills 100% of viewport without being squeezed by buttons */
.rv-instafeed-picasa-img-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px 80px;
  box-sizing: border-box;
  overflow: hidden;
}

.rv-instafeed-picasa-img-wrapper.is-zoomed {
  overflow: auto;
  cursor: grab;
}

.rv-instafeed-picasa-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: rvPicasaZoom 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.rv-instafeed-picasa-img-wrapper.is-zoomed .rv-instafeed-picasa-img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
  transform: scale(1.4);
}

@keyframes rvPicasaZoom {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Side Navigation Arrows: Float DIRECTLY OVER the image without stealing horizontal layout space */
.rv-instafeed-picasa-nav-btn {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: rgba(18, 18, 18, 0.65) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease !important;
  z-index: 50 !important;
  user-select: none !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

.rv-instafeed-picasa-nav-btn.rv-instafeed-picasa-prev {
  left: 20px !important;
}

.rv-instafeed-picasa-nav-btn.rv-instafeed-picasa-next {
  right: 20px !important;
}

.rv-instafeed-picasa-nav-btn:hover {
  background: rgba(36, 36, 36, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  transform: translateY(-50%) scale(1.1) !important;
}

.rv-instafeed-picasa-nav-btn:active {
  transform: translateY(-50%) scale(0.96) !important;
}

/* Bottom Floating Pill Toolbar */
.rv-instafeed-picasa-toolbar {
  position: absolute !important;
  bottom: 22px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  height: 46px !important;
  border-radius: 23px !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: rgba(22, 22, 22, 0.9) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  z-index: 60 !important;
}

.rv-instafeed-picasa-tool-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.rv-instafeed-picasa-tool-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: scale(1.08);
}

.rv-instafeed-picasa-tool-btn:active {
  transform: scale(0.95);
}

.rv-instafeed-picasa-tool-divider {
  width: 1px;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.18);
  margin: 0 4px;
}

/* Bulletproof click & touch targets for all Picasa buttons */
.rv-instafeed-picasa-nav-btn,
.rv-instafeed-picasa-tool-btn,
.rv-instafeed-picasa-close-btn {
  cursor: pointer !important;
  touch-action: manipulation !important;
}

.rv-instafeed-picasa-nav-btn svg,
.rv-instafeed-picasa-tool-btn svg,
.rv-instafeed-picasa-close-btn svg {
  pointer-events: none !important;
}

/* Mobile responsive adjustments for Picasa Viewer */
@media (max-width: 768px) {
  .rv-instafeed-picasa-topbar {
    height: 46px !important;
    padding: 0 12px !important;
  }

  .rv-instafeed-picasa-meta {
    max-width: calc(100vw - 70px) !important;
  }

  .rv-instafeed-picasa-title {
    font-size: 13px !important;
  }

  /* Full screen width on mobile phones with zero side padding */
  .rv-instafeed-picasa-viewport {
    height: calc(100vh - 46px) !important;
  }

  .rv-instafeed-picasa-img-wrapper {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 4px 0 66px 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Image takes 100% of mobile screen width */
  .rv-instafeed-picasa-img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100vw !important;
    max-height: calc(100vh - 116px) !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important;
  }

  /* Left and right buttons float directly ON TOP of the image edges */
  .rv-instafeed-picasa-nav-btn {
    width: 42px !important;
    height: 42px !important;
    background: rgba(12, 12, 12, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7) !important;
  }

  .rv-instafeed-picasa-nav-btn.rv-instafeed-picasa-prev {
    left: 8px !important;
  }

  .rv-instafeed-picasa-nav-btn.rv-instafeed-picasa-next {
    right: 8px !important;
  }

  .rv-instafeed-picasa-toolbar {
    bottom: 12px !important;
    height: 40px !important;
    padding: 0 10px !important;
  }

  .rv-instafeed-picasa-tool-btn {
    width: 32px !important;
    height: 32px !important;
  }
}
