/*
Theme Name: Newspaper Child
Theme URI: https://example.com/
Description: Child theme kế thừa Newspaper
Author: Hong Nhung
Author URI: https://example.com/
Template: Newspaper
Version: 1.0.0
Text Domain: newspaper-child
*/

/* --- Bạn có thể thêm CSS tuỳ chỉnh bên dưới --- */
@import url("../Newspaper/style.css");

.top-news {
  border-bottom: 1px solid #ddd;
  font-family: "Roboto", sans-serif;
}

.top-news .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 15px;
  display: flex;
  align-items: center;
}

.ticker {
  display: flex;
  align-items: center;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.news-head {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  background-color: #dd0000;
  padding: 7px 15px;
  border-radius: 2px;
  margin-right: 10px;
  white-space: nowrap;
  flex-shrink: 0;
  z-index: 1;
}

.news-head i {
  margin-left: 6px;
}

#hongnhung {
  list-style: none;
  animation: tickerMove 80s linear infinite;
  margin: 0;
  padding: 0;
  display: flex;
  white-space: nowrap;
  will-change: transform;
  backface-visibility: hidden;
  justify-content: center;
}

#hongnhung:hover {
  animation-play-state: paused;
}

#hongnhung li {
  white-space: nowrap;
  margin-right: 30px;
  margin-bottom: 0px !important;
}

#hongnhung li a {
  text-decoration: none;
  color: #333;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.3s ease;
}

#hongnhung li a:hover {
  color: #dd0000;
}

@keyframes tickerMove {
  0% {
    transform: translateX(0%);
  }

  100% {
    transform: translateX(-50%);
  }
}

@media (max-width: 380px) {
  .news-head {
    font-size: 11px;
    padding: 5px 10px;
  }

  #hongnhung li a {
    font-size: 13px;
  }
}

/* ==========================================
   Download Manager - Table Layout Styles
   ========================================== */

.wpdm-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wpdm-downloads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}

/* Table Header */
.wpdm-downloads-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.wpdm-table-header {
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.wpdm-table-header--index {
  width: 60px;
  text-align: center;
}

.wpdm-table-header--icon {
  width: 250px;
  text-align: center;
}

.wpdm-table-header--title {
  min-width: 250px;
}

.wpdm-table-header--category {
  width: 150px;
}

.wpdm-table-header--date {
  width: 120px;
  text-align: center;
}

.wpdm-table-header--download {
  width: 100px;
  text-align: center;
}

/* Table Body */
.wpdm-downloads-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.wpdm-downloads-table tbody tr:hover {
  background-color: #f8f9fa;
}

.wpdm-downloads-table tbody tr:last-child {
  border-bottom: none;
}

.wpdm-table-cell {
  padding: 15px;
  vertical-align: middle;
  color: #495057;
}

.wpdm-table-cell--index {
  text-align: center;
  font-weight: 500;
  color: #6c757d;
}

.wpdm-table-cell--icon {
  text-align: center;
}

.wpdm-file-icon {
  width: 40px;
  height: 40px;
  display: inline-block;
}

.wpdm-table-cell--title {
  font-size: 14px;
}

.wpdm-table-cell--title strong {
  color: #212529;
  font-weight: 500;
}

.wpdm-file-count {
  color: #6c757d;
  font-size: 12px;
  margin-left: 5px;
}

.wpdm-table-cell--category {
  color: #6c757d;
}

.wpdm-table-cell--date {
  text-align: center;
  color: #6c757d;
}

.wpdm-table-cell--download {
  text-align: center;
}

.wpdm-download-link {
  display: inline-block;
  padding: 4px 12px;
  background-color: #fff;
  color: #007bff !important;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.wpdm-download-link:hover {
  background-color: #f0f0f0;
  color: #0056b3 !important;
  text-decoration: none;
}

.wpdm-no-downloads {
  padding: 40px 20px;
  text-align: center;
  color: #6c757d;
  font-size: 14px;
}

/* ==========================================
   WPDM SIDEBAR FILTER STYLES (BEM)
   ==========================================

   Component: Sidebar menu để filter downloads theo category
   Shortcode: [wpdm_sidebar_filter]
   BEM Structure:
   - Block: .wpdm-sidebar-filter
   - Element: .wpdm-sidebar-filter__title, __list, __item, __link, __name, __count
   - Modifier: .wpdm-sidebar-filter__item--active (khi category được chọn)

   ========================================== */

/* Block: Main wrapper container */
.wpdm-sidebar-filter,
.post-category-filter {
  background: #fff;
  /* Nền trắng */
  /* border: 1px solid #e0e0e0; */
  /* Border màu xám nhạt */
  border-radius: 8px;
  /* Bo góc mềm mại */
  padding: 20px;
  /* Padding bên trong */
  margin-bottom: 20px;
  /* Khoảng cách với element phía dưới */
  box-shadow: rgba(99, 99, 99, 0.2) 0px 0px 9px 0px;
  /* Shadow nhẹ */
}

/* Element: Tiêu đề sidebar (h3) */
.wpdm-sidebar-filter__title,
.post-category-filter__title {
  font-size: 18px;
  /* Size chữ lớn hơn nội dung */
  font-weight: 600;
  /* Semi-bold */
  color: #333;
  /* Màu chữ đậm */
  margin: 0 0 15px 0;
  /* Margin bottom 15px */
  padding-bottom: 10px;
  /* Padding bottom để tách với border */
  border-bottom: 2px solid #d32f2f;
  /* Border dưới màu xanh WordPress */
}

/* Element: Danh sách categories (<ul>) */
.wpdm-sidebar-filter__list,
.post-category-filter__list {
  list-style: none;
  /* Xóa bullet points */
  margin: 0;
  /* Reset margin */
  padding: 0;
  /* Reset padding */
}

/* Element: Mỗi category item (<li>) */
.wpdm-sidebar-filter__item,
.post-category-filter__item {
  margin: 0;
  /* Reset margin */
  padding: 0;
  /* Reset padding */
  border-bottom: 1px solid #f0f0f0;
  /* Border ngăn cách giữa các items */
}

/* Element: Item cuối cùng không cần border */
.wpdm-sidebar-filter__item:last-child,
.post-category-filter__item:last-child {
  border-bottom: none;
}

/* Element: Link của category (<a>) */
.wpdm-sidebar-filter__link,
.post-category-filter__link {
  display: flex;
  /* Flexbox để align name và count */
  justify-content: space-between;
  /* Name ở trái, count ở phải */
  align-items: center;
  /* Vertical align center */
  padding: 12px 15px;
  /* Padding để dễ click */
  color: #555;
  /* Màu chữ xám */
  text-decoration: none;
  /* Không gạch chân */
  transition: all 0.3s ease;
  /* Smooth transition khi hover */
  border-left: 3px solid transparent;
  /* Border trái (transparent khi không active) */
}

/* Hover state của link */
.wpdm-sidebar-filter__link:hover,
.post-category-filter__link:hover {
  background-color: #f8f9fa;
  /* Nền xám nhạt khi hover */
  color: #d32f2f;
  /* Chữ chuyển sang xanh WordPress */
  border-left-color: #d32f2f;
  /* Border trái chuyển sang xanh */
  text-decoration: none;
  /* Không gạch chân khi hover */
}

/* Element: Tên category */
.wpdm-sidebar-filter__name,
.post-category-filter__name {
  font-size: 14px;
  /* Size chữ standard */
  font-weight: 400;
  /* Normal weight */
  flex: 1;
  /* Chiếm hết không gian còn lại */
}

/* Element: Số lượng files (badge) */
.wpdm-sidebar-filter__count,
.post-category-filter__count {
  font-size: 12px;
  /* Chữ nhỏ hơn name */
  color: #999;
  /* Màu xám nhạt */
  background: #f5f5f5;
  /* Nền xám rất nhạt */
  padding: 2px 8px;
  /* Padding cho badge */
  border-radius: 12px;
  /* Bo tròn như pill */
  margin-left: 8px;
  /* Khoảng cách với name */
}

/* ==========================================
   MODIFIER: ACTIVE STATE
   Khi category đang được filter/chọn
   ========================================== */

/* Link của item đang active */
.wpdm-sidebar-filter__item--active .wpdm-sidebar-filter__link,
.post-category-filter__item--active .post-category-filter__link {
  background-color: #e7f3f8;
  /* Nền xanh nhạt */
  color: #d32f2f;
  /* Chữ màu xanh WordPress */
  font-weight: 600;
  /* Chữ đậm hơn */
  border-left-color: #d32f2f;
  /* Border trái màu xanh */
}

/* Count badge của item đang active */
.wpdm-sidebar-filter__item--active .wpdm-sidebar-filter__count,
.post-category-filter__item--active .post-category-filter__count {
  background: #0073aa;
  /* Nền xanh đậm */
  color: #fff;
  /* Chữ trắng */
}

/* Hover effect cho item đang active */
.wpdm-sidebar-filter__item--active .wpdm-sidebar-filter__link:hover,
.post-category-filter__item--active .post-category-filter__link:hover {
  background-color: #d4ebf5;
  /* Nền xanh đậm hơn khi hover */
}

/* ==========================================
   MOBILE DROPDOWN STYLES
   ========================================== */

/* Button toggle - chỉ hiển thị trên mobile */
.post-category-filter__toggle {
  display: none;
  /* Ẩn trên desktop */
  width: 100%;
  padding: 12px 15px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  transition: all 0.3s ease;
}

.post-category-filter__toggle:hover {
  background: #f8f9fa;
  border-color: #d32f2f;
}

.post-category-filter__toggle--active {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
}

.post-category-filter__toggle-icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.post-category-filter__toggle--active .post-category-filter__toggle-icon {
  transform: rotate(180deg);
}

.post-category-filter__toggle-text {
  flex: 1;
}

/* Desktop: Ẩn button, hiển thị sidebar bình thường */
@media (min-width: 769px) {
  .post-category-filter__toggle {
    display: none !important;
  }

  .post-category-filter__list {
    display: block !important;
  }
}

/* Mobile: Hiển thị button, ẩn list mặc định */
@media (max-width: 768px) {
  .post-category-filter {
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
  }

  .post-category-filter__toggle {
    display: flex;
  }

  .post-category-filter__title {
    display: none;
    /* Ẩn title trên mobile, dùng button text thay thế */
  }

  .post-category-filter__list {
    display: none;
    /* Ẩn mặc định */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fff;
    border-top: 1px solid #e0e0e0;
  }

  .post-category-filter__list--open {
    display: block;
    max-height: 500px;
    /* Đủ lớn để hiển thị danh sách */
    overflow-y: auto;
    margin-bottom: 10px !important;
  }

  .post-category-filter__item {
    border: none !important;
  }
}

/* ==========================================
   WPDM SIDEBAR FILTER: MOBILE DROPDOWN STYLES
   ========================================== */

/* Button toggle - chỉ hiển thị trên mobile */
.wpdm-sidebar-filter__toggle {
  display: none;
  /* Ẩn trên desktop */
  width: 100%;
  padding: 12px 15px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  transition: all 0.3s ease;
}

.wpdm-sidebar-filter__toggle:hover {
  background: #f8f9fa;
  border-color: #d32f2f;
}

.wpdm-sidebar-filter__toggle--active {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
}

.wpdm-sidebar-filter__toggle-icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.wpdm-sidebar-filter__toggle--active .wpdm-sidebar-filter__toggle-icon {
  transform: rotate(180deg);
}

.wpdm-sidebar-filter__toggle-text {
  flex: 1;
}

/* Desktop: Ẩn button, hiển thị sidebar bình thường */
@media (min-width: 769px) {
  .wpdm-sidebar-filter__toggle {
    display: none !important;
  }

  .wpdm-sidebar-filter__list {
    display: block !important;
  }
}

/* Mobile: Hiển thị button, ẩn list mặc định */
@media (max-width: 768px) {
  .wpdm-sidebar-filter {
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
  }

  .wpdm-sidebar-filter__toggle {
    display: flex;
  }

  .wpdm-sidebar-filter__title {
    display: none;
    /* Ẩn title trên mobile, dùng button text thay thế */
  }

  .wpdm-sidebar-filter__list {
    display: none;
    /* Ẩn mặc định */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fff;
    border-top: 1px solid #e0e0e0;
  }

  .wpdm-sidebar-filter__list--open {
    display: block;
    max-height: 500px;
    /* Đủ lớn để hiển thị danh sách */
    overflow-y: auto;
    margin-bottom: 10px !important;
  }

  .wpdm-sidebar-filter__item {
    border: none !important;
  }
}

/* Post List Horizontal Layout */
.post-list--horizontal {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* Post Item - Horizontal Row */
.post-list__item--horizontal {
  display: flex;
  gap: 1.5rem;
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  position: relative;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 0px 9px 0px;
}

.post-list--horizontal .post-list__item--horizontal:first-child {
  display: block !important;
  padding: 1rem !important;
}

.post-list__item-link-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  text-indent: -9999px;
  overflow: hidden;
}

/* Các link khác có z-index cao hơn */
.post-list__item-thumb-link,
.post-list__item-title-link,
.post-list__category-link {
  position: relative;
  z-index: 2;
}

/* Thumbnail - Bên trái */
.post-list__item-thumb {
  flex-shrink: 0;
  width: 300px;
  height: 200px;
  overflow: hidden;
  border-radius: 6px;
}

.post-list--horizontal>article:first-of-type .post-list__item-thumb {
  width: auto !important;
  height: 300px !important;
  margin-bottom: 21px !important;
}

.post-list__item-thumb-link {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.post-list__item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-list__item--horizontal:hover .post-list__item-image {
  transform: scale(1.02);
}

/* Content - Bên phải */
.post-list__item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* Để text không overflow */
}

/* Meta */
.post-list__item-meta {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  /* Không cho xuống dòng */
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: #666;
  overflow: hidden;
  /* Ẩn phần tràn */
}

.post-list__item-date {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  /* Không co lại */
  white-space: nowrap;
  /* Không xuống dòng */
}

.post-list__item-separator {
  color: #ccc;
  flex-shrink: 0;
  /* Không co lại */
}

.post-list__item-categories {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  /* Chiếm phần còn lại */
  min-width: 0;
  /* Cho phép truncate */
  overflow: hidden;
  /* Ẩn phần tràn */
  color: #d32f2f;
}

.post-list__icon {
  flex-shrink: 0;
  color: #999;
}

.post-list__category-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* Không xuống dòng */
  display: inline-block;
  max-width: 100%;
}

.post-list__category-link {
  color: #d32f2f;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline;
}

.post-list__category-link:hover {
  color: #d32f2f;
  text-decoration: underline;
}

/* Title */
.post-list__item-title {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 600;
}

.post-list__item-title-link {
  color: #333;
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
}

.post-list__item-title-link:hover {
  color: #d32f2f;
}

/* Excerpt */
.post-list__item-excerpt {
  color: #666;
  line-height: 1.6;
  /* margin-bottom: 1rem; */
  flex: 1;
}

.post-list__item-excerpt p {
  margin: 0 !important;
}

/* Responsive */
@media (max-width: 768px) {
  .post-list__item--horizontal {
    flex-direction: column;
    padding: 1rem;
  }

  .post-list__item-thumb {
    width: 100%;
    height: 200px;
  }
}

/* Empty State */
.post-list__empty {
  text-align: center;
  padding: 4rem 2rem;
}

.post-list__empty-icon {
  color: #ccc;
  margin-bottom: 1rem;
}

.post-list__empty-message {
  font-size: 1.25rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.post-list__empty-hint {
  color: #999;
  font-size: 0.875rem;
}

.post-list__empty-link {
  color: #0066cc;
  text-decoration: none;
}

.post-list__empty-link:hover {
  text-decoration: underline;
}

/* Pagination */
.post-list__pagination {
  margin-top: 3rem;
  text-align: center;
}

.post-list__pagination ul {
  display: inline-flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.5rem;
}

.post-list__pagination li {
  margin: 0;
}

.post-list__pagination a,
.post-list__pagination span {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.post-list__pagination a {
  background: #f5f5f5;
  color: #333;
}

.post-list__pagination a>span {
  padding: 0 !important;
}

.post-list__pagination a:hover {
  background: #ffcfcf;
  color: #fff;
}

.post-list__pagination .current {
  background: #d32f2f;
  color: #fff;
  font-weight: bold;
}

/* ===========================
   FILEBIRD SIDEBAR
   =========================== */
.filebird-sidebar {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 0px 9px 0px;
  overflow: visible;
}

.filebird-sidebar::-webkit-scrollbar {
  width: 6px;
}

.filebird-sidebar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.filebird-sidebar::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

.filebird-sidebar::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.filebird-sidebar h3 {
  font-size: 18px;
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  color: #333;
  font-weight: 600;
  border-bottom: 2px solid #d32f2f;
  background: #ffffff;
}

/* ===========================
   DROPDOWN MOBILE (Ẩn trên desktop)
   =========================== */
.filebird-dropdown-mobile {
  display: none;
  /* Ẩn trên desktop */
  margin-bottom: 15px;
  position: relative;
}

.filebird-select-wrapper {
  position: relative;
  width: 100%;
}

/* Trigger button */
.filebird-select-trigger {
  width: 100%;
  padding: 14px 50px 14px 16px;
  font-size: 15px;
  font-weight: 500;
  color: #333;
  background: #ffffff;
  border: 2px solid #d32f2f;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  user-select: none;
}

.filebird-select-trigger:hover {
  border-color: #b71c1c;
  box-shadow: 0 2px 6px rgba(211, 47, 47, 0.2);
}

.filebird-select-trigger.active {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.filebird-select-text {
  flex: 1;
  text-align: left;
}

.filebird-select-trigger::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #d32f2f;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 10px;
}

.filebird-select-wrapper.active .filebird-select-trigger::after {
  transform: rotate(180deg);
}

/* Dropdown menu */
.filebird-select-dropdown {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 2px solid #d32f2f;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  margin-top: -2px;
}

.filebird-select-wrapper.active .filebird-select-dropdown {
  display: block;
}

/* Custom scrollbar cho dropdown */
.filebird-select-dropdown::-webkit-scrollbar {
  width: 6px;
}

.filebird-select-dropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.filebird-select-dropdown::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

.filebird-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Option items */
.filebird-select-option {
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 400;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
  user-select: none;
}

.filebird-select-option:last-child {
  border-bottom: none;
  border-radius: 0 0 6px 6px;
}

.filebird-select-option.selected {
  background: #c5e2ff;
  color: #d32f2f;
  font-weight: 500;
}

/* Danh sách folders - Desktop */
.filebird-folder-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: block;
}

.filebird-folder-list li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}

.filebird-folder-list li:last-child {
  border-bottom: none;
}

/* Link folder */
.filebird-folder-list a {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  color: #333;
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  background: #ffffff;
}

/* Hover state */
.filebird-folder-list a:hover {
  background-color: #f8f9fa;
  color: #333;
  text-decoration: none;
}

/* Active folder - Style giống category filter */
.filebird-folder-list .active-folder {
  background-color: #e3f2fd;
  color: #d32f2f;
  font-weight: 500;
  position: relative;
}

/* Thanh đỏ bên trái khi active */
.filebird-folder-list .active-folder::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: #d32f2f;
}

/* Hover khi active */
.filebird-folder-list .active-folder:hover {
  background-color: #d1e7f5;
}

/* Empty state */
.filebird-folder-list li[style*="color:#999"] {
  padding: 16px 20px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 10px;
  color: #856404;
  font-style: normal;
  font-size: 14px;
  line-height: 1.5;
  margin: 10px 20px;
  border-bottom: none !important;
}

/* ==========================================
   FILEBIRD SIDEBAR FILTER: MOBILE DROPDOWN STYLES
   (Đồng bộ với post-category-filter và wpdm-sidebar-filter)
   ========================================== */

/* Button toggle - chỉ hiển thị trên mobile */
.filebird-sidebar-filter__toggle {
  display: none;
  /* Ẩn trên desktop */
  width: 100%;
  padding: 12px 15px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  transition: all 0.3s ease;
}

.filebird-sidebar-filter__toggle:hover {
  background: #f8f9fa;
  border-color: #d32f2f;
}

.filebird-sidebar-filter__toggle--active {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
}

.filebird-sidebar-filter__toggle-icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.filebird-sidebar-filter__toggle--active .filebird-sidebar-filter__toggle-icon {
  transform: rotate(180deg);
}

.filebird-sidebar-filter__toggle-text {
  flex: 1;
}

/* Title sidebar */
.filebird-sidebar-filter__title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #d32f2f;
}

/* List - dùng chung style với wpdm-sidebar-filter và post-category-filter */
.filebird-sidebar-filter__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.filebird-sidebar-filter__item {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #f0f0f0;
}

.filebird-sidebar-filter__item:last-child {
  border-bottom: none;
}

.filebird-sidebar-filter__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  color: #555;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.filebird-sidebar-filter__link:hover {
  background-color: #f8f9fa;
  color: #d32f2f;
  border-left-color: #d32f2f;
  text-decoration: none;
}

.filebird-sidebar-filter__name {
  font-size: 14px;
  font-weight: 400;
  flex: 1;
}

/* Active state */
.filebird-sidebar-filter__item--active .filebird-sidebar-filter__link {
  background-color: #e7f3f8;
  color: #d32f2f;
  font-weight: 600;
  border-left-color: #d32f2f;
}

.filebird-sidebar-filter__item--active .filebird-sidebar-filter__link:hover {
  background-color: #d4ebf5;
}

/* Desktop: Ẩn button, hiển thị sidebar bình thường */
@media (min-width: 769px) {
  .filebird-sidebar-filter__toggle {
    display: none !important;
  }

  .filebird-sidebar-filter__list {
    display: block !important;
  }
}

/* Mobile: Hiển thị button, ẩn list mặc định */
@media (max-width: 768px) {
  .filebird-sidebar {
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
  }

  .filebird-sidebar-filter__toggle {
    display: flex;
  }

  .filebird-sidebar-filter__title {
    display: none;
    /* Ẩn title trên mobile, dùng button text thay thế */
  }

  .filebird-sidebar-filter__list {
    display: none;
    /* Ẩn mặc định */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fff;
    border-top: 1px solid #e0e0e0;
  }

  .filebird-sidebar-filter__list--open {
    display: block;
    max-height: 500px;
    /* Đủ lớn để hiển thị danh sách */
    overflow-y: auto;
    margin-bottom: 10px !important;
  }

  .filebird-sidebar-filter__item {
    border: none !important;
  }
}

/* ===========================
   MEDIA GALLERY - PINTEREST STYLE
   =========================== */
.media-gallery {
  margin-left: 320px;
  padding: 0 10px;
  width: calc(100% - 320px);
}

/* Pinterest Masonry Grid - Dùng CSS Columns */
.media-grid {
  column-count: 3;
  column-gap: 15px;
  width: 100%;
}

/* Item ảnh - Pinterest Card Style */
.media-item {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  display: inline-block;
  width: 100%;
  margin-bottom: 13px;
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
}

/* Hover effect - Pinterest style */
.media-item:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
  transform: translateY(-4px);
}

/* Link wrapper */
.media-item a {
  display: block;
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

/* Image - Giữ nguyên aspect ratio */
.media-item-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: #f5f5f5;
  margin-bottom: 0 !important;
}

/* Hover zoom effect */
.media-item:hover .media-item-image {
  transform: scale(1.05);
}

/* Overlay khi hover - Pinterest style */
.media-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom,
      transparent 0%,
      rgba(0, 0, 0, 0.4) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
  border-radius: 8px;
}

.media-item:hover::before {
  opacity: 1;
}

/* Title overlay (nếu có) - Pinterest style */
.media-item-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.media-item:hover .media-item-title {
  opacity: 1;
  transform: translateY(0);
}

/* Loading/Empty state */
.media-gallery p {
  padding: 60px 20px;
  text-align: center;
  color: #6c757d;
  font-size: 18px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px dashed #dee2e6;
  font-style: italic;
  margin: 20px 0;
}

/* ===========================
   RESPONSIVE - PINTEREST STYLE
   =========================== */
@media screen and (max-width: 1400px) {
  .media-grid {
    column-count: 3;
    column-gap: 18px;
  }

  .media-item {
    margin-bottom: 13px;
  }
}

@media screen and (max-width: 1200px) {
  .media-grid {
    column-count: 3;
    column-gap: 16px;
  }

  .media-item {
    margin-bottom: 16px;
  }
}

@media screen and (max-width: 1024px) {
  .media-gallery {
    margin-left: 320px;
    width: calc(100% - 320px);
  }

  .media-grid {
    column-count: 3;
    column-gap: 14px;
  }
}

@media screen and (max-width: 900px) {
  .filebird-sidebar {
    width: 100% !important;
    float: none;
    margin-right: 0;
    margin-bottom: 30px;
    position: relative;
    top: 0;
    max-height: none;
  }

  .media-gallery {
    margin-left: 0;
    width: 100%;
    padding: 0;
  }

  .media-grid {
    column-count: 2;
    column-gap: 12px;
  }

  .media-item {
    margin-bottom: 12px;
    border-radius: 12px;
  }

  .media-item-image {
    border-radius: 12px;
  }
}

/* ===========================
   RESPONSIVE - MOBILE
   =========================== */
@media screen and (max-width: 600px) {
  .filebird-dropdown-mobile {
    display: block;
    margin-bottom: 20px;
    z-index: 1000 !important;
  }

  /* Ẩn list trên mobile */
  .filebird-folder-list {
    display: none;
  }

  .filebird-select-trigger {
    font-size: 16px;
    /* Tăng size trên mobile */
    padding: 16px 20px 16px 16px;
  }

  .filebird-select-option {
    font-size: 16px;
    padding: 16px;
    min-height: 48px;
    /* Dễ click hơn trên mobile */
    display: flex;
    align-items: center;
  }
}

/* Print styles */
@media print {
  .filebird-sidebar {
    display: none;
  }

  .media-gallery {
    margin-left: 0;
    width: 100%;
  }

  .media-grid {
    column-count: 3;
    column-gap: 10px;
  }

  .media-item {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ==========================================
   AIOVG SIDEBAR FILTER STYLES (BEM)
   ==========================================

   Component: Sidebar menu để filter videos theo category
   Shortcode: [aiovg_sidebar_filter]

   NOTE: AIOVG sidebar sử dụng lại các class của WPDM sidebar
   để đảm bảo styling đồng nhất giữa hai plugin.

   CSS structure:
   - .aiovg-sidebar-filter kế thừa từ .wpdm-sidebar-filter
   - Chỉ thêm override CSS nếu cần custom riêng cho AIOVG

   ========================================== */

/*
 * AIOVG Sidebar sử dụng class .wpdm-sidebar-filter
 * Nên tất cả styling đã có sẵn ở phần WPDM SIDEBAR FILTER ở trên
 * Không cần duplicate CSS
 *
 * Nếu cần custom riêng cho AIOVG trong tương lai, thêm vào đây:
 */

/* Override riêng cho AIOVG nếu cần (hiện tại không cần) */
/* .aiovg-sidebar-filter {
  Kế thừa tất cả styling từ .wpdm-sidebar-filter
} */

/* ==========================================
   ALL IN ONE VIDEO GALLERY CUSTOMIZATIONS
   ========================================== */

/**
 * Ẩn text "X videos found" trong shortcode [aiovg_videos]
 * Text này được render bởi template videos-template-classic.php
 * với class .aiovg-count khi show_count="1"
 */
.aiovg-count {
  display: none !important;
}