/**
 * LinkedIn Posts Widget Styles
 * Responsive layout: Right column (desktop) / Slider (mobile)
 */

/* Main Widget Container */
.linkedin-posts-widget {
    margin: 20px 0;
    position: relative;
}

/* Consent Notice Box */
.linkedin-consent-notice {
    background: #f8f9fa;
    border: 2px solid #0077b5; /* LinkedIn Blue */
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.linkedin-consent-notice .consent-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.linkedin-consent-notice .consent-icon {
    width: 60px;
    height: 60px;
    background: #0077b5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.linkedin-consent-notice .consent-icon svg {
    width: 32px;
    height: 32px;
}

.linkedin-consent-notice h3 {
    margin: 10px 0;
    color: #333;
    font-size: 1.5rem;
}

.linkedin-consent-notice p {
    color: #666;
    line-height: 1.6;
    margin: 10px 0;
}

.linkedin-consent-notice small {
    font-size: 0.875rem;
}

.linkedin-consent-notice a {
    color: #0077b5;
    text-decoration: underline;
}

.consent-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-accept-linkedin,
.btn-decline-linkedin {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-accept-linkedin {
    background: #0077b5;
    color: white;
}

.btn-accept-linkedin:hover {
    background: #005885;
}

.btn-decline-linkedin {
    background: #e0e0e0;
    color: #333;
}

.btn-decline-linkedin:hover {
    background: #d0d0d0;
}

/* LinkedIn Widget Container */
.linkedin-widget-container {
    width: 100%;
}

/* Declined Message */
.linkedin-declined-message {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    color: #666;
}

/* Desktop Layout - Right Column */
@media (min-width: 768px) {
    /* When placed in a right column context */
    .content-right .linkedin-posts-widget,
    .sidebar-right .linkedin-posts-widget {
        max-width: 350px;
    }
    
    .linkedin-widget-container {
        /* Display posts in vertical list */
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    /* SociableKIT widget adjustments */
    .linkedin-widget-container iframe {
        max-width: 100%;
        height: auto;
    }
}

/* Mobile Layout - Slider */
@media (max-width: 767px) {
    .linkedin-consent-notice {
        padding: 20px;
    }
    
    .linkedin-consent-notice h3 {
        font-size: 1.25rem;
    }
    
    .consent-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-accept-linkedin,
    .btn-decline-linkedin {
        width: 100%;
    }
    
    /* Mobile Slider for LinkedIn Posts */
    .linkedin-widget-container.mobile-slider {
        position: relative;
        overflow: hidden;
    }
    
    .linkedin-widget-container.mobile-slider .sk-ww-linkedin-page-post {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    
    .linkedin-widget-container.mobile-slider .sk-ww-linkedin-page-post::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }
    
    .linkedin-widget-container.mobile-slider .sk-ww-linkedin-page-post > * {
        flex: 0 0 100%;
        scroll-snap-align: start;
        padding: 0 10px;
    }
    
    /* Slider navigation dots (optional) */
    .slider-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 15px;
    }
    
    .slider-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #ddd;
        cursor: pointer;
        transition: background 0.3s ease;
    }
    
    .slider-dot.active {
        background: #0077b5;
    }
}

/* SociableKIT Widget Customization */
.sk-ww-linkedin-page-post {
    margin: 0 auto;
}

/* Limit to 3 posts */
.linkedin-widget-container .sk-ww-linkedin-page-post-item:nth-child(n+4) {
    display: none;
}

/* Responsive iframe */
.linkedin-widget-container iframe {
    max-width: 100%;
}

/* Loading state */
.linkedin-widget-container.loading::after {
    content: "Lädt LinkedIn-Inhalte...";
    display: block;
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.linkedin-widget-container {
    animation: fadeIn 0.5s ease-in;
}

.linkedin-widget-container .sk-posts-header {
  display: none!important;
  visibility: hidden!important;
}

.linkedin-widget-container .sk-post-item:nth-child(n+4) {
  display: none!important;
  visibility: hidden!important;
}

.linkedin-widget-container .sk-posts-footer {
  display: none!important;
  visibility: hidden!important;
}

.linkedin-widget-container .sk_branding {
  display: none!important;
  visibility: hidden!important;
}