/* theme-fix-collection-foot.css: phân trang, trạng thái rỗng, focus (Antigravity).
   Thiết kế theo design/collection/CRITIQUE.md (mục 6 phân trang, 7 trạng thái rỗng, 11 focus).
   Tiền tố riêng: .col3-pag* và .col3-empty*.
   Dark mode áp dụng qua html[data-mobile-theme="dark"]. */

/* ==========================================================================
   11. FOCUS VISIBLE CHO LINK / NÚT TRONG .col3
   ========================================================================== */

.col3 :focus-visible,
.template-collection :focus-visible {
  outline: 3px solid var(--hp-focus, #007fae);
  outline-offset: 4px;
}

.col3 a:focus-visible,
.col3 button:focus-visible,
.col3 select:focus-visible,
.col3 input:focus-visible {
  outline: 3px solid var(--hp-focus, #007fae);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (max-width: 768px) {
  html[data-mobile-theme="dark"] .col3 :focus-visible,
  html[data-mobile-theme="dark"] .template-collection :focus-visible,
  html[data-mobile-theme="dark"] .col3 a:focus-visible,
  html[data-mobile-theme="dark"] .col3 button:focus-visible,
  html[data-mobile-theme="dark"] .col3 select:focus-visible,
  html[data-mobile-theme="dark"] .col3 input:focus-visible {
    outline-color: #7dd3f5;
  }
}


/* ==========================================================================
   6. PHÂN TRANG (.col3-pag)
   ========================================================================== */

/* Canh giữa, loại bỏ viền đứt thừa của timber */
.col3 .col3-pag.pagination,
.col3 nav.col3-pag,
.template-collection .col3-pag.pagination {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  border: 0 !important;
  margin: 36px 0 48px !important;
  padding: 0 !important;
  text-align: center !important;
  list-style: none !important;
}

/* Từng ô phân trang: đảm bảo kích thước chạm ≥ 44x44px */
.col3 .col3-pag > span,
.col3 .col3-pag .col3-pag__item,
.template-collection .col3-pag > span {
  display: inline-flex !important;
  min-width: 44px !important;
  min-height: 44px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  vertical-align: middle !important;
  font-family: 'Be Vietnam Pro', Arial, sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  border-radius: 10px !important;
  margin: 0 !important;
}

/* Link trang thường và nút lùi / tới */
.col3 .col3-pag > span > a,
.col3 .col3-pag a,
.template-collection .col3-pag a {
  display: inline-flex !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 14px !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
  border: 1px solid var(--anker-border, #dce4e8) !important;
  background: var(--hp-card, #ffffff) !important;
  color: var(--anker-ink, #0b1118) !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease !important;
}

.col3 .col3-pag > span > a:hover,
.col3 .col3-pag a:hover {
  border-color: #007fae !important;
  color: #007fae !important;
  background: var(--anker-surface, #f4f7f9) !important;
}

/* Số trang hiện tại: Nền #007FAE, chữ trắng, tương phản 4.52:1 đạt WCAG AA */
.col3 .col3-pag .page.current,
.col3 .col3-pag .col3-pag__current,
.template-collection .col3-pag .page.current {
  display: inline-flex !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 14px !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
  background: #007fae !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border: 1px solid #007fae !important;
  cursor: default !important;
}

/* Dấu ba chấm phân tách */
.col3 .col3-pag .deco,
.col3 .col3-pag .col3-pag__deco,
.template-collection .col3-pag .deco {
  display: inline-flex !important;
  min-width: 32px !important;
  min-height: 44px !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--anker-muted, #66727d) !important;
  font-weight: 500 !important;
  user-select: none !important;
  border: 0 !important;
  background: transparent !important;
}

/* Mũi tên prev / next */
.col3 .col3-pag .prev a,
.col3 .col3-pag .next a,
.col3 .col3-pag__prev a,
.col3 .col3-pag__next a {
  font-size: 16px !important;
  font-weight: 600 !important;
}

/* Mobile Dark mode cho phân trang */
@media (max-width: 768px) {
  html[data-mobile-theme="dark"] .col3 .col3-pag > span > a,
  html[data-mobile-theme="dark"] .col3 .col3-pag a,
  html[data-mobile-theme="dark"] .template-collection .col3-pag a {
    color: #f1f6f8 !important;
    background: #121c25 !important;
    border-color: #2c3a45 !important;
  }

  html[data-mobile-theme="dark"] .col3 .col3-pag > span > a:hover,
  html[data-mobile-theme="dark"] .col3 .col3-pag a:hover {
    border-color: #7dd3f5 !important;
    color: #7dd3f5 !important;
  }

  html[data-mobile-theme="dark"] .col3 .col3-pag .page.current,
  html[data-mobile-theme="dark"] .col3 .col3-pag .col3-pag__current,
  html[data-mobile-theme="dark"] .template-collection .col3-pag .page.current {
    background: #007fae !important;
    color: #ffffff !important;
    border-color: #007fae !important;
  }

  html[data-mobile-theme="dark"] .col3 .col3-pag .deco {
    color: #9baab4 !important;
  }
}


/* ==========================================================================
   7. TRẠNG THÁI RỖNG (.col3-empty)
   ========================================================================== */

.col3 .col3-empty {
  width: 100% !important;
  float: none !important;
  clear: both !important;
  padding: 48px 16px 64px;
  text-align: center;
}

.col3 .col3-empty__box {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.col3 .col3-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--anker-surface, #f4f7f9);
  color: var(--anker-muted, #66727d);
  margin-bottom: 20px;
}

.col3 .col3-empty__title {
  font-family: 'Be Vietnam Pro', Arial, sans-serif;
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  color: var(--anker-ink, #0b1118);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.col3 .col3-empty__text {
  font-family: 'Be Vietnam Pro', Arial, sans-serif;
  font-size: 15px;
  line-height: 22px;
  color: var(--anker-muted, #66727d);
  margin: 0 0 28px;
  max-width: 440px;
}

.col3 .col3-empty__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.col3 .col3-empty__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 24px;
  font-family: 'Be Vietnam Pro', Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.col3 .col3-empty__btn--primary {
  background: #007fae !important;
  border: 1px solid #007fae !important;
  color: #ffffff !important;
}

.col3 .col3-empty__btn--primary:hover {
  background: #006a92 !important;
  border-color: #006a92 !important;
  color: #ffffff !important;
}

.col3 .col3-empty__btn--outline {
  background: var(--hp-card, #ffffff) !important;
  border: 1px solid var(--anker-border, #dce4e8) !important;
  color: var(--anker-ink, #0b1118) !important;
}

.col3 .col3-empty__btn--outline:hover {
  background: var(--anker-surface, #f4f7f9) !important;
  border-color: #007fae !important;
  color: #007fae !important;
}

/* Mobile & Dark mode cho trạng thái rỗng */
@media (max-width: 768px) {
  .col3 .col3-empty {
    padding: 36px 12px 48px;
  }

  .col3 .col3-empty__title {
    font-size: 20px;
    line-height: 28px;
  }

  .col3 .col3-empty__text {
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 24px;
  }

  .col3 .col3-empty__actions {
    flex-direction: column;
    width: 100%;
  }

  .col3 .col3-empty__btn {
    width: 100%;
  }

  html[data-mobile-theme="dark"] .col3 .col3-empty__icon {
    background: #121c25;
    color: #9baab4;
  }

  html[data-mobile-theme="dark"] .col3 .col3-empty__title {
    color: #f1f6f8;
  }

  html[data-mobile-theme="dark"] .col3 .col3-empty__text {
    color: #9baab4;
  }

  html[data-mobile-theme="dark"] .col3 .col3-empty__btn--outline {
    background: #121c25 !important;
    border-color: #2c3a45 !important;
    color: #f1f6f8 !important;
  }

  html[data-mobile-theme="dark"] .col3 .col3-empty__btn--outline:hover {
    border-color: #7dd3f5 !important;
    color: #7dd3f5 !important;
  }
}
