/* public/index.css */
#root {
  background-color: #ffffff;
}
/* Global Dark Mode Styles */
body.dark-mode,
body.bm-dashboard-dark {
  background-color: #1b2a41 !important;
  color: #ffffff !important;
}

body.dark-mode #root,
body.bm-dashboard-dark #root {
  background-color: #1b2a41 !important;
  color: #ffffff !important;
}



/* ✅ SAFE */
body.dark-mode {
  color: #ffffff;
}

body.dark-mode p,
body.dark-mode span,
body.dark-mode label,
body.dark-mode div:not(.rs__option),
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
  color: #ffffff;
}


body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, 
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6,
body.bm-dashboard-dark h1, body.bm-dashboard-dark h2, body.bm-dashboard-dark h3,
body.bm-dashboard-dark h4, body.bm-dashboard-dark h5, body.bm-dashboard-dark h6 {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

body.dark-mode p, body.dark-mode span, body.dark-mode div,
body.dark-mode label, body.dark-mode a, body.dark-mode li,
body.bm-dashboard-dark p, body.bm-dashboard-dark span, body.bm-dashboard-dark div,
body.bm-dashboard-dark label, body.bm-dashboard-dark a, body.bm-dashboard-dark li {
  color: #ffffff !important;
}

body.dark-mode .text-muted,
body.bm-dashboard-dark .text-muted {
  color: #b8c5d1 !important;
}

body.dark-mode .text-secondary,
body.bm-dashboard-dark .text-secondary {
  color: #d1d8e0 !important;
}

body.dark-mode .text-primary,
body.bm-dashboard-dark .text-primary {
  color: #66b3ff !important;
}

body.dark-mode .text-success,
body.bm-dashboard-dark .text-success {
  color: #66ff99 !important;
}

body.dark-mode .text-warning,
body.bm-dashboard-dark .text-warning {
  color: #ffcc66 !important;
}

body.dark-mode .text-danger,
body.bm-dashboard-dark .text-danger {
  color: #ff6666 !important;
}

body.dark-mode .text-info,
body.bm-dashboard-dark .text-info {
  color: #66ffff !important;
}

/* Dark mode for common elements */
body.dark-mode .container,
body.dark-mode .container-fluid,
body.bm-dashboard-dark .container,
body.bm-dashboard-dark .container-fluid {
  background-color: #1b2a41;
  color: #ffffff;
}

body.dark-mode .card,
body.bm-dashboard-dark .card {
  background-color: #2e5061;
  border-color: #3a506b;
  color: #ffffff;
}

body.dark-mode .card-body,
body.bm-dashboard-dark .card-body {
  color: #ffffff;
}

body.dark-mode .card-title,
body.bm-dashboard-dark .card-title {
  color: #ffffff !important;
}

body.dark-mode .card-text,
body.bm-dashboard-dark .card-text {
  color: #ffffff !important;
}

body.dark-mode .card-header,
body.bm-dashboard-dark .card-header {
  background-color: #3a506b;
  border-color: #4a6072;
  color: #ffffff !important;
}

body.dark-mode .form-control,
body.bm-dashboard-dark .form-control {
  background-color: #2e5061;
  border-color: #3a506b;
  color: #ffffff !important;
}

body.dark-mode .form-control::placeholder,
body.bm-dashboard-dark .form-control::placeholder {
  color: #b8c5d1 !important;
}

body.dark-mode .form-control:focus,
body.bm-dashboard-dark .form-control:focus {
  background-color: #2e5061;
  border-color: #4a6072;
  color: #ffffff !important;
  box-shadow: 0 0 0 0.2rem rgba(74, 96, 114, 0.25);
}

body.dark-mode .form-label,
body.bm-dashboard-dark .form-label {
  color: #ffffff !important;
}

body.dark-mode .btn-primary,
body.bm-dashboard-dark .btn-primary {
  background-color: #3a506b;
  border-color: #3a506b;
  color: #ffffff !important;
}

body.dark-mode .btn-primary:hover,
body.bm-dashboard-dark .btn-primary:hover {
  background-color: #4a6072;
  border-color: #4a6072;
  color: #ffffff !important;
}

body.dark-mode .btn-secondary,
body.bm-dashboard-dark .btn-secondary {
  background-color: #2e5061;
  border-color: #2e5061;
  color: #ffffff !important;
}

body.dark-mode .btn-secondary:hover,
body.bm-dashboard-dark .btn-secondary:hover {
  background-color: #3a506b;
  border-color: #3a506b;
  color: #ffffff !important;
}

body.dark-mode .btn,
body.bm-dashboard-dark .btn {
  color: #ffffff !important;
}

body.dark-mode .table,
body.bm-dashboard-dark .table {
  color: #ffffff !important;
}

body.dark-mode .table th,
body.dark-mode .table td {
  color: #ffffff !important;
  border-color: #3a506b;
}

body.bm-dashboard-dark .table th,
body.bm-dashboard-dark .table td {
  color: #ffffff !important;
  border-color: #3a506b;
}

body.bm-dashboard-dark .table th{
  background-color: #2e5061 !important;
}

body.dark-mode .table-striped > tbody > tr:nth-of-type(odd),
body.bm-dashboard-dark .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: rgba(46, 80, 97, 0.5);
  color: #ffffff !important;
}

body.dark-mode .modal-body,
body.bm-dashboard-dark .modal-body {
  color: #ffffff !important;
}

body.dark-mode .modal-footer,
body.bm-dashboard-dark .modal-footer {
  background-color: #3a506b;
  border-color: #4a6072;
  color: #ffffff !important;
}

body.dark-mode .nav-tabs .nav-link,
body.bm-dashboard-dark .nav-tabs .nav-link {
  background-color: #2e5061;
  border-color: #3a506b;
  color: #ffffff !important;
}

body.dark-mode .nav-tabs .nav-link.active,
body.bm-dashboard-dark .nav-tabs .nav-link.active {
  background-color: #3a506b;
  border-color: #4a6072;
  color: #ffffff !important;
}

/* Navigation and menu items */
body.dark-mode .nav-link,
body.bm-dashboard-dark .nav-link {
  color: #ffffff !important;
}


body.dark-mode .navbar-brand,
body.bm-dashboard-dark .navbar-brand {
  color: #ffffff !important;
}

body.dark-mode .dropdown-menu,
body.bm-dashboard-dark .dropdown-menu {
  background-color: #2e5061;
  border-color: #3a506b;
}

body.dark-mode .dropdown-item,
body.bm-dashboard-dark .dropdown-item {
  color: #ffffff !important;
}

body.dark-mode .dropdown-item:hover,
body.bm-dashboard-dark .dropdown-item:hover {
  background-color: #3a506b;
  color: #ffffff !important;
}

/* Alert components */
body.dark-mode .alert,
body.bm-dashboard-dark .alert {
  color: #ffffff !important;
}

body.dark-mode .alert-primary,
body.bm-dashboard-dark .alert-primary {
  background-color: #3a506b;
  border-color: #4a6072;
  color: #ffffff !important;
}

body.dark-mode .alert-secondary,
body.bm-dashboard-dark .alert-secondary {
  background-color: #2e5061;
  border-color: #3a506b;
  color: #ffffff !important;
}

/* List groups */
body.dark-mode .list-group-item,
body.bm-dashboard-dark .list-group-item {
  background-color: #2e5061;
  border-color: #3a506b;
  color: #ffffff !important;
}

/* Breadcrumbs */
body.dark-mode .breadcrumb,
body.bm-dashboard-dark .breadcrumb {
  background-color: #2e5061;
}

body.dark-mode .breadcrumb-item,
body.bm-dashboard-dark .breadcrumb-item {
  color: #ffffff !important;
}

body.dark-mode .breadcrumb-item.active,
body.bm-dashboard-dark .breadcrumb-item.active {
  color: #b8c5d1 !important;
}

/* Pagination */
body.dark-mode .page-link,
body.bm-dashboard-dark .page-link {
  background-color: #2e5061;
  border-color: #3a506b;
  color: #ffffff !important;
}

body.dark-mode .page-item.active .page-link,
body.bm-dashboard-dark .page-item.active .page-link {
  background-color: #3a506b;
  border-color: #4a6072;
  color: #ffffff !important;
}

body.dark-mode .page-item.disabled .page-link {
  background-color: #6c6c6c;
  border-color: #7c7c7c;
  color: #ffffff !important;
}

/* Fix the position of the header at the top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;

  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  background-color: #2A1B3D;
  color: #ffffff;

  border-radius: 50%;
  font-size: 22px;
  text-decoration: none;

  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  z-index: 1000;
}

.back-to-top:hover {
  transform: translateY(-4px);
  opacity: 0.9;
}
  
  /* Allow the page content to scroll horizontally */
  .container-fluid {
    overflow-x: auto;
  }
  
  /* Hide the horizontal scrollbar */
  .container-fluid::-webkit-scrollbar {
    display: none;
  }

  .tab-content {
  background-color: transparent;
  border: none;
}



/* ===== HARD FORCE DARK MODAL (PORTAL SAFE) ===== */
body.dark-mode .modal-content {
  background-color: #1b2a41 !important;
  color: #ffffff !important;
}

body.dark-mode .modal-header,
body.dark-mode .modal-body,
body.dark-mode .modal-footer {
  background-color: #1b2a41 !important;
  border-color: #3a506b !important;
  color: #ffffff !important;
}


/* 1. Target the background of the selected bubbles (Multi-Value) */
body.dark-mode .react-select__multi-value,
body.dark-mode div[class*="-multiValue"] {
  background-color: #4a6072 !important; /* This is the grey color you requested */
  border-radius: 4px;
}

/* 2. Target the text inside those bubbles to ensure it stays white */
body.dark-mode .react-select__multi-value__label,
body.dark-mode div[class*="-multiValue__label"] {
  color: #ffffff !important;
}

/* 3. Target the 'X' (remove) button inside the grey bubble */
body.dark-mode .react-select__multi-value__remove,
body.dark-mode div[class*="-multiValue__remove"] {
  color: #ffffff !important;
  cursor: pointer;
}

/* 4. Ensure the 'X' button turns red or darker when hovered */
body.dark-mode .react-select__multi-value__remove:hover,
body.dark-mode div[class*="-multiValue__remove"]:hover {
  background-color: #ff6666 !important;
  color: white !important;
}

/* ===== REACT-SELECT DARK MODE ONLY ===== */
body.dark-mode .react-select__menu,
body.dark-mode .css-1nmdiq5-menu {
  background-color: #0f172a !important;
}

body.dark-mode .react-select__menu-list,
body.dark-mode .css-1nmdiq5-menu-list {
  background-color: #0f172a !important;
}

body.dark-mode .react-select__option,
body.dark-mode .css-10wo9uf-option {
  background-color: #0f172a !important;
  color: #ffffff !important;
}

body.dark-mode .react-select__option--is-focused,
body.dark-mode .css-10wo9uf-option--is-focused {
  background-color: #243b55 !important;
}

body.dark-mode .react-select__option--is-selected,
body.dark-mode .css-10wo9uf-option--is-selected {
  background-color: #334155 !important;
}

/* ===== REACT-SELECT LIGHT MODE (FORCE RESET) ===== */
body:not(.dark-mode) .react-select__menu,
body:not(.dark-mode) .css-1nmdiq5-menu {
  background-color: #ffffff !important;
}

body:not(.dark-mode) .react-select__menu-list,
body:not(.dark-mode) .css-1nmdiq5-menu-list {
  background-color: #ffffff !important;
}

body:not(.dark-mode) .react-select__option,
body:not(.dark-mode) .css-10wo9uf-option {
  background-color: #ffffff !important;
  color: #212529 !important;
}

body:not(.dark-mode) .react-select__option--is-focused,
body:not(.dark-mode) .css-10wo9uf-option--is-focused {
  background-color: #e9ecef !important;
}

body:not(.dark-mode) .react-select__option--is-selected,
body:not(.dark-mode) .css-10wo9uf-option--is-selected {
  background-color: #dee2e6 !important;
}

/* ===== React-Select menu container (LIGHT MODE) ===== */
body:not(.dark-mode) .react-select__menu,
body:not(.dark-mode) .react-select__menu-list {
  background-color: #ffffff !important;
}

/* ===== React-Select menu container (DARK MODE) ===== */
body.dark-mode .react-select__menu,
body.dark-mode .react-select__menu-list {
  background-color: #0f172a !important;
}


/* ============================= */
/* REACT-SELECT — LIGHT MODE */
/* ============================= */
body:not(.dark-mode) .rs__menu,
body:not(.dark-mode) .rs__menu-list {
  background-color: #ffffff !important;
}

body:not(.dark-mode) .rs__option {
  background-color: #ffffff !important;
  color: #212529 !important;
}

body:not(.dark-mode) .rs__option--is-focused {
  background-color: #f8f9fa !important;
}

body:not(.dark-mode) .rs__option--is-selected {
  background-color: #e9ecef !important;
}


/* ============================= */
/* REACT-SELECT — DARK MODE */
/* ============================= */

body.dark-mode .rs__menu,
body.dark-mode .rs__menu-list {
  background-color: #0f172a !important;
}

body.dark-mode .rs__option {
  background-color: #0f172a !important;
  color: #ffffff !important;
}

body.dark-mode .rs__option--is-focused {
  background-color: #0f172a !important;
}

body.dark-mode .rs__option--is-selected {
  background-color: #0f172a !important;
}

/* ============================= */
/* react-select INPUT THEME FIX */
/* ============================= */

/* LIGHT MODE → WHITE */
body.dark-mode .rs__single-value,
body.dark-mode .rs__placeholder,
body.dark-mode .rs__input {
  color: #ffffff !important;
}

/* ============================= */
/* react-select INPUT THEME FIX */
/* ============================= */

/* LIGHT MODE → WHITE */
body:not(.dark-mode) .rs__control {
  background-color: #ffffff !important;
  border-color: #ced4da !important;
}

body:not(.dark-mode) .rs__single-value,
body:not(.dark-mode) .rs__placeholder,
body:not(.dark-mode) .rs__input {
  color: #212529 !important;
}

/* DARK MODE → DARK NAVY */
body.dark-mode .rs__control {
  background-color: #0f172a !important; /* dark navy */
  border-color: #3a506b !important;
}


/* ========================================= */
/* HARD RESET INPUTS — LIGHT MODE ONLY */
/* ========================================= */

body:not(.dark-mode) input,
body:not(.dark-mode) textarea {
  background-color: #ffffff !important;
  color: #212529 !important;
  border-color: #ced4da !important;
}

/* placeholder reset */
body:not(.dark-mode) input::placeholder,
body:not(.dark-mode) textarea::placeholder {
  color: #6c757d !important;
}

/* =============================== */
/* DARK MODE — FORCE INPUT NAVY */
/* =============================== */

body.dark-mode .modal-content input.form-control,
body.dark-mode .modal-content textarea.form-control {
  background-color: #0f172a !important; /* NAVY */
  color: #ffffff !important;
  border-color: #3a506b !important;
}

body.dark-mode .modal-content
input.form-control::placeholder,
body.dark-mode .modal-content
textarea.form-control::placeholder {
  color: #1f4579 !important;
}
/* ========================================= */
/* DARK MODE — FORCE NAVY FOR ALL MODAL INPUTS */
/* ========================================= */

body.dark-mode .modal-content input,
body.dark-mode .modal-content textarea,
body.dark-mode .modal-content select {
  background-color: #0f172a !important; /* NAVY */
  color: #ffffff !important;
  border-color: #3a506b !important;
}

/* Placeholder */
body.dark-mode .modal-content input::placeholder,
body.dark-mode .modal-content textarea::placeholder {
  color: #0f3b79 !important;
}


/* ===================================== */
/* REACT-SELECT — UNIFIED OPTION STYLING */
/* ===================================== */

/* Default option */
.rs__option {
  background-color: transparent;
  color: inherit;
}

/* Hover */
.rs__option:hover {
  background-color: #e9ecef !important;   /* light grey */
  color: #212529 !important;
}

/* Focused (keyboard / initial open) */
.rs__option--is-focused {
  background-color: #e9ecef !important;   /* SAME as hover */
  color: #212529 !important;
}

/* Selected */
.rs__option--is-selected {
  background-color: #dee2e6 !important;
  color: #212529 !important;
}
/* 1. Fix the Placeholder color in Dark Mode */
.wsr-dark-modal-content input::placeholder {
  color: #ffffff !important;
  opacity: 1 !important; /* Browsers like Firefox need this */
}

/* 2. Fix the Black Background while typing */
/* We target the react-select container specifically to force transparency */
.custom-select__input-container,
.custom-select__input,
.custom-select__value-container {
  background-color: transparent !important;
  border: none !important;
}

/* This stops the browser from adding a background when you click the input */
.custom-select__input input {
  background: transparent !important;
  color: white !important;
  box-shadow: none !important;
}
/* Fix the placeholder color */
.custom-select__placeholder {
  color: white !important;
}

/* Fix the black background while entering text */
/* This targets the specific div and input react-select creates */
.custom-select__input-container,
.custom-select__input-container input,
.custom-select__value-container {
  background-color: transparent !important;
  color: white !important;
}

/* Override the global rule that is making your inputs black */
body.dark-mode .modal-content.wsr-dark-modal-content .custom-select__input {
  background-color: transparent !important;
  color: white !important;
}

/* ============================= */
/* CREATE FILTER MODAL — DARK MODE */
/* ============================= */

/* ONLY inputs inside Create Filter Modal */
body.dark-mode .create-filter-modal input,
body.dark-mode .create-filter-modal textarea {
  background-color: #1b2a41 !important;
  color: #ffffff !important;
  border-color: #3a506b !important;
}

/* Placeholder color */
body.dark-mode .create-filter-modal input::placeholder {
  color: #94a3b8 !important;
  opacity: 1;
}

/* react-select typing field (black background fix) */
body.dark-mode .create-filter-modal
.custom-select__input-container,
body.dark-mode .create-filter-modal
.custom-select__input-container input {
  background: transparent !important;
  color: #ffffff !important;
  box-shadow: none !important;
}
/* ===================================== */
/* CREATE FILTER MODAL — INVALID INPUT FIX */
/* ===================================== */

/* Fix invalid input background */
body.dark-mode .create-filter-modal input.is-invalid {
  background-color: #1b2a41 !important;
  color: #ffffff !important;
  border-color: #ff6666 !important;
  box-shadow: none !important;
  background-image: none !important;
}

/* Fix placeholder color in invalid state */
body.dark-mode .create-filter-modal input.is-invalid::placeholder {
  color: #94a3b8 !important; /* readable grey */
  opacity: 1 !important;
}


/* ===================================== */
/* REACT-SELECT PLACEHOLDER — LIGHT MODE */
/* ===================================== */

body:not(.dark-mode) .rs__placeholder,
body:not(.dark-mode) .custom-select__placeholder {
  color: #6d6f70 !important; /* Bootstrap muted grey */
  opacity: 1 !important;
}

/* Specifically target the placeholder to prevent the "S" clipping */
.custom-select__placeholder,
.rs__placeholder {
  margin-left: 4px !important;
  padding-left: 2px !important;
}

/* Ensure the container for the text has enough room */
.custom-select__value-container,
.rs__value-container {
  padding-left: 10px !important;
}

/* Force the input field (where you type) to not hide the first letter */
.custom-select__input-container,
.rs__input-container {
  margin-left: 0px !important;
  padding-left: 0 !important;
}

