/**
 * Infinite Scroll Full Blog Posts Styles
 * Matches BuddyBoss theme full-width layout
 */

.ubitto-infinite-scroll-container {
    position: relative;
}

.ubitto-infinite-post {
    padding-top: 60px;
    margin-top: 40px;
    border-top: 3px solid #eee;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.ubitto-infinite-post.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Entry content wrap - matches theme structure */
.ubitto-infinite-post .entry-content-wrap {
    position: relative;
}

/* Entry meta - author info */
.ubitto-infinite-post .entry-meta {
    margin-bottom: 1.5rem;
}

.ubitto-infinite-post .bb-user-avatar-wrap {
    display: flex;
    align-items: center;
}

.ubitto-infinite-post .avatar-wrap {
    margin-right: 12px;
}

.ubitto-infinite-post .avatar-wrap .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.ubitto-infinite-post .meta-wrap {
    display: flex;
    flex-direction: column;
}

.ubitto-infinite-post .post-author {
    font-weight: 600;
    color: var(--bb-headings-color, #1a1a2e);
    text-decoration: none;
}

.ubitto-infinite-post .post-author:hover {
    color: var(--bb-primary-color, #4f46e5);
}

.ubitto-infinite-post .post-date {
    font-size: 13px;
    color: var(--bb-body-text-color, #666);
}

/* Entry header - title */
.ubitto-infinite-post .entry-header {
    margin-bottom: 1.5rem;
}

.ubitto-infinite-post .entry-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bb-headings-color, #1a1a2e);
    margin: 0;
    line-height: 1.3;
}

.ubitto-infinite-post .entry-title a {
    color: inherit;
    text-decoration: none;
}

.ubitto-infinite-post .entry-title a:hover {
    color: var(--bb-primary-color, #4f46e5);
}

/* Full-width featured image - matches BuddyBoss bb-vw-container1 */
.ubitto-infinite-post .entry-media.bb-vw-container1 {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 2rem;
    padding: 0;
}

.ubitto-infinite-post .entry-media.bb-vw-container1 img {
    width: 100%;
    height: 468px;
    object-fit: cover;
    position: relative;
}

/* Entry content */
.ubitto-infinite-post .entry-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--bb-body-text-color, #333);
}

.ubitto-infinite-post .entry-content p {
    margin-bottom: 1.5em;
}

.ubitto-infinite-post .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Post meta footer */
.ubitto-infinite-post .post-meta-wrapper-main {
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.ubitto-infinite-post .post-meta-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

/* Show support section inline with categories */
.ubitto-infinite-post .post-meta-wrapper .show-support {
    margin-left: auto;
    position: static;
    top: auto;
}

.ubitto-infinite-post .post-meta-wrapper .show-support .flex {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ubitto-infinite-post .post-meta-wrapper .show-support a {
    color: var(--bb-body-text-color, #666);
    font-size: 18px;
}

.ubitto-infinite-post .post-meta-wrapper .show-support a:hover {
    color: var(--bb-primary-color, #4f46e5);
}

.ubitto-infinite-post .post-meta-wrapper .show-support .author-box-share-wrap {
    position: relative;
}

.ubitto-infinite-post .post-meta-wrapper .show-support .bb-share-container {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bb-content-background-color, #fff);
    border: 1px solid var(--bb-content-border-color, #e8e8e8);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
}

.ubitto-infinite-post .post-meta-wrapper .show-support .author-box-share-wrap:hover .bb-share-container {
    display: block;
}

.ubitto-infinite-post .cat-links,
.ubitto-infinite-post .tag-links {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--bb-body-text-color, #666);
    font-size: 14px;
}

.ubitto-infinite-post .cat-links i,
.ubitto-infinite-post .tag-links i {
    color: var(--bb-body-text-color, #999);
}

.ubitto-infinite-post .cat-links a,
.ubitto-infinite-post .tag-links a {
    color: var(--bb-primary-color, #4f46e5);
    text-decoration: none;
}

.ubitto-infinite-post .cat-links a:hover,
.ubitto-infinite-post .tag-links a:hover {
    text-decoration: underline;
}

/* Loading indicator */
.ubitto-infinite-scroll-loading {
    text-align: center;
    padding: 40px 20px;
    display: none;
}

.ubitto-infinite-scroll-loading.active {
    display: block;
}

.ubitto-infinite-scroll-loading .ubitto-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: var(--bb-primary-color, #4f46e5);
    border-radius: 50%;
    animation: ubitto-spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes ubitto-spin {
    to { transform: rotate(360deg); }
}

/* End message */
.ubitto-infinite-scroll-end {
    text-align: center;
    padding: 40px 20px;
    color: var(--bb-body-text-color, #666);
    font-style: italic;
    display: none;
}

.ubitto-infinite-scroll-end.active {
    display: block;
}

/* Progress bar - hidden */
.ubitto-scroll-progress {
    display: none;
}

/* Post indicator */
.ubitto-current-post-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 9998;
    max-width: 250px;
}

.ubitto-current-post-indicator.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Related Posts section inside infinite scroll posts */
.ubitto-infinite-post .post-related-posts {
}

.ubitto-infinite-post .post-related-posts h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--bb-headings-color, #1a1a2e);
}

.ubitto-infinite-post .post-related-posts .post-grid.bb-grid {
    margin-left: -10px;
    margin-right: -10px;
}

.ubitto-infinite-post .post-related-posts .post-grid.bb-grid > article,
.ubitto-infinite-post .post-related-posts .post-grid.bb-grid .slick-slide > article {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 20px;
    /* Override the parent article fade-in styles */
    opacity: 1 !important;
    transform: none !important;
    padding-top: 0;
    margin-top: 0;
    border-top: none;
}

/* Slick slider arrows for related posts */
.ubitto-infinite-post .post-related-posts h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ubitto-infinite-post .post-related-posts h3 .bb-slide-prev,
.ubitto-infinite-post .post-related-posts h3 .bb-slide-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bb-content-background-color, #fff);
    border: 1px solid var(--bb-content-border-color, #e8e8e8);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.ubitto-infinite-post .post-related-posts h3 .bb-slide-prev:hover,
.ubitto-infinite-post .post-related-posts h3 .bb-slide-next:hover {
    background: var(--bb-primary-color, #4f46e5);
    border-color: var(--bb-primary-color, #4f46e5);
    color: #fff;
}

.ubitto-infinite-post .post-related-posts h3 .bb-slide-prev i,
.ubitto-infinite-post .post-related-posts h3 .bb-slide-next i {
    font-size: 14px;
}

.ubitto-infinite-post .post-related-posts .slick-list {
    padding: 0 0 20px;
}

.ubitto-infinite-post .post-related-posts .post-inner-wrap {
    background: var(--bb-content-background-color, #fff);
    border: 1px solid var(--bb-content-border-color, #e8e8e8);
    border-radius: var(--bb-block-radius, 8px);
    overflow: hidden;
    height: 100%;
    transition: box-shadow 0.2s ease;
}

.ubitto-infinite-post .post-related-posts .post-inner-wrap:hover {
    box-shadow: 0 6px 24px rgba(18, 43, 70, 0.12);
}

.ubitto-infinite-post .post-related-posts .ratio-wrap {
    position: relative;
    overflow: hidden;
}

.ubitto-infinite-post .post-related-posts .ratio-wrap .entry-img {
    display: block;
}

.ubitto-infinite-post .post-related-posts .ratio-wrap img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ubitto-infinite-post .post-related-posts .ratio-wrap:hover img {
    transform: scale(1.05);
}

.ubitto-infinite-post .post-related-posts .entry-content-wrap {
    padding: 15px;
}

.ubitto-infinite-post .post-related-posts .entry-header {
    margin-bottom: 10px;
}

.ubitto-infinite-post .post-related-posts .entry-title {
    font-size: 1rem;
    line-height: 1.4;
    margin: 0;
}

.ubitto-infinite-post .post-related-posts .entry-title a {
    color: var(--bb-headings-color, #1a1a2e);
    text-decoration: none;
}

.ubitto-infinite-post .post-related-posts .entry-title a:hover {
    color: var(--bb-primary-color, #4f46e5);
}

.ubitto-infinite-post .post-related-posts .entry-content {
    font-size: 13px;
    color: var(--bb-body-text-color, #666);
    margin-bottom: 10px;
    line-height: 1.5;
}

.ubitto-infinite-post .post-related-posts .entry-content p {
    margin: 0;
}

.ubitto-infinite-post .post-related-posts .entry-meta {
    margin: 0;
}

.ubitto-infinite-post .post-related-posts .bb-user-avatar-wrap {
    display: flex;
    align-items: center;
}

.ubitto-infinite-post .post-related-posts .avatar-wrap {
    margin-right: 8px;
}

.ubitto-infinite-post .post-related-posts .avatar-wrap img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.ubitto-infinite-post .post-related-posts .meta-wrap {
    display: flex;
    flex-direction: column;
}

.ubitto-infinite-post .post-related-posts .post-author {
    font-size: 12px;
    font-weight: 600;
}

.ubitto-infinite-post .post-related-posts .post-date {
    font-size: 11px;
}

.ubitto-infinite-post .post-related-posts .post-date a {
    color: var(--bb-body-text-color, #999);
    text-decoration: none;
}


/* Responsive */
@media (max-width: 768px) {
    .ubitto-infinite-post .entry-title {
        font-size: 1.5rem;
    }

    .ubitto-infinite-post .entry-content {
        font-size: 16px;
    }

    .ubitto-current-post-indicator {
        bottom: 70px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .ubitto-infinite-post .post-meta-wrapper {
        flex-direction: column;
        gap: 0.75rem;
    }
}
