/* Social Media Posts Styling */
.social-posts-container {
    height: 100%;
    overflow-y: auto;
    padding-right: 10px;
}

.social-posts-container::-webkit-scrollbar {
    width: 4px;
}

.social-posts-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.social-posts-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.social-posts-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Create Post Section */
.create-post-section {
    margin-bottom: 1rem;
}

.create-post-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.create-post-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-textarea {
    border: none;
    background: transparent;
    resize: none;
    font-size: 14px;
    padding: 8px 12px;
}

.post-textarea:focus {
    box-shadow: none;
    border: none;
    outline: none;
}

.post-actions .btn {
    font-size: 12px;
    padding: 4px 8px;
}

/* Post Cards */
.post-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.post-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.post-header {
    margin-bottom: 12px;
}

.user-avatar {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
}

.post-content p {
    margin-bottom: 12px;
    line-height: 1.5;
    color: #333;
    direction: auto;
    unicode-bidi: plaintext;
    text-align: start;
}

.post-image img {
    border-radius: 8px;
    max-height: none;
    object-fit: contain;
}

.post-stats {
    font-size: 13px;
    color: #6c757d;
    border-top: 1px solid #f1f3f4;
    border-bottom: 1px solid #f1f3f4;
    padding: 8px 0;
}

.post-actions .btn {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.post-actions .btn:hover {
    transform: translateY(-1px);
}

.like-btn.liked {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.like-btn.liked:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.comment-btn.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

/* Comments Section */
.comments-section {
    border-top: 1px solid #f1f3f4;
    padding-top: 12px;
}

.comment-form {
    margin-bottom: 12px;
}

.comment-form .form-control {
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
}

.comment-form .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.comments-list {
    max-height: 200px;
    overflow-y: auto;
}

.comment-item {
    margin-bottom: 12px;
}

.comment-content {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 8px 12px;
}

.comment-content h6 {
    font-size: 13px;
    margin-bottom: 4px;
    color: #495057;
}

.comment-content p {
    font-size: 13px;
    margin-bottom: 4px;
    color: #333;
}

.comment-content small {
    font-size: 11px;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .social-posts-container {
        padding-right: 5px;
    }
    
    .post-card {
        padding: 12px;
    }
    
    .post-actions .btn {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .create-post-card {
        padding: 12px;
    }
}

/* Animation for new posts */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card.new-post {
    animation: slideInUp 0.5s ease-out;
}

/* Like animation */
@keyframes heartBeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.3);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.3);
    }
    70% {
        transform: scale(1);
    }
}

.like-btn.liked i {
    animation: heartBeat 0.6s ease-in-out;
}

/* Loading states */
.post-loading {
    opacity: 0.6;
    pointer-events: none;
}

.post-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mixed content text direction handling */
.post-content {
    direction: auto;
    unicode-bidi: plaintext;
    text-align: start;
}

/* Ensure proper spacing for mixed content */
.post-content div {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

