/* Embed containers */
.embed-container {
    position: relative;
    margin-top: 15px;
    border-radius: 12px;
    overflow: hidden;
    background: #f0f0f0;
}

.embed-container iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
}

/* TikTok embed styles */
.embed-container.tiktok-embed {
    background: transparent;
    display: flex;
    justify-content: center;
}

.embed-container.tiktok-embed .tiktok-embed {
    margin: 0 auto;
}

.embed-container.tiktok-embed blockquote {
    margin: 0;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
}

/* Instagram embed styles */
.embed-container.instagram-container {
    background: #fafafa;
    display: flex;
    justify-content: center;
}

.embed-container.instagram-container .instagram-media {
    margin: 0 auto !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* TikTok & Instagram fallback link */
.attachment-link-fallback {
    margin-top: 15px;
    padding: 12px 16px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    font-size: 0.85rem;
}

.attachment-link-fallback p {
    margin: 0;
}

.attachment-link-fallback a {
    color: #0079d3;
    text-decoration: none;
    font-weight: 500;
}

.attachment-link-fallback a:hover {
    text-decoration: underline;
}

/* RedGIFs specific styles */
.redgifs-container {
    margin-top: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
}

.redgifs-credit {
    font-size: 0.75rem;
    text-align: center;
    margin-top: 8px;
    margin-bottom: 0;
}

.redgifs-credit a {
    color: #7c7c7c;
    text-decoration: none;
}

.redgifs-credit a:hover {
    color: #0079d3;
    text-decoration: underline;
}

/* Iframely embed styles (fallback) */
.iframely-embed {
    margin-top: 15px;
    border-radius: 12px;
    overflow: hidden;
    background: #f6f7f8;
}

.iframely-responsive {
    width: 100%;
}

.iframely-embed iframe,
.iframely-embed .iframely-responsive > div {
    border-radius: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .embed-container.tiktok-embed .tiktok-embed {
        min-width: 280px;
        max-width: 100%;
    }
    
    .embed-container.instagram-container .instagram-media {
        min-width: 280px !important;
        width: calc(100% - 2px) !important;
    }
    
    .redgifs-container {
        padding-bottom: 75% !important;
    }
}