/* Patients-page pagination, applied to HR DataTables lists */

.hr-custom-pagination .dataTables_paginate,
.hr-custom-pagination .dataTables_info {
  display: none !important;
}

.custom-pagination-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background-color: #08151d;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 0 !important;
  width: 100%;
  box-sizing: border-box;
}

[data-bs-theme="light"] .custom-pagination-footer {
  background-color: #ffffff;
}

.custom-pagination-footer .pagination-info {
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 0.875rem !important;
}

[data-bs-theme="light"] .custom-pagination-footer .pagination-info {
  color: #6b7280 !important;
}

.custom-pagination-footer .pagination-buttons {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.custom-pagination-footer .pagination-btn {
  padding: 0.375rem 0.75rem !important;
  background: #2b3035 !important;
  color: #adb5bd !important;
  border: 1px solid #2a3f4f !important;
  border-radius: 0.25rem !important;
  margin: 0 !important;
  font-size: 0.875rem !important;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: auto;
  height: auto;
}

.custom-pagination-footer .pagination-btn:hover:not(:disabled) {
  background: #2a3f4f !important;
  color: white !important;
}

.custom-pagination-footer .pagination-btn.active {
  background: #00baff !important;
  color: white !important;
  border-color: #00baff !important;
}

.custom-pagination-footer .pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

[data-bs-theme="light"] .custom-pagination-footer .pagination-btn {
  background: white !important;
  color: #023e96 !important;
  font-weight: 400;
  border: 1px solid #d1d5db !important;
}

[data-bs-theme="light"] .custom-pagination-footer .pagination-btn:hover:not(:disabled) {
  background: #f3f4f6 !important;
  color: #111827 !important;
  border-color: #00baff !important;
}

[data-bs-theme="light"] .custom-pagination-footer .pagination-btn.active {
  background: #00baff !important;
  color: white !important;
  border-color: #00baff !important;
}

[data-bs-theme="light"] .custom-pagination-footer .pagination-buttons .pagination-btn:first-child,
[data-bs-theme="light"] .custom-pagination-footer .pagination-buttons .pagination-btn:last-child {
  background: #9ca3afc2 !important;
  color: #ffffff !important;
  border-color: #9ca3afc4 !important;
  font-weight: 500;
}

[data-bs-theme="light"] .custom-pagination-footer .pagination-buttons .pagination-btn:first-child:hover:not(:disabled),
[data-bs-theme="light"] .custom-pagination-footer .pagination-buttons .pagination-btn:last-child:hover:not(:disabled) {
  background: #8b949b !important;
  border-color: #8b949b !important;
  color: #ffffff !important;
}

.custom-pagination-footer .pagination-ellipsis {
  padding: 0 0.5rem;
  color: rgba(255, 255, 255, 0.5);
}

[data-bs-theme="light"] .custom-pagination-footer .pagination-ellipsis {
  color: #9ca3af;
}

@media (max-width: 768px) {
  .custom-pagination-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 0;
  }

  .custom-pagination-footer .pagination-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }

  .custom-pagination-footer .pagination-btn {
    min-height: 40px;
    min-width: 40px;
  }
}

@media (max-width: 479.98px) {
  .custom-pagination-footer .pagination-info {
    text-align: center;
  }

  /* Keep Previous, current page, and Next. Hide extra page numbers. */
  .custom-pagination-footer .pagination-buttons .pagination-btn:not(:first-child):not(:last-child):not(.active) {
    display: none;
  }

  .custom-pagination-footer .pagination-ellipsis {
    display: none;
  }
}
