:root {
    --fb-border-color: #e0e0e0;
    --fb-bg-light: #f0f2f5
}

.fb-post-tags .tag-link {
    color: #1d71a8; /* Màu chữ cho tag */
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 4px;
    background-color: transparent;
    transition: background-color 0.2s;
}

.fb-post-tags .tag-link:hover {
    background-color: #f0f2f5; /* Màu nền khi di chuột qua */
    text-decoration: underline;
}


.fb-post-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
    padding: 16px;
    margin-bottom: 30px;
    border: 1px solid var(--fb-border-color)
}

.fb-post-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px
}

.fb-post-header .avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    margin-right: 10px
}

.fb-post-header .meta {
    font-size: 14px;
    line-height: 1.3
}

.fb-post-header .meta strong {
    font-weight: 600
}
.ql-editor p img {
    width: 40%;
}
.comment-text p img {
    display: block;
    width: 30%;
}
.comment-images-container {
    display: flex;
    flex-wrap: wrap; /* nhiều ảnh xuống hàng nếu quá dài */
    gap: 8px; /* khoảng cách giữa các ảnh */
    margin-top: 8px;
}

.comment-image-wrapper {
    position: relative;
    width: 100px; /* độ rộng cố định cho thumbnail */
    height: 100px;
    border-radius: 5px;
    overflow: hidden;
    flex-shrink: 0;
}

.comment-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.comment-image-wrapper .remove-image {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    padding: 2px 5px;
    cursor: pointer;
    font-weight: bold;
    color: #ff0000;
    z-index: 10;
}

.fb-post-header .meta .time {
    color: #888;
    font-size: 13px
}

.fb-post-content {
    font-size: 15px;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.5
}

.fb-post-content p:last-child {
    margin-bottom: 0
}

.fb-post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 10px
}

.fb-post-interaction-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    margin: 8px 0;
    color: #606770;
    border-top: 1px solid var(--fb-border-color);
    border-bottom: 1px solid var(--fb-border-color)
}

.fb-post-actions {
    display: flex;
    font-weight: 600
}

.fb-post-actions span {
    width: 130px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    flex: 1;
    text-align: center;
    transition: background-color .2s
}

.fb-post-actions span:hover {
    background-color: var(--fb-bg-light)
}

.fb-post-actions .fa-regular,
.fb-post-stats .fa-regular,
.fb-post-actions .fa-solid,
.fb-post-stats .fa-solid {
    margin-right: 6px
}


.fb-post-stats {
    display: flex;
    gap: 15px;
    font-size: 14px;
    align-items: center;
    color: #65676b
}

.fb-post-comments-wrapper {
    margin-top: 12px
}

.view-more-comments {
    color: #1877f2;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 0;
    text-align: left
}

.view-more-comments:hover {
    text-decoration: underline
}

.comment-wrapper {
    margin-top: 12px
}

.comment-level-1 {
    margin-left: 50px
}
.comment-level-2,.comment-level-3, .comment-level-4 {
    margin-left: 90px;
}

.comment-card {
    display: flex;
    gap: 10px;
    align-items: flex-start
}

.comment-card .avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%
}

.comment-card .comment-content {
    background: var(--fb-bg-light);
    border-radius: 18px;
    padding: 8px 12px;
    width: 100%
}

.comment-card .comment-author {
        font-weight: bolder;
    font-size: 13px;
    margin-bottom: 2px
}

.comment-card .comment-text {
    font-size: 14px;
    color: #050505;
    word-wrap: break-word
}

.comment-card .comment-text p {
    margin: 0
}

.comment-card .comment-meta {
    font-size: 12px;
    color: #65676b;
    margin-top: 4px;
    font-weight: 400
}

.comment-card .comment-meta span {
    cursor: pointer;
    margin-right: 12px
}

.comment-card .comment-meta span.comment-action-reply,
.comment-card .comment-meta span.comment-action-like {
    font-weight: 600
}

.comment-card .comment-meta span:not(.comment-time):hover {
    text-decoration: underline
}

.comment-replies {
    padding-top: 8px
}

.view-more-replies {
    font-size: 13px;
    font-weight: 600;
    color: #65676b;
    cursor: pointer
}

.view-more-replies i {
    margin-right: 5px;
    font-size: 11px;
    display: inline-block
}

.comment-form-wrapper {
    display: flex;
    gap: 10px;
    margin-top: 10px
}

.comment-form-wrapper .avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%
}

.comment-form {
    margin: 0 !important;
    flex: 1
}

.ql-toolbar {
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important
}

.ql-container {
    border-bottom-left-radius: 8px !important;
    border-bottom-right-radius: 8px !important
}

.quill-editor {
    background: #fff;
    min-height: 80px;
    height: 100px;
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px
}

.submit-btn {
    background-color: #1b74e4;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s
}

.submit-btn:hover {
    background-color: #155cb4
}

.submit-btn:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed
}

.login-to-comment {
    text-align: center;
    padding: 15px;
    background: var(--fb-bg-light);
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px
}

.like-toggle {
    cursor: pointer;
    transition: color 0.3s ease;
}

.fb-post-stats.mobile {
    display: none;
}


@media (max-width: 768px) {
    .fb-post-stats.mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 8px 0px;
    }

    .fb-post-interaction-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .fb-post-stats.pc {
        display: none;
    }

}

/* === CSS CHO TRANG HỒ SƠ TÁC GIẢ (SINGLE.PHP) === */
.facebook-profile-page .row-large .large-3 { display: none; }
.facebook-profile-page .row-large .large-9 { max-width: 100%; flex-basis: 100%; }

#author-profile-container { max-width: 900px; margin: 20px auto; }
.author-profile-header { background-color: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.1); margin-bottom: 20px; overflow: hidden; }
.author-cover { height: 350px; background-size: cover; background-position: center center; border-bottom: 1px solid #ddd; }
.author-meta-bar { padding: 0 30px; display: flex; align-items: flex-end; transform: translateY(-50px); margin-bottom: -50px; }
.author-avatar { width: 170px; height: 170px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 10px rgba(0,0,0,.2); margin-right: 20px; overflow: hidden; background-color: #f0f2f5; flex-shrink: 0; }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-info { padding-bottom: 15px; }
.author-info h1 { margin: 0 0 5px 0; font-size: 28px; font-weight: 700; color: #000;  }
.author-info p { margin: 0; color: #fff; font-size: 15px; }
.author-posts-feed .feed-header { background-color: #fff; border-radius: 8px; padding: 10px 15px; margin-bottom: 15px; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.author-posts-feed .feed-header h3 { margin: 0; font-size: 18px; }
.feed-divider { height: 1px; background-color: #e0e0e0; margin: 25px 0; }
.post-title-link { text-decoration: none; color: inherit; }
.post-title-link:hover .post-title { text-decoration: underline; }
a.author-link { color: inherit; text-decoration: none; }
a.author-link:hover { text-decoration: underline; }
/* ================================================================ */
/* === CSS CHO TRANG HỒ SƠ TÁC GIẢ (SINGLE.PHP) - PHIÊN BẢN 2.0 === */
/* ================================================================ */

/* --- Cấu trúc chung --- */
#author-profile-container {
    max-width: 1050px; /* Rộng hơn một chút */
    margin: 0 auto;
    padding: 0 15px; /* Thêm padding cho di động */
}

/* --- Header Profile --- */
.author-profile-header {
    background-color: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,.1);
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-top: none;
}
.author-cover {
    height: 380px;
    background-size: cover;
    background-position: center center;
}
.author-meta-bar {
    padding: 0 30px;
}
.profile-header-bottom {
    display: flex;
    align-items: flex-end;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    transform: translateY(-30px);
    margin-bottom: -30px;
}
.author-avatar {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 0 10px rgba(0,0,0,.2);
    margin-right: 20px;
    overflow: hidden;
    background-color: #f0f2f5;
    flex-shrink: 0;
}
.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.author-info-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.author-info h1 {
    margin: 0 0 2px 0;
    font-size: 32px;
    font-weight: 700;
}
.author-info .post-count {
    color: #65676b;
    font-weight: 600;
    margin: 0;
}

/* --- Thanh Điều Hướng Profile --- */
.profile-nav-bar ul {
    list-style: none;
    margin: 0;
    padding: 5px 0;
    display: flex;
    gap: 10px;
}
.profile-nav-bar a {
    display: block;
    padding: 12px 18px;
    border-radius: 6px;
    color: #65676b;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s;
}
.profile-nav-bar a:hover {
    background-color: #f0f2f5;
}
.profile-nav-bar a.active {
    color: #1877f2;
    border-bottom: 3px solid #1877f2;
    border-radius: 0;
}

/* --- Body Profile (Bố cục 2 cột) --- */
.profile-body-content {
    display: flex;
    gap: 20px;
}
.profile-sidebar-left {
    flex: 0 0 380px; /* Cố định chiều rộng cột trái */
}
.profile-feed-right {
    flex: 1 1 auto; /* Cột phải sẽ co giãn */
    min-width: 0; /* Ngăn chặn flex item bị tràn */
}

/* --- Widget ở Sidebar Trái --- */
.profile-widget {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 2px rgba(0,0,0,.1);
    margin-bottom: 20px;
    border: 1px solid #ddd;
}
.profile-widget h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
}
.profile-widget .author-bio {
    text-align: center;
    margin-bottom: 15px;
    font-size: 15px;
    color: #333;
}
.profile-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.profile-widget ul li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #333;
    margin-bottom: 10px;
    font-size: 15px;
}
.profile-widget ul li i {
    color: #888;
    width: 20px;
    text-align: center;
}

.feed-divider {
    display: none; /* Không cần đường kẻ này nữa */
}

/* --- Responsive cho Di động --- */
@media (max-width: 992px) {
    .profile-body-content {
        flex-direction: column;
    }
    .profile-sidebar-left {
        flex: 1 1 auto; /* Reset flex-basis */
    }
    .author-cover {
        height: 250px;
    }
    .author-info h1 {
        font-size: 24px;
    }
}
@media (max-width: 768px) {
    .profile-header-bottom {
display: contents;
        flex-direction: column;
        align-items: center;
        text-align: center;
        transform: translateY(0);
        margin-bottom: 0;
              position: relative;
    }

    .author-info-actions {
        margin-top: 60px;
        flex-direction: column;
        gap: 15px;
    }
    .profile-nav-bar {
        justify-content: center;
    }
}
/* === CSS CHO POPUP ĐĂNG NHẬP === */
#tmsc-login-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#tmsc-login-popup .popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

#tmsc-login-popup .popup-content {
    position: relative;
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
    z-index: 1;
    animation: popup-fade-in 0.3s ease-out;
}

@keyframes popup-fade-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#tmsc-login-popup .popup-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
    padding: 0;
}
#tmsc-login-popup .popup-close-btn:hover {
    color: #333;
}
#the-comment-list td.comment img {
    max-width: 15%;
}
#tmsc-login-popup h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 24px;
    color: #1c1e21;
}

#tmsc-login-popup p {
    margin-bottom: 25px;
    font-size: 16px;
    color: #65676b;
}
.ql-toolbar.ql-snow+.ql-container.ql-snow {
    height: auto;
    min-height: 100px;
    max-height: 500px;
    overflow-y: auto;
    border-top: 0;
}
#tmsc-login-popup .popup-login-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    background-color: #1877f2;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#tmsc-login-popup .popup-login-btn:hover {
    background-color: #166fe5;
}
@media (max-width: 767px) {
.fb-post-actions span {
    font-size: 12px;
}
  .author-avatar {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, .2);
    margin-right: 20px;
    overflow: hidden;
    background-color: #f0f2f5;
    flex-shrink: 0;
}
.author-info h1 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 700;
    color: #2a2a2a;
}
}