html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Navbar alignment and profile photo fixes */
.navbar .navbar-nav {
  align-items: center;
}

.navbar .navbar-nav .nav-link {
  display: flex;
  align-items: center;
}

/* Profile photo styles */
.profile-photo {
  border: 2px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.profile-photo-sm {
  width: 28px;
  height: 28px;
}

.profile-photo-md {
  width: 40px;
  height: 40px;
}

.profile-photo-lg {
  width: 100px;
  height: 100px;
}

.profile-photo-xl {
  width: 150px;
  height: 150px;
}

/* User initials placeholder */
.user-initials {
  font-weight: 600;
  text-transform: uppercase;
  user-select: none;
}

/* Notification bell positioning */
#notificationBadge {
  transform: translate(-50%, -25%) !important;
}

/* Dropdown menu profile header */
.dropdown-menu .dropdown-header.profile-header {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
}

/* ============================================================================
   DATATABLE DROPDOWN FIX - Prevent dropdowns from being cut off
   ============================================================================ */

/* Fix parent containers that clip dropdowns */
.table-responsive {
  overflow: visible !important;
}

.card .table-responsive {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

.card-body {
  overflow: visible !important;
}

/* Remove any table overflow constraints */
table {
  overflow: visible !important;
}

table tbody {
  overflow: visible !important;
}

/* Ensure dropdowns have high z-index and proper positioning */
.table .dropdown,
.table .btn-group,
.table .dropup,
.table .dropend,
.table .dropstart {
  position: static !important; /* Allow dropdown to escape table bounds */
}

.table .dropdown-menu {
  z-index: 9999 !important; /* Very high z-index */
  position: absolute !important;
}

/* Specific fix for action dropdowns in datatables */
td .dropdown-menu,
td .btn-group .dropdown-menu {
  z-index: 9999 !important;
  position: absolute !important;
}

/* Ensure Bootstrap dropdown toggle doesn't interfere */
.table .dropdown-toggle::after {
  vertical-align: middle;
}

/* Fix for dropdowns in last rows of scrollable tables */
.dataTables_wrapper .dataTables_scroll .dataTables_scrollBody {
  overflow-y: auto !important;
  overflow-x: auto !important;
}

.dataTables_wrapper .table {
  overflow: visible !important;
}
