/* CSS Styling */
.layout_padding {
  padding-top: 20px;
  padding-bottom: 30px;
}

.work-card {
    display: flex !important;
    align-items: flex-start;
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
    transition: all 0.2s;
}

/* ปรับตำแหน่ง Checkbox ให้ตรงกับชื่อเรื่อง */
.work-card .custom-control {
    margin-top: 2px;
    z-index: 5;
}

/* เมื่อติ๊กเลือก ให้เปลี่ยนสีพื้นหลังเหมือน Gmail */
.work-card.selected-bg {
    background-color: #e8f0fe !important;
}

.work-card:hover {
    background-color: #f8f9fa;
}

.work-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #007bff;
  text-decoration: none;
}

.work-title:hover {
  color: #0056b3;
  text-decoration: underline;
}

.user-avatar-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ddd;
  margin-right: 5px;
  vertical-align: middle;
}

/* Scrollbox for Sidebar */
.filter-scroll-box {
  max-height: 150px;
  overflow-y: auto;
  padding-right: 5px;
}

.filter-scroll-box::-webkit-scrollbar {
  width: 4px;
}

.filter-scroll-box::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

/* Horizontal Pills */
.blog-filter-container {
  overflow-x: auto;
  white-space: nowrap;
  margin-bottom: 20px;
  padding: 5px 0;
  -webkit-overflow-scrolling: touch;
}

.blog-filter-container::-webkit-scrollbar {
  height: 4px;
}

.blog-filter-container::-webkit-scrollbar-thumb {
  background: #e0e0e0;
  border-radius: 4px;
}

.blog-filters {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
  justify-content: center;
  width: 100%;
}

.blog-filters li {
  display: inline-block;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 50px;
  padding: 8px 20px;
  margin-right: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #555;
  font-weight: 500;
  transition: all 0.2s;
}

.blog-filters li:hover {
  background-color: #f8f9fa;
  border-color: #ccc;
}

.blog-filters li.active {
  background-color: #ffc107;
  color: #fff;
  border-color: #ffc107;
  box-shadow: 0 4px 6px rgba(255, 193, 7, 0.25);
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.pagination {
  display: inline-flex;
  border-radius: 50px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  padding: 5px 10px;
}

.page-item {
  margin: 0 3px;
  list-style: none;
}

.page-link {
  border: none;
  color: #666;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  text-decoration: none !important;
  transition: 0.2s;
}

.page-link:hover {
  background-color: #f0f0f0;
  color: #333;
}

.page-item.active .page-link {
  background-color: #6f42c1;
  color: #fff;
  box-shadow: 0 3px 8px rgba(111, 66, 193, 0.3);
}

.page-item.disabled .page-link {
  color: #ddd;
  cursor: not-allowed;
}

/* #loadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
} */

.spinner-border {
  width: 3rem;
  height: 3rem;
}

/* --- Premier League Style Table --- */
.league-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.league-header {
  background: #38003c; /* สีม่วงพรีเมียร์ลีก */
  color: #fff;
  padding: 12px 15px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.league-table {
  width: 100%;
  font-size: 0.8rem;
  border-collapse: collapse;
}
.league-table th {
  background-color: #f8f9fa;
  color: #666;
  padding: 8px 4px;
  text-align: center;
  font-weight: 600;
  font-size: 0.75rem;
}
.league-table td {
  padding: 8px 4px;
  text-align: center;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}
.league-table td.name-col {
  text-align: left;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
}
.league-table tr:last-child td {
  border-bottom: none;
}

/* Rank Colors (แถบสีด้านซ้าย) */
.rank-pos {
  width: 4px;
  height: 100%;
  display: inline-block;
  margin-right: 6px;
  border-radius: 2px;
}
/* อันดับ 1 (แชมป์) */
.row-rank-1 {
  background-color: #fffbf0;
}
.row-rank-1 .rank-pos {
  background-color: #ffd700;
  height: 25px;
} /* สีทอง */
.trophy-icon {
  color: #ffd700;
  margin-left: 5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* อันดับ 2-5 (UCL - สีเหลือง/ส้ม) */
.row-rank-ucl .rank-pos {
  background-color: #ffc107;
  height: 20px;
}

/* อันดับ 6-10 (Mid - สีม่วง) */
.row-rank-mid .rank-pos {
  background-color: #6f42c1;
  height: 20px;
}

/* ทั่วไป */
.row-normal .rank-pos {
  background-color: #dee2e6;
  height: 20px;
}

/* Icon ขึ้นลง */
.trend-up {
  color: #28a745;
  font-size: 0.7rem;
}
.trend-down {
  color: #dc3545;
  font-size: 0.7rem;
}
.trend-equal {
  color: #adb5bd;
  font-size: 0.7rem;
}
.trend-val {
  font-size: 0.65rem;
  color: #888;
  margin-left: 2px;
}

/* Avatar เล็กๆ */
.league-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 6px;
  object-fit: cover;
  border: 1px solid #ddd;
}

.avatar-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 6px;
  border: 1px solid #ddd;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #f1f3f5;
  color: #adb5bd;
  font-size: 12px;
}
/* ปรับ Dropdown ให้สวยงามบนพื้นหลังสีม่วง */
.league-dropdown-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 0.3);
  font-size: 0.8rem;
  padding: 2px 10px;
}
.league-dropdown-btn:hover,
.league-dropdown-btn:focus {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* =========================================================
   🔥 ส่วนที่เพิ่มใหม่: บังคับ Scrollbar ให้ Modal 
========================================================= */
#workModal .modal-body {
    max-height: 65vh; /* ปรับความสูงสูงสุดไม่เกิน 65% ของจอภาพ */
    overflow-y: auto; /* เปิดใช้งานการเลื่อนแนวตั้ง */
    overflow-x: hidden; /* ป้องกันการเลื่อนแนวนอน */
}

/* ปรับแต่งหน้าตา Scrollbar ให้ดูเรียบเนียนเข้ากับระบบ */
#workModal .modal-body::-webkit-scrollbar {
    width: 6px;
}
#workModal .modal-body::-webkit-scrollbar-track {
    background: #f8f9fa; 
    border-radius: 10px;
}
#workModal .modal-body::-webkit-scrollbar-thumb {
    background: #ced4da; 
    border-radius: 10px;
}
#workModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #adb5bd; 
}

/* =========================================================
   ตกแต่งกล่อง Select2 ให้หน้าตาสวยเนียนเหมือน Bootstrap
========================================================= */
/* ปรับความสูง กรอบ และพื้นหลัง */
#workModal .select2-container--default .select2-selection--single {
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    height: calc(1.5em + 0.75rem + 2px); /* ความสูงมาตรฐาน Bootstrap */
    display: flex;
    align-items: center;
}

/* ปรับตำแหน่งตัวหนังสือข้างใน */
#workModal .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #495057;
    padding-left: 0.75rem;
    line-height: normal;
}

/* ปรับตำแหน่งลูกศรชี้ลง */
#workModal .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 5px;
}

/* เอฟเฟกต์ตอนกดคลิกให้มีแสงสีฟ้าเหมือน Bootstrap */
#workModal .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.custom-control-label::before, .custom-control-label::after {
    top: 0.1rem;
    width: 1.1rem;
    height: 1.1rem;
}

