/* Instagram Platform Specific Styles */
.social-post[data-platform="instagram"] {
  border-left-color: var(--instagram-pink);
}

.social-post[data-platform="instagram"] .social-post-platform {
  color: var(--instagram-pink);
}

.social-post[data-platform="instagram"] .platform-icon {
  background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4);
  border-radius: 4px;
}

/* Instagram Post Container */
.instagram-post-container {
  background: var(--gray-10);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.instagram-post-container:hover {
  box-shadow: 0 4px 16px rgba(228, 64, 95, 0.1);
}

/* Instagram Post Header */
.instagram-post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.instagram-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.instagram-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4);
  padding: 2px;
}

.instagram-user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.instagram-user-details {
  flex: 1;
}

.instagram-username {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}

.instagram-location {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin: 0;
}

.instagram-post-time {
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* Instagram Post Media */
.instagram-post-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--video-player-bg);
}

.instagram-post-media img,
.instagram-post-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Instagram Carousel */
.instagram-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
}

.instagram-carousel-container {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.instagram-carousel-item {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.instagram-carousel-item img,
.instagram-carousel-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.instagram-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  width: 100%;
  pointer-events: none;
}

.instagram-carousel-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: all;
  margin: 0 1rem;
}

.instagram-carousel-btn:hover {
  background: var(--gray-1);
  transform: scale(1.1);
}

.instagram-carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.instagram-carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s ease;
}

.instagram-carousel-indicator.active {
  background: var(--gray-1);
}

/* Instagram Video Play Button */
.instagram-video-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.instagram-video-play-button:hover {
  background: var(--gray-1);
  transform: translate(-50%, -50%) scale(1.1);
}

.instagram-video-play-button::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 18px solid #E4405F;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  margin-left: 4px;
}

/* Instagram Post Content */
.instagram-post-content {
  padding: 1rem;
}

.instagram-post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.instagram-action-buttons {
  display: flex;
  gap: 1rem;
}

.instagram-action-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
  color: var(--primary-color);
}

.instagram-action-button:hover {
  transform: scale(1.1);
}

.instagram-action-button.liked {
  color: #E4405F;
}

.instagram-likes {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.instagram-caption {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.instagram-caption .username {
  font-weight: 600;
  margin-right: 0.5rem;
}

.instagram-caption .hashtag {
  color: #E4405F;
  font-weight: 500;
}

.instagram-caption .mention {
  color: #E4405F;
  font-weight: 500;
}

.instagram-view-comments {
  font-size: 0.85rem;
  color: var(--gray-600);
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.instagram-view-comments:hover {
  color: var(--primary-color);
}

/* Instagram Stories */
.instagram-stories-container {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.instagram-stories-container::-webkit-scrollbar {
  display: none;
}

.instagram-story {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.instagram-story-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4);
  padding: 2px;
  transition: transform 0.3s ease;
}

.instagram-story:hover .instagram-story-avatar {
  transform: scale(1.05);
}

.instagram-story-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.instagram-story-username {
  font-size: 0.75rem;
  color: var(--primary-color);
  text-align: center;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Instagram Reels */
.instagram-reel-container {
  position: relative;
  aspect-ratio: 9/16;
  max-width: 350px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: var(--video-player-bg);
}

.instagram-reel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 60%,
    rgba(0, 0, 0, 0.3) 80%,
    rgba(0, 0, 0, 0.6) 100%
  );
  pointer-events: none;
}

.instagram-reel-info {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 4rem;
  color: var(--gray-1);
  z-index: 2;
}

.instagram-reel-caption {
  font-size: 0.85rem;
  line-height: 1.3;
  color: var(--gray-1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  margin-bottom: 0.5rem;
}

.instagram-reel-music {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--gray-1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.instagram-reel-music-icon {
  width: 16px;
  height: 16px;
}

/* Responsive Design for Instagram */
@media (max-width: 768px) {
  .instagram-post-container {
    border-radius: 8px;
  }
  
  .instagram-post-header {
    padding: 0.75rem;
  }
  
  .instagram-user-avatar {
    width: 36px;
    height: 36px;
  }
  
  .instagram-username {
    font-size: 0.9rem;
  }
  
  .instagram-location {
    font-size: 0.75rem;
  }
  
  .instagram-post-content {
    padding: 0.75rem;
  }
  
  .instagram-post-text {
    font-size: 0.9rem;
  }
  
  .instagram-post-stats {
    padding: 0.75rem;
    gap: 1rem;
  }
  
  .instagram-stat {
    font-size: 0.8rem;
  }
  
  .instagram-carousel-btn {
    width: 36px;
    height: 36px;
  }
  
  .instagram-video-play-button {
    width: 60px;
    height: 60px;
  }
  
  .instagram-story-avatar {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 480px) {
  .instagram-post-header {
    padding: 0.5rem;
  }
  
  .instagram-user-info {
    gap: 0.5rem;
  }
  
  .instagram-user-avatar {
    width: 32px;
    height: 32px;
  }
  
  .instagram-username {
    font-size: 0.85rem;
  }
  
  .instagram-location {
    font-size: 0.7rem;
  }
  
  .instagram-post-time {
    font-size: 0.75rem;
  }
  
  .instagram-post-content {
    padding: 0.5rem;
  }
  
  .instagram-action-buttons {
    gap: 0.75rem;
  }
  
  .instagram-action-button {
    font-size: 1.2rem;
  }
  
  .instagram-likes {
    font-size: 0.85rem;
  }
  
  .instagram-caption {
    font-size: 0.85rem;
  }
  
  .instagram-view-comments {
    font-size: 0.8rem;
  }
  
  .instagram-carousel-btn {
    width: 32px;
    height: 32px;
    margin: 0 0.5rem;
  }
  
  .instagram-video-play-button {
    width: 50px;
    height: 50px;
  }
  
  .instagram-video-play-button::before {
    border-left: 14px solid #E4405F;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
  }
  
  .instagram-reel-container {
    max-width: 280px;
  }
  
  .instagram-reel-info {
    bottom: 0.75rem;
    left: 0.75rem;
    right: 3.5rem;
  }
  
  .instagram-reel-caption {
    font-size: 0.8rem;
  }
  
  .instagram-reel-music {
    font-size: 0.75rem;
  }
  
  .instagram-story-avatar {
    width: 52px;
    height: 52px;
  }
  
  .instagram-story-username {
    font-size: 0.7rem;
    max-width: 60px;
  }
}
