/* Fixed sidebar with its own independent scrollbar, so scrolling a long
   admin page (e.g. Services Section with many items) doesn't drag the
   sidebar down with it - only the main content area scrolls. */
@media (min-width: 768px) {
  #wrapper {
    height: 100vh;
    overflow: hidden;
  }

  #wrapper .sidebar {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  #wrapper #content-wrapper {
    height: 100vh;
    overflow-y: auto;
  }
}

/* Themed SweetAlert2 confirmation dialogs (delete / logout) to match the
   SB Admin 2 palette used across the admin panel. */
.themed-swal-popup {
  border-radius: 0.5rem;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.themed-swal-popup .swal2-title {
  color: #5a5c69;
  font-weight: 700;
  font-size: 1.35rem;
}

.themed-swal-popup .swal2-html-container {
  color: #858796;
}

.themed-swal-popup .swal2-icon.swal2-warning {
  border-color: #e74a3b;
  color: #e74a3b;
}

.themed-swal-popup .swal2-icon.swal2-question {
  border-color: #4e73df;
  color: #4e73df;
}

.themed-swal-confirm,
.themed-swal-cancel {
  font-weight: 700;
  padding: 0.5rem 1.5rem;
  margin: 0 0.35rem;
}

.themed-swal-confirm.btn-danger {
  background-color: #e74a3b;
  border-color: #e74a3b;
}

.themed-swal-confirm.btn-danger:hover {
  background-color: #d52a1a;
  border-color: #c8291a;
}

.themed-swal-confirm.btn-primary {
  background-color: #4e73df;
  border-color: #4e73df;
}

.themed-swal-confirm.btn-primary:hover {
  background-color: #2e59d9;
  border-color: #2653d4;
}

.themed-swal-cancel.btn-secondary {
  background-color: #858796;
  border-color: #858796;
}

.themed-swal-cancel.btn-secondary:hover {
  background-color: #717384;
  border-color: #6b6d7d;
}

/* Bootstrap badges in this theme only get a background color from the
   bg-* utility classes (bg-success, bg-secondary, bg-danger, bg-primary,
   ...) - text color is left at its inherited gray, which is unreadable on
   darker backgrounds and completely invisible on bg-secondary (same gray
   as the text itself). Force white text on every badge site-wide instead
   of patching each page's status/permission pills individually. */
.badge {
  color: #fff !important;
}

/* bg-warning/bg-light are pale backgrounds - white text from the rule above
   would be just as unreadable on them as the gray text was originally, so
   they need dark text instead. Two classes beats one on specificity, so
   this wins over ".badge" regardless of source order. */
.badge.bg-warning,
.badge.bg-light {
  color: #1f2937 !important;
}
