/**
 * Social Media Embeds Styling
 * Provides optimized styling for various social media platform embeds
 */

/* Social posts container */
.social-posts-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.social-post-card {
    background-color: rgba(30, 30, 30, 0.92);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
}

/* Base embed container */
.embed-container {
    position: relative;
    padding-bottom: 100%;
    height: 0;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.2);
}

/* Platform-specific aspect ratios */
.embed-youtube {
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.embed-facebook {
    padding-bottom: 125%; /* 4:5 aspect ratio */
    max-height: 600px;
}

.embed-bandcamp {
    padding-bottom: 66.67%; /* 3:2 aspect ratio */
}

.embed-container iframe,
.embed-container object,
.embed-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Simple TikTok container */
.tiktok-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    background-color: rgba(0, 0, 0, 0.2);
    min-height: 200px;
    position: relative;
}

/* Loading indicator for TikTok embeds */
.tiktok-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-color, #fee300);
    border-radius: 50%;
    animation: embed-loading 0.8s linear infinite;
    z-index: 1;
}

/* Hide loading indicator once TikTok embed is loaded */
.tiktok-container.loaded::before {
    display: none;
}

/* TikTok blockquote styling */
blockquote.tiktok-embed {
    margin: 0 auto !important;
    max-width: 325px !important;
    min-width: auto !important;
    width: 100% !important;
}

/* Loading indicator for embeds */
.embed-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-color, #fee300);
    border-radius: 50%;
    animation: embed-loading 0.8s linear infinite;
    z-index: 1;
}

@keyframes embed-loading {
    to { transform: rotate(360deg); }
}

/* Hide loading indicator once iframe is loaded */
.embed-container.loaded::before {
    display: none;
}

.post-date {
    padding: 8px 12px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Responsive adjustments for social embeds */
@media (max-width: 768px) {
    .social-content {
        padding: 0 10px;
    }
    
    .embed-facebook, .embed-bandcamp {
        padding-bottom: 100%;
    }
    
    blockquote.tiktok-embed {
        max-width: 280px !important;
    }
}
