/* Socialite-style post layouts for WordPress */
/* Uses CSS variables from hbn-custom.css */

/* Back to Feed Button */
.hbn-back-to-feed {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin-bottom: 20px;
    background: var(--hbn-gray-100);
    color: var(--hbn-gray-800);
    text-decoration: none;
    border-radius: var(--hbn-radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.hbn-back-to-feed:hover {
    background: var(--hbn-gray-200);
    color: var(--hbn-gray-900);
    transform: translateX(-2px);
}

.hbn-back-to-feed i {
    font-size: 16px;
}

@media (max-width: 768px) {
    .hbn-back-to-feed {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* Shared Post Styles */
.socialite-video-post,
.socialite-blog-post {
    background: #fff;
    border-radius: var(--hbn-radius);
    box-shadow: var(--hbn-shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

/* Video Post - Video at Top */
.socialite-video-post .videoFrame {
    position: relative;
    width: 100%;
    background: #000;
}

.socialite-video-post .video-iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: 0;
    display: block;
}

.socialite-video-post .video-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--hbn-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
}

.socialite-video-post .video-placeholder p {
    color: var(--hbn-gray-600);
    margin: 0;
}

/* Blog Post - Featured Image at Top */
.socialite-blog-post .post-featured-image {
    position: relative;
    height: 320px;
    overflow: hidden;
}

.socialite-blog-post .post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Post Info Section (Below Video/Image) */
.post-info-section {
    padding: 16px 20px;
}

/* Author Row with Small Avatar */
.post-author-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.author-avatar-small img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: block;
}

.author-details {
    flex: 1;
}

.author-username {
    font-weight: 600;
    font-size: 14px;
    color: var(--hbn-gray-900);
    text-decoration: none;
    display: block;
    line-height: 1.3;
}

.post-timestamp {
    font-size: 12px;
    color: var(--hbn-gray-600);
    margin-top: 2px;
}

/* Post Title Below Media */
.post-title-below-media {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
    line-height: 1.4;
    color: var(--hbn-gray-900);
}

/* Post Description */
.post-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--hbn-gray-700);
}

.post-description p {
    margin: 0 0 1em 0;
}

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

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.post-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--hbn-gray-100);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    color: var(--hbn-gray-700);
}

.post-tag:hover {
    background: var(--hbn-gray-200);
}

/* Comments Box */
.comments-box {
    background: #fff;
    border-radius: var(--hbn-radius);
    box-shadow: var(--hbn-shadow);
    overflow: hidden;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.comments-box .comments-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--hbn-gray-900);
}

/* Comments Section */
.comments-section {
    margin-top: 16px;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-avatar img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-top: 4px;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--hbn-gray-900);
    text-decoration: none;
}

.comment-content p {
    margin: 2px 0 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--hbn-gray-800);
}

.more-comments-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--hbn-primary);
    background: none;
    border: 0;
    cursor: pointer;
    font-size: 14px;
    margin: 8px 0;
    padding: 0;
}

.more-comments-btn:hover {
    opacity: 0.8;
}

.no-comments {
    color: var(--hbn-gray-600);
    font-size: 14px;
    margin: 0;
}

/* Add Comment Form */
.add-comment-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--hbn-gray-100);
}

.add-comment-form img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.comment-input {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 40px;
}

.comment-input a {
    display: block;
    width: 100%;
    padding: 8px 16px;
    color: var(--hbn-gray-600);
    text-decoration: none;
}

.reply-btn {
    font-size: 13px;
    border-radius: 999px;
    padding: 6px 14px;
    background: var(--hbn-gray-100);
    text-decoration: none;
    color: var(--hbn-gray-900);
    white-space: nowrap;
}

.reply-btn:hover {
    background: var(--hbn-gray-200);
}

/* Dark Mode Support - HBIG Purple & Orange Theme */
.dark .socialite-video-post,
.dark .socialite-blog-post,
.dark .comments-box {
    background: #2d1b4e;
}

.dark .author-username,
.dark .comment-author,
.dark .post-title-below-media {
    color: #F5E6D3;
}

.dark .post-timestamp {
    color: #C9B8A5;
}

.dark .post-description {
    color: #E8DCC8;
}

.dark .post-tag {
    background: #3d2663;
    color: #FFA500;
}

.dark .reply-btn {
    background: #3d2663;
    color: #FFA500;
}

.dark .add-comment-form {
    border-color: rgba(255,255,255,0.1);
}

/* Responsive - Mobile Edge-to-Edge */
@media (max-width: 640px) {
    /* Edge-to-edge posts on mobile */
    .socialite-video-post,
    .socialite-blog-post {
        border-radius: 0;
        box-shadow: none;
        border-bottom: 1px solid var(--hbn-gray-200);
        margin-bottom: 0;
    }
    
    /* Comments box edge-to-edge */
    .comments-box {
        border-radius: 0;
        box-shadow: none;
        padding: 16px;
        border-bottom: 1px solid var(--hbn-gray-200);
        margin-bottom: 0;
    }
    
    /* Video frame full width */
    .socialite-video-post .videoFrame {
        margin: 0;
    }
    
    /* Featured image full width and taller on mobile */
    .socialite-blog-post .post-featured-image {
        height: 280px;
    }
    
    .post-info-section {
        padding: 12px 16px;
    }
    
    .post-title-below-media {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .post-author-row {
        margin-bottom: 10px;
    }
}

/* Smaller mobile devices */
@media (max-width: 480px) {
    .post-info-section {
        padding: 12px 14px;
    }
    
    .comments-box {
        padding: 14px;
    }
}

/* =====================================================
   PeepSo Activity Feed - Click to Detail (Facebook/X style)
   ===================================================== */

/* Make post body and header clickable */
.ps-post__body--clickable,
.ps-post__header--clickable {
    cursor: pointer;
}

/* Subtle hover effect on post - shows it's clickable */
.ps-post.ps-js-activity:hover {
    background-color: rgba(0, 0, 0, 0.01);
}

/* Exclude footer from hover effect since actions are there */
.ps-post__footer {
    cursor: default;
}

/* Ensure interactive elements keep their own cursors */
.ps-post__body--clickable a,
.ps-post__body--clickable button,
.ps-post__body--clickable iframe,
.ps-post__body--clickable video,
.ps-post__body--clickable .ps-dropdown,
.ps-post__header--clickable a,
.ps-post__header--clickable .ps-dropdown {
    cursor: pointer;
}

/* Visual feedback - slightly highlight text content area */
.ps-post__content:hover {
    background-color: rgba(0, 0, 0, 0.005);
    border-radius: var(--hbn-radius-sm);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ps-post.ps-js-activity:hover {
        background-color: rgba(255, 255, 255, 0.02);
    }
    
    .ps-post__content:hover {
        background-color: rgba(255, 255, 255, 0.01);
    }
}
