/**
 * InstaFeed Pro Lite - Frontend Styles
 */

.instafeed-container {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

/* Grid Layout */
.instafeed-layout-grid {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .instafeed-layout-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .instafeed-layout-grid {
        grid-template-columns: 1fr;
    }
}

/* Item Styling */
.instafeed-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    background: #f0f0f0;
}

.instafeed-image-wrapper {
    width: 100%;
    height: 100%;
}

.instafeed-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.instafeed-item:hover .instafeed-image {
    transform: scale(1.1);
}

/* Overlay & Caption */
.instafeed-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
}

.instafeed-item:hover .instafeed-overlay {
    opacity: 1;
}

.instafeed-caption {
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Skeleton Loading (Placeholder) */
.instafeed-item.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Error message */
.instafeed-error {
    color: #d32f2f;
    padding: 10px;
    border: 1px solid #d32f2f;
    border-radius: 4px;
    background: #ffebee;
}

/* Fallback & Notice */
.instafeed-fallback-notice {
    font-size: 13px;
    color: #666;
    margin-top: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-left: 4px solid #3897f0;
}

.instafeed-fallback-post {
    margin-bottom: 20px;
    max-width: 540px;
}

.instafeed-profile-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    background: #fff;
    max-width: 500px;
    margin: 20px 0;
}

.instafeed-profile-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.instafeed-profile-icon {
    color: #3897f0;
}

.instafeed-profile-details h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.instafeed-profile-details p {
    margin: 0;
    font-size: 14px;
    color: #8e8e8e;
}

.instafeed-profile-button {
    background: #3897f0;
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.instafeed-profile-button:hover {
    background: #1877f2;
}

@media (max-width: 480px) {
    .instafeed-profile-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}
