/**
 * Frontend Styles for My Instagram Feed Pro
 */

.myigf-feed-wrapper {
    width: 100%;
    margin: 0 auto;
}

.myigf-feed-container {
    width: 100%;
}

.myigf-feed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 0;
    padding: 0;
}

.myigf-feed-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.myigf-feed-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.myigf-feed-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.myigf-feed-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
}

.myigf-media-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.myigf-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 1;
}

.myigf-feed-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    padding: 15px 10px 10px;
    font-size: 12px;
    line-height: 1.4;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.myigf-feed-item:hover .myigf-feed-caption {
    opacity: 1;
}

/* Load More Button */
.myigf-load-more-wrapper {
    text-align: center;
    margin-top: 30px;
}

.myigf-load-more-btn {
    background: #405de6;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.myigf-load-more-btn:hover {
    background: #5851db;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(64, 93, 230, 0.3);
}

.myigf-load-more-btn:active {
    transform: translateY(0);
}

.myigf-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.myigf-loading {
    display: inline-block;
    margin-left: 10px;
    color: #666;
}

/* Lightbox Styles */
.myigf-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.myigf-lightbox.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.myigf-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.myigf-lightbox-media {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.myigf-lightbox-media img,
.myigf-lightbox-media video {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    display: block;
}

.myigf-lightbox-caption {
    color: #fff;
    text-align: center;
    margin-top: 20px;
    padding: 0 20px;
    max-width: 600px;
    font-size: 14px;
    line-height: 1.6;
}

.myigf-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000000;
}

.myigf-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.myigf-lightbox-link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #405de6;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.myigf-lightbox-link:hover {
    background: #5851db;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .myigf-feed-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .myigf-lightbox-content {
        max-width: 95%;
    }

    .myigf-lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .myigf-feed-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .myigf-feed-caption {
        font-size: 11px;
        padding: 10px 8px 8px;
    }

    .myigf-lightbox-caption {
        font-size: 12px;
        margin-top: 15px;
    }
}

