/**
 * Plus Social Media Frontend Styles
 * Version: 1.0.0
 */

/* ===================================
   SOCIAL MEDIA POSTS CONTAINER
   ================================ */
.plus-socialmedia-posts {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

/* Grid Layout (default) */
.plus-socialmedia-posts.layout-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* List Layout */
.plus-socialmedia-posts.layout-list {
    grid-template-columns: 1fr;
    max-width: 800px;
}

/* ===================================
   INDIVIDUAL POST CARD
   ================================ */
.social-post {
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.social-post:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* ===================================
   POST IMAGE
   ================================ */
.social-post .post-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f5f5f5;
    height: 375px; /* Instagram 4:5 Seitenverhältnis */
}

.social-post .post-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* ===================================
   POST CONTENT
   ================================ */
.social-post .post-content {
    padding: 15px;
}

/* Post Header */
.social-post .post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e8ed;
}

.social-post .post-platform {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
}

/* Platform Colors */
.social-post .post-platform.facebook {
    background: #1877f2;
}

.social-post .post-platform.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-post .post-platform.linkedin {
    background: #0077b5;
}

.social-post .post-platform.twitter,
.social-post .post-platform.x {
    background: #000000;
}

.social-post .post-platform.youtube {
    background: #ff0000;
}

.social-post .post-platform.tiktok {
    background: #000000;
}

/* Default platform color */
.social-post .post-platform {
    background: #657786;
}

.social-post .post-date {
    color: #657786;
    font-size: 13px;
}

/* Post Text */
.social-post .post-text {
    color: #14171a;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    max-height: 375px; /* Gleiche Höhe wie Vorschaubild */
    overflow-y: auto; /* Scrollbar bei Überlänge */
}

.social-post .post-text p {
    margin: 0 0 10px 0;
}

.social-post .post-text p:last-child {
    margin-bottom: 0;
}

/* Scrollbar Styling für bessere Optik */
.social-post .post-text::-webkit-scrollbar {
    width: 6px;
}

.social-post .post-text::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.social-post .post-text::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.social-post .post-text::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Post Footer */
.social-post .post-footer {
    padding-top: 10px;
    border-top: 1px solid #e1e8ed;
    color: #657786;
    font-size: 12px;
    display: none; /* Ersteller-Name verstecken */
}

.social-post .post-author {
    font-weight: 600;
    color: #14171a;
}

/* ===================================
   PLATFORM-SPECIFIC BORDERS
   ================================ */
.social-post.platform-facebook {
    border-top: 3px solid #1877f2;
}

.social-post.platform-instagram {
    border-top: 3px solid #e4405f;
}

.social-post.platform-linkedin {
    border-top: 3px solid #0077b5;
}

.social-post.platform-twitter,
.social-post.platform-x {
    border-top: 3px solid #000000;
}

.social-post.platform-youtube {
    border-top: 3px solid #ff0000;
}

.social-post.platform-tiktok {
    border-top: 3px solid #000000;
}

/* ===================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 768px) {
    .plus-socialmedia-posts.layout-grid {
        grid-template-columns: 1fr;
    }

    .social-post .post-image {
        height: 300px;
    }

    .social-post .post-content {
        padding: 12px;
    }

    .social-post .post-text {
        font-size: 13px;
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .plus-socialmedia-posts {
        gap: 15px;
        margin: 15px 0;
    }

    .social-post .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .social-post .post-image {
        height: 250px;
    }

    .social-post .post-text {
        max-height: 250px;
    }
}

/* ===================================
   LOADING STATE
   ================================ */
.plus-socialmedia-posts.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ===================================
   EMPTY STATE
   ================================ */
.plus-socialmedia-empty {
    text-align: center;
    padding: 40px 20px;
    color: #657786;
    font-size: 14px;
}

/* ===================================
   ERROR STATE
   ================================ */
.plus-socialmedia-error {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    padding: 15px;
    color: #c53030;
    font-size: 14px;
    margin: 20px 0;
}
