/* Customer Timeline - Facebook-style post cards */

.ctl-timeline-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 0;
}

.ctl-timeline-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ctl-post-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Header */
.ctl-post-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 10px;
}

.ctl-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ctl-like-color, #1877f2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.ctl-post-meta {
    flex: 1;
}

.ctl-post-author {
    font-size: 15px;
    font-weight: 600;
    color: #050505;
    line-height: 1.2;
}

.ctl-post-date {
    font-size: 13px;
    color: #65676b;
    margin-top: 2px;
}

/* Media (Image / Video) */
.ctl-post-media {
    width: 100%;
    background: #f0f2f5;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
}

.ctl-post-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.ctl-post-media img:hover {
    transform: scale(1.02);
}

.ctl-post-media video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Gallery */
.ctl-gallery {
    width: 100%;
    background: #f0f2f5;
}

.ctl-gallery-main {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
}

.ctl-gallery-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
    cursor: zoom-in;
}

.ctl-gallery-slide-active {
    opacity: 1;
    z-index: 1;
}

.ctl-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ctl-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #050505;
    transition: background 0.15s ease;
}

.ctl-gallery-arrow:hover {
    background: #fff;
}

.ctl-gallery-prev {
    left: 8px;
}

.ctl-gallery-next {
    right: 8px;
}

.ctl-gallery-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.ctl-gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: background 0.15s ease;
}

.ctl-gallery-dot-active {
    background: #fff;
}

.ctl-gallery-thumbs {
    display: flex;
    gap: 4px;
    padding: 6px;
    background: #fff;
    overflow-x: auto;
}

.ctl-gallery-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: #f0f2f5;
    transition: border-color 0.15s ease;
}

.ctl-gallery-thumb-active {
    border-color: var(--ctl-like-color, #1877f2);
}

.ctl-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Body */
.ctl-post-body {
    padding: 12px 16px;
}

.ctl-post-description {
    font-size: 15px;
    color: #050505;
    line-height: 1.5;
    margin: 0 0 8px 0;
    word-wrap: break-word;
}

/* Hashtags */
.ctl-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.ctl-hashtag {
    color: var(--ctl-hashtag-color, #1877f2);
    font-size: 14px;
    font-weight: 500;
    cursor: default;
}

/* Stats bar */
.ctl-post-stats {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid #eff2f5;
    color: #65676b;
    font-size: 15px;
}

.ctl-like-count {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ctl-like-count .ctl-like-icon {
    color: var(--ctl-like-color, #1877f2);
    font-size: 16px;
}

/* Actions bar */
.ctl-post-actions {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    gap: 4px;
}

/* Like button */
.ctl-like-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #65676b;
    transition: background 0.15s ease;
}

.ctl-like-btn:hover {
    background: #f0f2f5;
}

.ctl-like-btn .ctl-like-icon {
    font-size: 18px;
    color: #65676b;
}

.ctl-like-btn.ctl-liked {
    color: var(--ctl-like-color, #1877f2);
}

.ctl-like-btn.ctl-liked .ctl-like-icon {
    color: var(--ctl-like-color, #1877f2);
}

/* Share buttons */
.ctl-share-buttons {
    flex: 2;
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.ctl-share-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: #65676b;
    transition: background 0.15s ease;
}

.ctl-share-btn:hover {
    background: #f0f2f5;
    color: #050505;
}

.ctl-share-btn svg {
    flex-shrink: 0;
}

.ctl-share-facebook:hover {
    color: #1877f2;
}

.ctl-share-x:hover {
    color: #000;
}

.ctl-share-whatsapp:hover {
    color: #25d366;
}

/* No posts */
.ctl-no-posts {
    text-align: center;
    color: #65676b;
    font-size: 16px;
    padding: 40px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Load More button */
.ctl-load-more-wrap {
    text-align: center;
    padding: 20px 0;
}

.ctl-load-more-btn {
    background: #e4e6eb;
    color: #050505;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    transition: background 0.15s ease;
}

.ctl-load-more-btn:hover {
    background: #d8dadf;
}

.ctl-load-more-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Infinite scroll sentinel */
.ctl-infinite-scroll-sentinel {
    height: 1px;
    padding: 10px 0;
}

/* Responsive */
@media (max-width: 600px) {
    .ctl-timeline-container {
        padding: 10px 0;
    }

    .ctl-post-actions {
        flex-direction: column;
        gap: 8px;
    }

    .ctl-like-btn {
        width: 100%;
    }

    .ctl-share-buttons {
        width: 100%;
        justify-content: space-around;
    }

    .ctl-share-btn span {
        display: none;
    }
}

/* Lightbox */
.ctl-lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.ctl-lightbox-overlay.ctl-lightbox-open {
    display: flex;
}

.ctl-lightbox-content {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ctl-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.ctl-lightbox-content video {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.ctl-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    z-index: 1000000;
    line-height: 1;
    user-select: none;
}

.ctl-lightbox-close:hover {
    color: #ccc;
}
