/* 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;
}

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

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

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

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

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

/* Checkmark with ribbon styling */
#feed-results .instagram-post.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;
}

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

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

/* Likes overlay with grey background */
.post-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;
}

.post-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;
}

.post-shares {
    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;
}

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

/* Legacy styles for backward compatibility */
.post-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-posts-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 posts 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;
}

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

.post-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-posts {
    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-posts:hover {
    background-color: #005A94;
}

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