/**
 * LinkedIn Posts Display CSS
 */

/* Row Layout - 4 Posts in einer Reihe */
.linkedin-posts-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
    margin: 40px 0;
}

.linkedin-post-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    flex: 1 1 0;
    max-width: 22%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
    position: relative;
}

.linkedin-post-item:hover {
    transform: translateY(-5px);
}

.linkedin-post-item.api-synced {
    border-left: 4px solid #0077b5;
}

.linkedin-post-item.manual {
    border-left: 4px solid #28a745;
}

.linkedin-post-item .post-thumbnail {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.linkedin-post-item .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.linkedin-post-item .post-content {
    padding: 16px;
    position: relative;
}

.linkedin-post-item .post-excerpt {
    font-size: 0.95em;
    line-height: 1.4;
    margin-bottom: 12px;
    color: #333;
}

.linkedin-post-item .read-more {
    color: #0077b5;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
}

.linkedin-post-item .read-more:hover {
    text-decoration: underline;
}

/* API Badge */
.api-badge {
    display: inline-block;
    background: #0077b5;
    color: white;
    font-size: 0.7em;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    position: absolute;
    top: 8px;
    right: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.linkedin-post-item .api-badge {
    position: absolute;
    top: 8px;
    right: 8px;
}

.linkedin-post-infinite .api-badge {
    margin-left: 10px;
}

/* More Posts Link */
.linkedin-more-posts {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}

.more-posts-link {
    display: inline-block;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    color: #000;
    position: relative;
    padding-bottom: 4px;
    text-align: center;
}

.more-posts-link::after,
.more-posts-link::before {
    content: "";
    position: absolute;
    left: 0;
    height: 1px;
    width: 100%;
    background-color: #000;
}

.more-posts-link::before {
    bottom: 0;
}

.more-posts-link::after {
    bottom: 4px;
}

/* Infinite Scroll Layout */
.linkedin-posts-infinite {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.linkedin-posts-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.linkedin-post-infinite {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    position: relative;
}

.linkedin-post-infinite:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.linkedin-post-infinite.api-synced {
    border-left: 6px solid #0077b5;
}

.linkedin-post-infinite.manual {
    border-left: 6px solid #28a745;
}

.linkedin-post-infinite .post-header {
    padding: 20px 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.linkedin-post-infinite .post-title {
    font-size: 1.3em;
    font-weight: bold;
    margin: 0;
    color: #333;
    flex: 1;
}

.linkedin-post-infinite .post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
}

.linkedin-post-infinite .post-date {
    color: #666;
    font-size: 0.9em;
    white-space: nowrap;
}

.linkedin-post-infinite .post-thumbnail {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
}

.linkedin-post-infinite .post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.linkedin-post-infinite .post-content {
    padding: 20px;
}

.linkedin-post-infinite .post-content p {
    font-size: 1em;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

.linkedin-post-infinite .post-footer {
    padding: 0 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    margin-top: 15px;
    padding-top: 15px;
}

.linkedin-post-infinite .post-stats {
    display: flex;
    gap: 15px;
}

.linkedin-post-infinite .post-stats span {
    font-size: 0.9em;
    color: #666;
}

.linkedin-post-infinite .linkedin-link {
    color: #0077b5;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
}

.linkedin-post-infinite .linkedin-link:hover {
    text-decoration: underline;
}

/* Load More Button */
.linkedin-load-more-wrapper {
    text-align: center;
    margin-top: 40px;
}

.linkedin-load-more {
    background: #0077b5;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.linkedin-load-more:hover {
    background: #005885;
}

.linkedin-load-more:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.linkedin-loading {
    font-size: 1em;
    color: #666;
    font-style: italic;
}

/* Admin Styles */
.wrap .card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    margin: 20px 0;
    padding: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.wrap .card h2 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* API Settings specific styles */
.linkedin-api-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 600;
}

.linkedin-api-status.connected {
    background: #d1f2eb;
    color: #27ae60;
    border: 1px solid #58d68d;
}

.linkedin-api-status.disconnected {
    background: #fadbd8;
    color: #e74c3c;
    border: 1px solid #f1948a;
}

/* Sync status indicators */
.sync-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.sync-indicator.success {
    background: #28a745;
}

.sync-indicator.error {
    background: #dc3545;
}

.sync-indicator.pending {
    background: #ffc107;
}

/* Statistics cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #0077b5;
    display: block;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .linkedin-posts-row {
        flex-wrap: wrap;
    }
    
    .linkedin-post-item {
        max-width: 48%;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .linkedin-posts-row {
        flex-direction: column;
    }
    
    .linkedin-post-item {
        max-width: 100%;
    }
    
    .linkedin-posts-infinite {
        padding: 20px 10px;
    }
    
    .linkedin-post-infinite .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .linkedin-post-infinite .post-meta {
        margin-left: 0;
    }
    
    .linkedin-post-infinite .post-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
} 