/* ============================================================
   Trang danh sách theo Thể loại / "All Mangas" (content-archive.php)
   và trang Tìm truyện / Advanced Search (content-search.php).
   CSS gốc của theme dùng float + margin-left cố định khá cũ, dễ vỡ
   layout khi tên thể loại/tác giả dài - viết lại bằng flex cho chắc.
   ============================================================ */

/* ---------- Lưới thẻ truyện (Thể loại, All Mangas) ---------- */
.page-content-listing .page-listing-item {
    margin-bottom: 4px;
}
.page-content-listing .page-listing-item .page-item-detail {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(20, 20, 30, .08);
    transition: transform .2s ease, box-shadow .2s ease;
    height: calc(100% - 20px);
    margin-bottom: 20px !important;
}
.page-content-listing .page-listing-item .page-item-detail:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(20, 20, 30, .16);
}
/* CSS gốc của theme để ảnh bìa nhỏ 100px nằm bên trái, phần chữ chỉ còn
   lại 1 dải rất hẹp bên phải (dưới 100px ở layout 2 cột) -> tên truyện/
   số chương không đủ chỗ hiển thị, bị cắt trụi chỉ còn 1 chữ cái ("C...").
   Chuyển sang ảnh nằm TRÊN, chữ nằm DƯỚI (dùng full bề ngang thẻ) - theme
   gốc vốn đã có sẵn kiểu này (class "item-big_thumbnail"), ở đây áp dụng
   luôn kiểu đó cho toàn bộ layout thay vì phải đổi cấu hình PHP. */
.page-content-listing .page-listing-item .page-item-detail .item-thumb {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}
.page-content-listing .page-listing-item .page-item-detail .item-summary {
    width: 100% !important;
    float: none !important;
    padding: 12px 14px 16px;
}
.page-content-listing .page-listing-item .page-item-detail .item-summary .post-title {
    margin: 0 0 6px;
}
.page-content-listing .page-listing-item .page-item-detail .item-summary .post-title h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.35;
    /* Cố định 2 dòng dù tên ngắn hay dài, để phần tác giả/sao/chương bên
       dưới luôn thẳng hàng nhau giữa các thẻ, không bị lệch cao thấp. */
    min-height: calc(1.35em * 2);
}
.page-content-listing .page-listing-item .page-item-detail .item-summary .post-title a {
    color: #23262b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.page-content-listing .page-listing-item .page-item-detail .item-summary .post-title a:hover {
    color: #e88a00;
}
.page-content-listing .page-listing-item .page-item-detail .item-summary .author.meta {
    font-size: 12px;
    color: #909499;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.page-content-listing .page-listing-item .page-item-detail .item-summary .meta-item.rating {
    font-size: 12px;
    color: #cfd2d7;
    margin-bottom: 8px;
}
.page-content-listing .page-listing-item .page-item-detail .item-summary .meta-item.rating .score {
    color: #b7bac0;
    font-size: 12px;
}

/* Badge "Chương x" bên dưới thẻ - CSS gốc giới hạn max-width:60% +
   line-clamp:1 khiến tên chương dài bị cắt còn mỗi 1 chữ cái ("C...").
   Bỏ giới hạn, cho chữ tự co giãn theo bề rộng thẻ. */
.page-content-listing .page-listing-item .page-item-detail .item-summary .list-chapter .chapter-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px !important;
}
.page-content-listing .page-listing-item .page-item-detail .item-summary .list-chapter .chapter-item .chapter {
    max-width: 100% !important;
    background: #f5f6f8;
    font-size: 12px;
}
.page-content-listing .page-listing-item .page-item-detail .item-summary .list-chapter .chapter-item .chapter a {
    -webkit-line-clamp: unset !important;
    display: inline !important;
    white-space: nowrap;
}
.page-content-listing .page-listing-item .page-item-detail .item-summary .list-chapter .chapter-item .post-on {
    font-size: 11px;
    color: #b0b3b8;
}

/* ---------- Trang Tìm truyện / Advanced Search ---------- */
body.search .search-wrap .tab-content-wrap .c-tabs-item .c-tabs-item__content {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(20, 20, 30, .08);
    padding: 16px;
    margin-bottom: 16px !important;
    transition: box-shadow .2s ease;
}
body.search .search-wrap .tab-content-wrap .c-tabs-item .c-tabs-item__content:hover {
    box-shadow: 0 4px 14px rgba(20, 20, 30, .14);
}
body.search .search-wrap .tab-content-wrap .c-tabs-item .c-tabs-item__content .tab-thumb img {
    border-radius: 8px;
}
body.search .search-wrap .tab-content-wrap .c-tabs-item .c-tabs-item__content .tab-summary .post-title h3,
body.search .search-wrap .tab-content-wrap .c-tabs-item .c-tabs-item__content .tab-summary .post-title h4 {
    margin: 0 0 10px;
    font-size: 17px;
}
body.search .search-wrap .tab-content-wrap .c-tabs-item .c-tabs-item__content .tab-summary .post-title a {
    color: #23262b;
}
body.search .search-wrap .tab-content-wrap .c-tabs-item .c-tabs-item__content .tab-summary .post-title a:hover {
    color: #e88a00;
}

/* Khối Authors/Genres/Status: CSS gốc dùng float + margin-left:95px cố
   định cho item cuối, dễ đè lên tiêu đề khi nội dung dài (đúng lỗi thấy
   trong ảnh). Bỏ hết float, chuyển thành các dòng label:value đơn giản,
   luôn nằm gọn bên dưới tiêu đề. */
body.search .search-wrap .tab-content-wrap .c-tabs-item .c-tabs-item__content .tab-summary .post-content {
    background: #f8f9fb;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}
body.search .search-wrap .tab-content-wrap .c-tabs-item .c-tabs-item__content .tab-summary .post-content .post-content_item {
    float: none !important;
    display: flex !important;
    width: 100% !important;
    margin: 0 0 6px 0 !important;
    font-size: 13px;
}
body.search .search-wrap .tab-content-wrap .c-tabs-item .c-tabs-item__content .tab-summary .post-content .post-content_item:last-child {
    margin-bottom: 0 !important;
}
body.search .search-wrap .tab-content-wrap .c-tabs-item .c-tabs-item__content .tab-summary .post-content .post-content_item .summary-heading {
    width: 100px !important;
    flex-shrink: 0;
}
body.search .search-wrap .tab-content-wrap .c-tabs-item .c-tabs-item__content .tab-summary .post-content .post-content_item .summary-heading h5 {
    margin: 0;
    font-weight: 600;
    color: #909499;
    font-size: 13px;
}
body.search .search-wrap .tab-content-wrap .c-tabs-item .c-tabs-item__content .tab-summary .post-content .post-content_item .summary-content {
    width: auto !important;
    flex: 1;
    color: #333;
}

body.search .search-wrap .tab-content-wrap .c-tabs-item .c-tabs-item__content .tab-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
body.search .search-wrap .tab-content-wrap .c-tabs-item .c-tabs-item__content .tab-meta .meta-item.latest-chap .chapter a {
    color: #e88a00;
    font-weight: 600;
}
body.search .search-wrap .tab-content-wrap .c-tabs-item .c-tabs-item__content .tab-meta .meta-item.post-on {
    color: #909499;
}
body.search .search-wrap .tab-content-wrap .c-tabs-item .c-tabs-item__content .tab-meta .meta-item.rating {
    color: #cfd2d7;
    font-size: 12px;
}
