/* Custom CSS */
body {
  font-family: "Roboto", sans-serif;
  background-color: #f8f9fa;
  margin: 0;
}

/* Navbar Styling */
.navbar {
  background: linear-gradient(to right, #2c3e50, #34495e);
  padding: 3px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid gray;
  z-index: 3; /* Ensure the navbar is above the sidebar */
  height: 6%;
  font-size: small;
}

.navbar-brand {
  /* font-size:smaller; */
  font-weight: strong;
  color: #fff;
  transition: color 0.3s ease, transform 0.3s ease;
}

.navbar-brand:hover {
  color: #ffc107;
  transform: scale(1.05);
}

/* YouTube-like Search Bar Styling */
.form-search-container {
  display: flex;
  align-items: stretch;
}

.btn-search {
  /* border-top-right-radius: 15px;
  border-bottom-right-radius: 15px; */
  margin-left: -12px;
  transition: width 0.3s ease, border-radius 0.3s ease;
  transform: translateZ(2);
}

/* Dropdown Menu Styling */
.dropdown {
  position: relative;
}

.dropdown-menu {
  font-size: 0.9rem;
  background-color: #2c3e50;
  border: 1px solid #555;
  z-index: 10;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 5px;
}

.dropdown-item {
  color: #fff;
  margin-left: 20px;
  font-size: 12px;
}

.dropdown-toggle {
  color: #333;
  text-decoration: none;
  display: flex;
  align-items: center;
  color: white;
  margin-right: -5px;
}

.dropdown-item:hover {
  background-color: #34495e;
  width: auto;
}

/* Sidebar Styling */
.admin-sidebar {
  background-color: rgba(44, 62, 80, 1) !important;
  color: #fff;
  height: 100vh !important;
  position: fixed !important;
  width: 200px !important;
  padding-top: 70px !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  padding-left: 20px !important;
  transition: width 0.3s ease;
  border-right: solid 1px grey;
  z-index: 2; /* Ensure sidebar is behind the content */
  border-right: 1px solid gray;
  font-size: smaller;
}
.sidebar-closed {
  width: 0 !important;
}

.footer-color {
  height: 40px;
  text-align: center;
  padding-top: 10px;
  z-index: 1 !important;
  background-color: rgba(44, 62, 80, 1);
  color: #fff;
}

.footer_auth {
  height: 40px;
  text-align: center;
  padding-top: 10px;
  z-index: 1; /* Ensure footer is above the sidebar */
  /* padding: 15px 0; */
  position: fixed;
  bottom: 0;
  width: 100%;
}

/* Toggle Button Styling */
.toggle-btn {
  position: fixed;
  top: 88%;
  left: 10px;
  background-color: rgba(44, 62, 80, 0.9);
  color: #fff;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  z-index: 250; /* Ensure toggle button is above other elements */
  transition: left 0.3s ease, transform 0.3s ease;
}

.toggle-btn:hover {
  color: #ffc107;
  transform: scale(1.05);
}

/* Admin Content Styling */
.admin-content {
  margin-left: 220px;
  padding: 20px;
  position: relative;
  z-index: 0; /* Ensure admin content is behind the sidebar */
}

/* Sidebar Content Styling */
.sidebar-content {
  list-style-type: none;
  padding: 0;
}

.sidebar-content li {
  padding: 10px;
  position: relative;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: background-color 0.3s ease;
}

.sidebar-content li:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffc107;
  transform: scale(1.02);
}

.sidebar-content li.active {
  background-color: rgba(255, 255, 255, 0.2);
}

.sidebar-content li.home {
  background-color: #2980b9;
  /* font-size: 0.02rem; */
  font-weight: strong;
}

.sidebar-content li .child-menu {
  display: none !important;
  padding-left: 20px;
  position: absolute;
  left: 100%;
  top: 0;
  z-index: 5 !important; /* Ensure child menu is above other elements */
  background-color: rgba(44, 62, 80, 0.9);
  white-space: nowrap;
  list-style-type: none;
}

.sidebar-content li.has-child:hover .child-menu {
  display: block !important;
  z-index: 5 !important;
}

.sidebar-content li.has-child::after {
  content: "\f107";
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 1.2em;
  z-index: 5;
  transition: transform 0.3s ease;
}

.sidebar-content li.has-child:hover::after {
  transform: translateY(-50%) rotate(180deg);
}

/* Content margin-top */
.mt-custom {
  margin-top: 2rem;
}
/* Page heading */
.navbar-brand.text-dark.p-header {
  font-size: 0.9rem;
}
/* Custom CSS for Breadcrumb */
.breadcrumb .breadcrumb-item {
  font-size: 0.9rem;
}

/* Custom CSS for performance tiles */
.performance-tiles {
  position: relative;
  padding-right: 0px;
  padding-left: 0px;
  z-index: 0;
}

.performance-tiles .col-lg-3,
.performance-tiles .col-md-6 {
  padding-right: 2px;
  padding-left: 2px;
}
.card-title {
  font-size: smaller;
}

.card-text {
  font-size: smaller;
}
.card-footer {
  font-size: smaller;
}

@keyframes reduceHeight {
  from {
    height: 100vh;
  }

  to {
    height: calc(100vh - 40px);
  }
}

@keyframes expandHeight {
  from {
    height: calc(100vh - 40px);
  }

  to {
    height: 100vh;
  }
}

/* Responsive Styles for performance tiles */
@media (max-width: 768px) {
  .performance-tiles {
    position: relative;
    padding-right: 0px;
    padding-left: 0px;
    z-index: 0; /* Adjust the z-index value as needed */
    margin-top: 3px;
  }

  .performance-tiles .col-lg-3,
  .performance-tiles .col-md-6 {
    padding-right: 2px;
    padding-left: 2px;
  }

  /* .form-control-sm {
    width: 100%;
    border-radius: 0;
    margin-top: 10px !important;
    border-radius: 10px;
  } */

  /* .form-control-sm:focus {
    width: 100%;
    border-radius: 0;
  } */

  .btn-search {
    margin-top: 10px !important;
    border-radius: 10px;
    margin-left: -5px;
  }

  .toggle-btn {
    left: 5px;
  }

  .admin-sidebar {
    width: 0;
    opacity: 0;
    overflow-x: hidden;
    transition: width 0.3s ease, opacity 0.3s ease;
  }

  .admin-content {
    margin-left: 0; /* Ensure it is 0 by default */
    transition: margin-left 0.3s ease;
  }

  .admin-sidebar.sidebar-closed + .admin-content {
    margin-left: 0; /* Adjust as needed based on the closed sidebar width */
  }

  .breadcrumb-item {
    display: block;
    margin-bottom: 5px; /* Adjust spacing */
  }

  .breadcrumb-item:not(:last-child)::after {
    content: none; /* Hide separator on smaller screens */
  }
  .p-header {
    margin-left: -10px;
    font-size: 1.2rem;
  }
  .breadcrumb {
    background-color: transparent;
    padding: 0;
  }

  .chart-container canvas {
    position: absolute;
    width: 200% !important;
    height: 200% !important;
  }
}

.sidebar-closed {
  opacity: 0;
  width: 0;
  overflow-x: hidden;
}

/* Breadcrumb Styling */
.p-header {
  font-size: 1.2rem;
}
.breadcrumb {
  background-color: transparent;
  padding: 0;
}

.breadcrumb-item a {
  font-size: 0.9rem;
  text-decoration: none;
}

.breadcrumb-item.active {
  color: #555;
}

.breadcrumb-item:not(:last-child)::after {
  color: #555;
  margin: 0 5px;
}

/*DataTable Style */
#example tbody tr {
  height: 10px !important;
  margin: 0px !important;
  padding: 0px !important;
}
#example th {
  padding: 3px;
}

#example tbody td {
  padding: 3px;
}
* #example .paginate_button current {
  height: 20px !important;
  padding: 3px !important;
}

div.dataTables_wrapper div.dataTables_filter input {
  height: 30px;
  margin-bottom: 10px;
}

#example .pagination .page-item .page-link {
  padding: 5px;
  height: 10px;
  line-height: 1.2;
}

.btn-group-xs > .btn {
  height: 10px;
  line-height: 1;
  border-radius: 0;
}

.btn-group-xs .fa {
  font-size: 5px;
}

#example {
  font-size: 12px;
}

.dataTables_length select {
  height: 30px;
  margin-right: 10px;
}

#example thead th {
  border-top: 1px solid #dee2e6;
}

/* Reduce the height of card-header and adjust font size */
.card-header {
  padding: 0.25rem 1.25rem;
  margin-bottom: 0;
  background-color: #f8f9fa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  font-size: 0.875rem;
}

/* Adjust the styling of the action buttons */
.btn-group-xs .btn {
  height: 18px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  border-radius: 0;
}

/* Style the modal load button to match the action buttons */
#openModalButton {
  height: 18px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

/* Style the modal load  */
.modal {
  z-index: 1050;
}

.modal-backdrop {
  z-index: 1040;
}

.modal-dialog {
  top: 10%;
  width: 100%;
  z-index: 5000;
}

/*chart style */

.chart-container {
  position: relative;
  width: 100%;
  padding-bottom: 75%; /* Adjust this value to control the height-to-width ratio */
}

.chart-container canvas {
  position: absolute;
  width: 100%;
  height: 100%;
}

/* Custom styles for SweetAlert */
/* Custom styles for SweetAlert */
.custom-content-class {
  margin: 0px auto !important;
}
.swal2-popup {
  font-size: 14px;
  max-width: 25%;
  margin-top: 10px !important;
}
.swal2-popup .swal2-content {
  margin: -1 !important;
}

.swal2-title {
  font-size: 16px;
  margin-bottom: 0px !important;
}

.swal2-content {
  font-size: 14px;
  margin-bottom: 8px;
}

.swal2-icon {
  font-size: 8px;
  margin-top: -1px !important;
  border: 1px solid red;
}

.swal2-confirm,
.swal2-cancel {
  font-size: 14px;
  padding: 8px 12px; /* Adjust as needed */
  margin-top: 5px;
  width: 70px !important;
  height: 30px !important;
  display: flex;
  align-items: center;
}

/* Optional: Make SweetAlert 100% responsive */
@media (max-width: 767px) {
  .swal2-popup {
    max-width: 70%;
  }
}
/* Media Query for smaller screens */
@media (max-width: 992px) {
  .navbar {
    height: 10%; /* Adjust height for smaller screens */
  }
}
/* Content margin-top */
@media (max-width: 576px) {
  .mt-custom {
    margin-top: 2.5rem;
  }
}

/* Custom CSS for centering elements on small screens */
@media screen and (max-width: 576px) {
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    display: flex;
    justify-content: center;
  }

  .dataTables_wrapper .dataTables_length select,
  .dataTables_wrapper .dataTables_filter input {
    margin: 0.25rem; /* Add margin for spacing */
  }
}
/* Custom CSS for smaller DataTables buttons */
@media screen and (max-width: 576px) {
  .dataTables_wrapper .dataTables_paginate {
    display: flex;
    justify-content: center; /* Align buttons to the middle */
    flex-wrap: wrap; /* Allow buttons to wrap to the next line */
  }

  .dataTables_wrapper .dataTables_paginate .paginate_button {
    margin: 0.25rem; /* Add margin to create space between buttons */
  }
}

/* Keep the same size on hover and current */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem; /* Adjust font size as needed */
}

/* For authentication */
.registration-container,
.login-container,
.forgot-password-container {
  max-width: 400px;
  margin: 100px auto 0; /* Center the containers vertically and horizontally */
}

.registration-form,
.login-form,
.forgot-password-form {
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 10px;
}

@media (max-width: 576px) {
  .registration-container,
  .login-container,
  .forgot-password-container {
    margin-top: 50px;
  }
}

/* On Auth Failure */
.auth-fail {
  display: none;
  width: auto;
}

/* Success fail alerts on form submission */
/* For alert messages */
.alerts {
  width: 400px !important;
  margin: 0 auto;
  /* Center horizontally */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  padding-top: 30px;
  font-size: 12px !important;
  font-family: Arial, Helvetica, sans-serif;
}

.label {
  font-family: Arial, sans-serif;
  font-size: smaller;
}

.sub-header {
  font-family: Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: bold;
}

/* Handle select2 */
.select2-selection__rendered {
  font-size: 12px !important;
}

.select2-dropdown .select2-results__option {
  font-size: 12px !important;
  margin-top: 2px !important;
  margin-bottom: 2px !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
}
.select2-search__field {
  height: 30px !important;
}

/* Handle form controls */
/* Set font size for all relevant input classes */
.form-control,
.form-select,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
  font-size: 12px;
}
[class*="level"],
[class*="level1"],
[class*="form-label1"],
[class*="form-label"],
[id*="level"] {
  font-size: 12px;
}
.btn {
  padding: 0px 10px;
  border-radius: 0;
}

small {
  font-size: 10px;
}

/* For select2 */
.select2-search__field {
  height: 30px !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  padding-top: 0px !important;
  padding-bottom: 0px !important;
  z-index: 99999999999 !important;
}
span.select2-container {
  z-index: 10050;
}

.centered-alert {
  display: flex;
  align-items: center; /* Vertically centers the content */
  justify-content: center; /* Optionally horizontally center */
  height: auto; /* Let the height adjust based on content */
  padding-bottom: 35px; /* Custom padding */
  position: absolute;
  transform: translate(-50%, -50%);
  max-width: 90%; /* Ensure it doesn't overflow */
}

/* Custom Select2 Styles */
.select2-container {
  width: 100% !important; /* Ensure it takes up full width */
}

.select2-selection--multiple {
  border: 1px solid #ced4da !important; /* Match form-control border */
  border-radius: 0.375rem; /* Match form-control border-radius */
  /* padding: 0.375rem 0.75rem; Match form-control padding */
  padding-top: 0.75rem;
  min-height: calc(1.5em + 1rem + 2px); /* Match form-control height */
}

.select2-selection {
  border: 1px solid #ced4da !important; /* Match form-control border */
}

.select2-selection__choice {
  background-color: #007bff;
  border-color: #0056b3;
  /* color: #fff; */
  color: black;
  padding: 0.25em 0.5em;
  margin-top: 0.25rem;
  border-radius: 0.25rem;
}

.select2-selection__choice__remove {
  color: #fff;
  margin-right: 5px;
}

/* When invalid, apply the same red border used in Bootstrap */
.is-invalid .select2-selection {
  border-color: #dc3545 !important; /* Red border for invalid state */
}

.is-valid .select2-selection {
  border-color: #28a745 !important; /* Green border for valid state */
}

.multiple-select {
  height: 20px !important;
}

.select2-container--default.select2-container--multiple
  .select2-selection__placeholder {
  font-size: 14px; /* Adjust font size as needed */
}

/* International phone number */
.iti {
  width: 100%;
}

.iti input {
  padding-left: auto !important;
  font-size: 12px !important;
}

.iti .iti__selected-flag {
  z-index: 10;
}

.iti__search-input {
  height: 25px !important;
  font-size: 12px !important;
  padding: 4px 10px !important;
  border: 1px solid #ced4da !important;
  border-radius: 0rem !important;
  width: 100% !important;
  outline: none !important;
  box-shadow: none !important;
}

.iti__search-input:focus {
  border-color: #86b7fe !important;
  /* box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important; */
}
