﻿/* Forum specific styles */
.forum-container {
    margin-top: 30px;
    margin-bottom: 50px;
}

.forum-sidebar {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.forum-sidebar-header {
    background-color: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

    .forum-sidebar-header h5 {
        margin: 0;
        font-weight: 600;
        color: #333;
    }

.forum-categories .list-group-item {
    border-left: none;
    border-right: none;
    padding: 12px 20px;
    transition: all 0.2s;
    cursor: pointer;
}

    .forum-categories .list-group-item.active {
        background-color: #f06424;
        border-color: #f06424;
    }

    .forum-categories .list-group-item:hover:not(.active) {
        background-color: #f8f9fa;
    }

.top-member img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.member-name {
    font-weight: 500;
}

.member-posts {
    font-size: 0.85rem;
    color: #6c757d;
}

.forum-search {
    max-width: 300px;
}

.forum-card {
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

    .forum-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }

.forum-thread-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

    .forum-thread-title a:hover {
        color: #f06424;
    }

.forum-thread-meta {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
}

.meta-author {
    font-weight: 500;
    color: #f06424;
}

.forum-thread-stats {
    display: flex;
    gap: 15px;
}

.views, .comments {
    display: flex;
    flex-direction: column;
    min-width: 60px;
}

.count {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.label {
    font-size: 0.8rem;
    color: #6c757d;
}

.forum-thread-summary {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
}

.pagination .page-link {
    color: #333;
}

.pagination .page-item.active .page-link {
    background-color: #f06424;
    border-color: #f06424;
}

/* Cải thiện ô tìm kiếm - làm dài hơn */
.search-bar.forum-search {
    position: relative;
    width: 100%;
    max-width: 500px; /* Tăng kích thước từ 350px lên 500px */
    transition: max-width 0.3s ease;
}

    .search-bar.forum-search:focus-within {
        max-width: 550px; /* Tăng kích thước từ 400px lên 550px khi focus */
    }

    .search-bar.forum-search .input-search {
        width: 100%;
        padding: 12px 20px;
        padding-right: 45px;
        border-radius: 30px;
        border: 1px solid #ced4da;
        font-size: 0.95rem;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        transition: all 0.3s;
    }

        .search-bar.forum-search .input-search:focus {
            border-color: #f06424;
            box-shadow: 0 0 0 0.25rem rgba(240, 100, 36, 0.25);
        }

    .search-bar.forum-search .search-icon {
        right: 18px;
        top: 50%;
        transform: translateY(-50%);
        color: #6c757d;
        font-size: 1rem;
        transition: color 0.3s;
    }

    .search-bar.forum-search .input-search:focus + .search-icon {
        color: #f06424;
    }

/* Cải thiện nút sắp xếp */
.btn-sort {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    color: #495057;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
}

    .btn-sort:hover, .btn-sort:focus {
        background-color: #f2f2f2;
        border-color: #c1c9d0;
    }

.dropdown-item {
    padding: 10px 20px;
    font-size: 0.95rem;
}

    .dropdown-item:active, .dropdown-item:focus {
        background-color: rgba(240, 100, 36, 0.1);
        color: #495057;
    }

/* Thu ngắn chiều dài nút tạo chủ đề mới */
.btn-custom {
    background-color: #f06424;
    color: white;
    border: none;
    padding: 10px 16px; /* Giảm padding ngang nhưng giữ padding dọc */
    max-width: 140px; /* Giới hạn chiều rộng tối đa */
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.85rem; /* Giảm font-size để text gọn hơn */
    box-shadow: 0 2px 8px rgba(240, 100, 36, 0.3);
    white-space: nowrap; /* Đảm bảo text không bị xuống dòng */
    overflow: hidden; /* Ẩn phần text dư thừa nếu có */
    text-overflow: ellipsis; /* Hiển thị dấu ... nếu text quá dài */
    transition: all 0.3s;
}

    .btn-custom:hover {
        background-color: #e05a1c;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(240, 100, 36, 0.4);
        max-width: 180px; /* Mở rộng khi hover để hiển thị đầy đủ text */
    }

    .btn-custom .bi {
        font-size: 0.85rem; /* Thu nhỏ icon */
    }

/* Cải thiện bố cục và khoảng cách */
.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

/* Cải thiện phân trang */
.pagination {
    margin-top: 2rem;
}

    .pagination .page-item .page-link {
        min-width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        margin: 0 5px;
        font-weight: 500;
        color: #495057;
        border: none;
        background-color: #f8f9fa;
        transition: all 0.3s;
    }

    .pagination .page-item.active .page-link {
        background-color: #f06424;
        color: white;
        box-shadow: 0 2px 8px rgba(240, 100, 36, 0.3);
    }

    .pagination .page-item .page-link:hover {
        background-color: #f2f2f2;
        transform: translateY(-2px);
    }

    .pagination .page-item.active .page-link:hover {
        background-color: #e05a1c;
    }

    .pagination .page-item:first-child .page-link,
    .pagination .page-item:last-child .page-link {
        border-radius: 50%;
    }

    .pagination .page-item.disabled .page-link {
        opacity: 0.5;
        background-color: #f8f9fa;
        color: #6c757d;
    }

/* Điều chỉnh border-radius của ảnh avatar */
.forum-card .rounded-circle,
.top-member img.rounded-circle,
.forum-thread-title img.rounded-circle {
    border-radius: 12px !important; /* Thay thế border-radius từ 50% (tròn hoàn toàn) xuống 12px */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Điều chỉnh kích thước và canh lề cho ảnh avatar để phù hợp với border mới */
.forum-card .rounded-circle {
    object-fit: cover;
}

/* Thiết lập màu sắc khác nhau cho từng loại bài viết */
.meta-category {
    font-weight: 500 !important;
    padding: 4px 10px !important;
    border-radius: 15px !important;
    font-size: 0.75rem !important;
    white-space: nowrap !important;
    display: inline-block !important;
    transition: all 0.3s !important;
}

    /* Hiệu ứng hover cho badge */
    .meta-category:hover {
        transform: translateY(-2px);
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

.forums-table-section .post {
    width: 38px;
    height: 32px;
    margin: auto;
    background: url(../images/topic-type1.png) center no-repeat;
}