.instagram-feed-container {
    padding: 4px;
    background: #eef8ff;
    border-radius: 8px;
}

/* Instagram reels grid */
.instagram-reels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 reels per row on desktop */
    gap: 5px;
    margin-top: 10px;
}

/* Instagram reel styling */
.instagram-reel {
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Selected reel styling */
#feed-results .instagram-reel {
    border: 8px solid transparent;
    border-radius: 3px;
    height: auto;
    display: block;
    position: relative;
}

#feed-results .instagram-reel.selected {
    border-color: #0095f6;
    border-radius: 12px;
}

/* Checkmark with ribbon styling */
#feed-results .instagram-reel.selected::before {
    content: "✓";
    position: absolute;
    top: -7px;
    left: -7px;
    width: 40px;
    height: 40px;
    background-color: #0095f6;
    border-radius: 10px;
    z-index: 1;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Reel image container */
.reel-image {
    border-radius: 5px;
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Create a square aspect ratio */
    overflow: hidden;
}

/* Reel image */
.reel-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the square container */
    display: block;
}

/* Reel likes overlay with grey background */
.reel-plays {
    position: absolute;
    bottom: 83px;
    right: 8px;
    color: white;
    font-weight: bold;
    font-size: 13px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    z-index: 2;
    background-color: rgba(0,0,0,0.5);
    padding: 2px 6px;
    border-radius: 4px;
}

.reel-likes {
    position: absolute;
    bottom: 57px;
    right: 8px;
    color: white;
    font-weight: bold;
    font-size: 13px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    z-index: 2;
    background-color: rgba(0,0,0,0.5);
    padding: 2px 6px;
    border-radius: 4px;
}

.reel-comments {
    position: absolute;
    bottom: 31px;
    right: 8px;
    color: white;
    font-weight: bold;
    font-size: 13px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    z-index: 2;
    background-color: rgba(0,0,0,0.5);
    padding: 2px 6px;
    border-radius: 4px;
}

.reel-reshares {
    position: absolute;
    bottom: 5px;
    right: 8px;
    color: white;
    font-weight: bold;
    font-size: 13px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    z-index: 2;
    background-color: rgba(0,0,0,0.5);
    padding: 2px 6px;
    border-radius: 4px;
}

.play-icon,
.like-icon,
.comment-icon,
.reshare-icon {
    color: white;
    margin-right: 3px;
}

/* Legacy styles for backward compatibility */
.reel-info {
    padding: 10px;
    font-size: inherit; /* Use website default font size */
    background: #fff;
    flex-grow: 1; /* Fill remaining space */
    display: flex;
    align-items: center;
}

.like-count {
    font-size: inherit; /* Use website default font size */
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .instagram-reels-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 reels per row on mobile */
    }
}

/* Profile display */
.instagram-profile {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.instagram-profile img {
    margin-right: 10px;
}

/* Alert styling */
.alert {
    padding: 10px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    margin: 10px 0;
}

/* Reel variations styling */
.reel-variations {
    padding-top: 5px;
    background: #eef8ff;
    border-top: 1px solid #eee;
}

.reel-variation-select {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 0px !important;
}

/* Load More button styling */
#load-more-container {
    margin: 20px 0;
    width: 100%;
}

#load-more-reels {
    background-color: #006EB5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    width: 100%;
}

#load-more-reels:hover {
    background-color: #005A94;
}

#load-more-reels.loading {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Toggle Button Styles */
.instagram-toggle-buttons {
    margin: 15px 0;
}

.toggle-button-group {
    display: flex;
    margin-bottom: 5px;
}

.toggle-button {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    cursor: pointer;
    flex: 1;
    text-align: center;
}

.toggle-button:first-child {
    border-radius: 4px 0 0 4px;
}

.toggle-button:last-child {
    border-radius: 0 4px 4px 0;
}

.toggle-button.active {
    background: #ff768e; /* Instagram blue color */
    color: white;
    border-color: #ff768e;
}

.toggle-description {
    font-size: 12px;
    color: #666;
    font-style: italic;
}