/**
 * BMM Instagram Feed Styles
 * 
 * CSS for styling the Instagram feed display
 */

/* Container */
.bmm-instagram-feed {
    padding: 0;
}

/* Grid layout */
.bmm-instagram-feed .instagram-grid {
    display: flex;
    flex-wrap: wrap;
    margin: -5px;
}

/* Individual post item */
.bmm-instagram-feed .instagram-item {
    position: relative;
    box-sizing: border-box;
    aspect-ratio: 1/1;
    /* Square aspect ratio */
    overflow: hidden;
}

/* Column layouts - default is 3 columns */
.bmm-instagram-feed .columns-1 .instagram-item {
    width: 100%;
}

.bmm-instagram-feed .columns-2 .instagram-item {
    width: 50%;
}

.bmm-instagram-feed .columns-3 .instagram-item {
    width: 33.33%;
}

.bmm-instagram-feed .columns-4 .instagram-item {
    width: 25%;
}

.bmm-instagram-feed .columns-5 .instagram-item {
    width: 20%;
}

.bmm-instagram-feed .columns-6 .instagram-item {
    width: 16.66%;
}

/* Images */
.bmm-instagram-feed .instagram-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* Image hover effect */
.bmm-instagram-feed .instagram-item a {
    display: block;
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.bmm-instagram-feed .instagram-item a:hover img {
    transform: scale(1.05);
}

/* Instagram icon overlay */
.bmm-instagram-feed .instagram-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    fill: #fff;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
    opacity: 0.8;
    z-index: 2;
    pointer-events: none;
}

/* Hover overlay effect */
.bmm-instagram-feed .instagram-item a:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.bmm-instagram-feed .instagram-item a:hover:before {
    opacity: 1;
}

/* Empty feed message */
.bmm-instagram-feed .bmm-instagram-empty {
    padding: 20px;
    text-align: center;
    background-color: #f8f8f8;
    border: 1px solid #eee;
    color: #666;
    margin: 10px 0;
}

/* Loading state */
.bmm-instagram-feed.is-loading {
    position: relative;
    min-height: 200px;
}

.bmm-instagram-feed.is-loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: #333;
    border-radius: 50%;
    animation: bmm-instagram-spin 1s linear infinite;
}

@keyframes bmm-instagram-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Video post indicator */
.bmm-instagram-feed .instagram-item.is-video:after {
    content: "\f236";
    font-family: dashicons;
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 24px;
    color: #fff;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* Responsive */
@media (max-width: 768px) {
    .bmm-instagram-feed .instagram-item {
        width: 50%;
    }
}

@media (max-width: 480px) {
    .bmm-instagram-feed .instagram-item {
        width: 100%;
    }
}