// Frontend Styles for Facebook Feed Block
.ask-facebook-feed {
    width: 100%;

    .ask-posts-grid {
        display: grid;
        width: 100%;
    }

    .ask-post-card {
        overflow: hidden;
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;

        &:hover {
            transform: translateY(-2px);
        }

        .ask-post-image {
            width: 100%;
            height: 200px;
            overflow: hidden;
            background: #f5f5f5;
            position: relative;

            a {
                display: block;
                width: 100%;
                height: 100%;
            }

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

            &:hover img {
                transform: scale(1.05);
            }
        }

        .ask-post-content {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .ask-post-author {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 8px;

            .ask-author-avatar {
                width: 32px;
                height: 32px;
                border-radius: 50%;
                background: #e0e0e0;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 18px;
                overflow: hidden;
                flex-shrink: 0;

                img {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                }

                span {
                    font-size: 16px;
                }
            }
        }

        .ask-post-date {
            margin-bottom: 12px;
        }

        .ask-post-text {
            margin-bottom: 12px;
            flex: 1;
        }

        .ask-post-stats {
            display: flex;
            gap: 16px;
            align-items: center;
            margin-top: auto;

            .ask-stat {
                display: flex;
                align-items: center;
                gap: 4px;

                .dashicons {
                    width: 16px;
                    height: 16px;
                    font-size: 16px;
                }
            }

            .ask-reactions {
                .ask-reaction-container {
                    display: flex;
                    align-items: center;
                    gap: 6px;
                }

                .ask-reaction-icons {
                    display: flex;
                    align-items: center;
                    /* Ensure height matches icon size */
                    height: 18px;
                }

                .ask-reaction-icon-wrapper {
                    width: 18px;
                    height: 18px;
                    border-radius: 50%;
                    border: 2px solid #fff;
                    background: #fff;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    margin-left: -4px;
                    /* Overlap */

                    &:first-child {
                        margin-left: 0;
                    }

                    svg {
                        display: block;
                        width: 100%;
                        height: 100%;
                    }
                }

                .ask-reaction-count {
                    color: #65676b;
                    font-size: 13px;
                    font-weight: 400;
                    line-height: 16px;
                }
            }
        }
    }
}

// Platform-specific styles
.ask-facebook-feed.ask-platform-facebook {
    .ask-post-card {
        border-left: 3px solid #1877f2;
    }
}

// Style variations
.ask-style-classic {
    .ask-post-card {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
}

.ask-style-minimal {
    .ask-post-card {
        border: none;
        background: transparent;
    }
}

.ask-style-card {
    .ask-post-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        border: none;
    }
}

// Responsive
@media (max-width: 768px) {
    .ask-social-feed {
        .ask-posts-grid {
            grid-template-columns: repeat(2, 1fr) !important;
        }
    }
}

@media (max-width: 480px) {
    .ask-social-feed {
        .ask-posts-grid {
            grid-template-columns: 1fr !important;
        }
    }
}

// Loading & Error States
.ask-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;

    .spinner {
        display: inline-block;
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }
}

.ask-no-posts {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: #f5f5f5;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.ask-error {
    text-align: center;
    padding: 20px;
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 8px;
    color: #c33;

    strong {
        display: block;
        margin-bottom: 8px;
        font-size: 16px;
    }

    small {
        display: block;
        margin-top: 8px;
        opacity: 0.8;
    }
}

// Carousel Equal Height Fix
.ask-layout-carousel {
    .swiper-wrapper {
        align-items: stretch;
    }

    .swiper-slide {
        height: auto;
        display: flex;
    }

    .ask-post-card {
        height: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;

        .ask-post-content {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .ask-post-text {
            flex: 1;
        }
    }
}