/* ============================================================
   VN4U Comment Plugin — Frontend Styles
   Khớp với thiết kế trong ảnh mẫu (section Bình Luận)
   ============================================================ */


/* ─── Full-Width Breakout ─────────────────────────────────── */
/*
 * Kỹ thuật: kéo phần tử thoát khỏi container cha (bài viết)
 * bằng cách dùng 100vw + âm margin = full browser width.
 * Hoạt động với mọi theme WordPress.
 */
.vn4u-comments-wrap {
    font-family: inherit;
    /* Kế thừa font của website, không ghi đè */
    color: #2d2d2d;

    /* ── Full-bleed breakout ── */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;

    /* ── Nền & khoảng cách ── */
    background: #ffffff;
    padding: 52px 20px 60px;
    box-sizing: border-box;

    /* ── Border phân tách ── */
    margin-top: 48px;
    margin-bottom: 0;
}

/* Wrapper bên trong — giới hạn độ rộng để không bị quá to trên màn hình lớn */
.vn4u-comments-inner {
    max-width: 1250px;
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* ─── Header "BÌNH LUẬN" ──────────────────────────────────── */
.vn4u-comments-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 40px;
    padding: 0 0 24px;
}

.vn4u-header-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, transparent, #c99a60);
    max-width: 160px;
}

.vn4u-header-line:last-child {
    background: linear-gradient(to left, transparent, #c99a60);
}

.vn4u-comments-title {
    font-size: 26px !important;
    font-weight: 800 !important;
    letter-spacing: 5px;
    color: #c0392b !important;
    text-transform: uppercase;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap;
    border: none !important;
    text-align: center;
    line-height: 1.2 !important;
}

/* ─── Comment List ────────────────────────────────────────── */
.vn4u-comments-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ─── Single Comment Item ─────────────────────────────────── */
.vn4u-comment-item {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ─── Main Comment Row ────────────────────────────────────── */
.vn4u-comment-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

/* ─── Avatar ──────────────────────────────────────────────── */
.vn4u-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    letter-spacing: 0.5px;
    line-height: 1;
    /* Subtle shadow để nổi bật avatar */
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.vn4u-avatar--admin {
    width: 36px;
    height: 36px;
    font-size: 13px;
}

/* Avatar dùng ảnh thật (<img>) thay vì initials (<div>) */
.vn4u-avatar--img {
    object-fit: cover;
    display: block !important;
    background: transparent;
    font-size: 0;
    padding: 0;
    line-height: 1;
}

/* ─── Comment Body ────────────────────────────────────────── */
.vn4u-comment-body {
    flex: 1;
    min-width: 0;
}

.vn4u-customer-name {
    font-weight: 700;
    font-size: 15px;
    color: #1d1d1d;
    margin-bottom: 2px;
    line-height: 1.3;
}

.vn4u-customer-label {
    font-size: 12px;
    color: #e74c3c;
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.vn4u-customer-icon {
    font-size: 11px;
}

.vn4u-comment-text {
    font-size: 14px;
    line-height: 1.7;
    color: #3d3d3d;
    margin-bottom: 8px;
}

/* ─── Tag ─────────────────────────────────────────────────── */
.vn4u-tag {
    font-size: 12px;
    color: #777;
    font-style: italic;
}

.vn4u-tag-label {
    font-weight: 600;
    color: #555;
    font-style: normal;
    margin-right: 2px;
}

/* ─── Admin Reply ─────────────────────────────────────────── */
.vn4u-reply-wrap {
    margin-top: 12px;
    margin-left: 58px;
    /* indent = avatar width (44) + gap (14) */
    padding-left: 16px;
    border-left: 3px solid #e8e8e8;
}

.vn4u-reply-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.vn4u-reply-body {
    flex: 1;
    min-width: 0;
}

.vn4u-reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.vn4u-admin-name {
    font-weight: 700;
    font-size: 14px;
    color: #1d1d1d;
}

.vn4u-admin-badge {
    display: inline-block;
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.vn4u-reply-text {
    font-size: 14px;
    line-height: 1.7;
    color: #3d3d3d;
}

/* ─── Separator between comments ──────────────────────────── */
.vn4u-comment-item+.vn4u-comment-item {
    padding-top: 28px;
    border-top: 1px solid #f0f0f0;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {

    .vn4u-comments-title {
        font-size: 18px !important;
        letter-spacing: 2px;
    }

    .vn4u-avatar {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }

    .vn4u-reply-wrap {
        margin-left: 20px;
    }

    .vn4u-comment-text,
    .vn4u-reply-text {
        font-size: 13px;
    }

    .vn4u-customer-name {
        font-size: 14px;
    }

    .vn4u-header-line {
        max-width: 60px;
    }
}