﻿:root {
  --details: #51aee6;
  --lighter-dark-mode: #495057;
  --light-mode-bg: #f2f2f2;
  --dark-mode-bg: var(--bs-body-bg);

  --hover-dark: #1d2124;
  --hover-light: #8a9caf;
}

/* Spinner */

.loader-wrapper {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-color: rgb(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.pl,
.pl__worm {
  animation-duration: 3s;
  animation-iteration-count: infinite;
}

.pl {
  animation-name: bump;
  animation-timing-function: linear;
  width: 8em;
  height: 8em;
}

.pl__ring {
  stroke: hsla(var(--hue), 10%, 10%, 0.1);
  transition: stroke 0.3s;
}

.pl__worm {
  animation-name: worm;
  animation-timing-function: cubic-bezier(0.42, 0.17, 0.75, 0.83);
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: hsl(var(--hue), 10%, 10%);
    --fg: hsl(var(--hue), 10%, 90%);
  }

  .pl__ring {
    stroke: hsla(var(--hue), 10%, 90%, 0.1);
  }
}

/* Animations */
@keyframes bump {
  from,
  42%,
  46%,
  51%,
  55%,
  59%,
  63%,
  67%,
  71%,
  74%,
  78%,
  81%,
  85%,
  88%,
  92%,
  to {
    transform: translate(0, 0);
  }

  44% {
    transform: translate(1.33%, 6.75%);
  }

  53% {
    transform: translate(-16.67%, -0.54%);
  }

  61% {
    transform: translate(3.66%, -2.46%);
  }

  69% {
    transform: translate(-0.59%, 15.27%);
  }

  76% {
    transform: translate(-1.92%, -4.68%);
  }

  83% {
    transform: translate(9.38%, 0.96%);
  }

  90% {
    transform: translate(-4.55%, 1.98%);
  }
}

@keyframes worm {
  from {
    stroke-dashoffset: 10;
  }

  25% {
    stroke-dashoffset: 295;
  }

  to {
    stroke-dashoffset: 1165;
  }
}
/*end*/

/* Main Themes */
[data-bs-theme="light"] .navbar .sidebar {
  background-color: #d1e1e7;
}

[data-bs-theme="dark"] .navbar .sidebar {
  background-color: var(--lighter-dark-mode);
}

[data-bs-theme="light"] svg {
  fill: black;
}

[data-bs-theme="dark"] svg {
  fill: var(--details);
}

/* select2 theme bootstrap enhanced */
body .select2-container--bootstrap-5 .select2-selection {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border: var(--bs-border-width) solid var(--bs-border-color);
}

body
  .select2-container--bootstrap-5.select2-container--focus
  .select2-selection,
body
  .select2-container--bootstrap-5.select2-container--open
  .select2-selection {
  border-color: var(--bs-link-hover-color);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

body
  .select2-container--bootstrap-5
  .select2-selection--multiple
  .select2-selection__clear,
body
  .select2-container--bootstrap-5
  .select2-selection--single
  .select2-selection__clear {
  background: transparent
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23676a6d'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e")
    50%/0.75rem auto no-repeat;
}

body
  .select2-container--bootstrap-5
  .select2-selection--multiple
  .select2-selection__clear:hover,
body
  .select2-container--bootstrap-5
  .select2-selection--single
  .select2-selection__clear:hover {
  background: transparent
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e")
    50%/0.75rem auto no-repeat;
}

body .select2-container--bootstrap-5 .select2-dropdown {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border-color: var(--bs-link-hover-color);
}

body
  .select2-container--bootstrap-5
  .select2-dropdown
  .select2-search
  .select2-search__field {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  background-clip: padding-box;
  border: var(--bs-border-width) solid var(--bs-border-color);
}

body
  .select2-container--bootstrap-5
  .select2-dropdown
  .select2-search
  .select2-search__field:focus {
  border-color: var(--bs-link-hover-color);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

body
  .select2-container--bootstrap-5
  .select2-dropdown
  .select2-results__options
  .select2-results__option.select2-results__message {
  color: #6c757d;
}

body
  .select2-container--bootstrap-5
  .select2-dropdown
  .select2-results__options
  .select2-results__option.select2-results__option--highlighted {
  color: var(--bs-body-color);
  background-color: var(--bs-light-bg-subtle) !important;
}

body
  .select2-container--bootstrap-5
  .select2-dropdown
  .select2-results__options
  .select2-results__option.select2-results__option--selected,
body
  .select2-container--bootstrap-5
  .select2-dropdown
  .select2-results__options
  .select2-results__option[aria-selected="true"]:not(
    .select2-results__option--highlighted
  ) {
  color: var(--bs-body-color);
  background-color: var(--bs-dark-bg-subtle);
}

body
  .select2-container--bootstrap-5
  .select2-dropdown
  .select2-results__options
  .select2-results__option.select2-results__option--disabled,
body
  .select2-container--bootstrap-5
  .select2-dropdown
  .select2-results__options
  .select2-results__option[aria-disabled="true"] {
  color: #6c757d;
}

body
  .select2-container--bootstrap-5
  .select2-dropdown
  .select2-results__options
  .select2-results__option[role="group"]
  .select2-results__group {
  color: #6c757d;
}

body
  .select2-container--bootstrap-5
  .select2-selection--single
  .select2-selection__rendered {
  color: var(--bs-body-color);
}

body
  .select2-container--bootstrap-5
  .select2-selection--single
  .select2-selection__rendered
  .select2-selection__placeholder {
  color: #6c757d;
}

body
  .select2-container--bootstrap-5
  .select2-selection--multiple
  .select2-selection__rendered
  .select2-selection__choice {
  color: var(--bs-body-color);
  border: var(--bs-border-width) solid var(--bs-border-color);
}

body
  .select2-container--bootstrap-5.select2-container--disabled
  .select2-selection,
body
  .select2-container--bootstrap-5.select2-container--disabled.select2-container--focus
  .select2-selection {
  color: #6c757d;
  background-color: var(--bs-light-bg-subtle);
  border-color: var(--bs-dark-bg-subtle);
}

.is-valid + body .select2-container--bootstrap-5 .select2-selection,
.was-validated
  select:valid
  + body
  .select2-container--bootstrap-5
  .select2-selection {
  border-color: #198754;
}

.is-valid
  + body
  .select2-container--bootstrap-5.select2-container--focus
  .select2-selection,
.is-valid
  + body
  .select2-container--bootstrap-5.select2-container--open
  .select2-selection,
.was-validated
  select:valid
  + body
  .select2-container--bootstrap-5.select2-container--focus
  .select2-selection,
.was-validated
  select:valid
  + body
  .select2-container--bootstrap-5.select2-container--open
  .select2-selection {
  border-color: #198754;
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

.is-invalid + body .select2-container--bootstrap-5 .select2-selection,
.was-validated
  select:invalid
  + body
  .select2-container--bootstrap-5
  .select2-selection {
  border-color: #dc3545;
}

.is-invalid
  + body
  .select2-container--bootstrap-5.select2-container--focus
  .select2-selection,
.is-invalid
  + body
  .select2-container--bootstrap-5.select2-container--open
  .select2-selection,
.was-validated
  select:invalid
  + body
  .select2-container--bootstrap-5.select2-container--focus
  .select2-selection,
.was-validated
  select:invalid
  + body
  .select2-container--bootstrap-5.select2-container--open
  .select2-selection {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.hover_warn:hover {
  color: var(--bs-red) !important;
}

/* End of Main Themes */

.pt-10 {
  padding-top: 3rem !important;
}

/* Navbar */
.navbar-toggler {
  border: none;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler-icon {
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="rgb(81, 174, 230)"%3E%3Crect y="6" width="30" height="1.5" rx="1" /%3E%3Crect y="14" width="30" height="1.5" rx="1" /%3E%3C/svg%3E');
}

.dropdown-item:focus {
  background-color: var(--details);
}

[data-bs-theme="dark"] .dropdown-item:hover {
  background-color: var(--hover-dark);
}

[data-bs-theme="light"] .dropdown-item:hover {
  background-color: var(--hover-light);
}

/* Navbar end */

/* Sidebar */
main {
  display: flex;
  /* grid-template-columns: auto 2fr;*/
}

.sidebar {
  min-height: 100vh;
  height: auto;
  width: 280px;
  box-sizing: border-box;
  padding: 5px 1em;

  position: sticky;
  top: 0;
  align-self: start;

  transition: 300ms ease-in-out;
  overflow: hidden;
  text-wrap: nowrap;
}

[data-bs-theme="dark"] .sidebar {
  border-right: 1px solid var(--details);
}

[data-bs-theme="light"] .sidebar {
  border-right: 1px solid black;
}

.sidebar.close {
  padding: 5px 5px 0 7px;
  width: 60px;
}

.sidebar.close .menu-item svg:first-child {
  margin-right: 10px;
}

.sidebar ul {
  list-style: none;
}

.sidebar > ul > li:first-child {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

[data-bs-theme="dark"] .sidebar ul li.active a {
  background-color: var(--hover-dark);
}

[data-bs-theme="light"] .sidebar ul li.active a {
  background-color: var(--hover-light);
}

.sidebar a,
.sidebar .dropdown-btn,
.sidebar .sidebar-toggle {
  border-radius: 0.5em;
  padding: 0.85em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 1em;
}

[data-bs-theme="dark"] .sidebar a,
.sidebar .dropdown-btn span {
  color: var(--details);
}

[data-bs-theme="light"] .sidebar a,
.sidebar .dropdown-btn span {
  color: black;
}

[data-bs-theme="dark"] .sidebar .dropdown-btn span {
  color: var(--details);
}

[data-bs-theme="light"] .sidebar .dropdown-btn span {
  color: black;
}

.dropdown-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

.menu-item {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  border-radius: 0.5em;
}

.sidebar ul {
  padding-left: 0;
}

.sidebar svg {
  flex-shrink: 0;
}

.sidebar a span,
.sidebar .dropdown-btn span {
  flex-grow: 1;
}

[data-bs-theme="dark"] .sub-menu li:hover {
  background-color: var(--hover-dark);
}

[data-bs-theme="light"] .sub-menu li:hover {
  background-color: var(--hover-light);
}

[data-bs-theme="dark"] .sidebar .dropdown-btn:hover {
  background-color: var(--hover-dark);
}

[data-bs-theme="light"] .sidebar .dropdown-btn:hover {
  background-color: var(--hover-light);
}

[data-bs-theme="dark"] .menu-item a:hover {
  background-color: var(--hover-dark);
}

[data-bs-theme="light"] .menu-item a:hover {
  background-color: var(--hover-light);
}

.sidebar .sub-menu {
  display: grid;
  transition: 300ms ease-in-out;
  grid-template-rows: 0fr;
  padding-left: 1em;

  > div {
    overflow: hidden;
  }
}

.sidebar .sub-menu.show {
  grid-template-rows: 1fr;
}

.dropdown-btn svg {
  transition: 200ms ease;
}

.rotate svg:last-child {
  rotate: 180deg;
}

.sidebar-toggle {
  margin-left: auto;
  padding: 1em;
  border: none;
  border-radius: 0.5em;
  background: none;
  cursor: pointer;

  svg {
    transition: rotate 150ms ease;
  }
}

[data-bs-theme="dark"] .sidebar-toggle:hover {
  background-color: var(--hover-dark);
}

[data-bs-theme="light"] .sidebar-toggle:hover {
  background-color: var(--hover-light);
}

/* Sidebar end */

/* Standard buttons */
.btn {
  border-radius: 11px;
  padding: 10px 20px;
  border-color: var(--details);
  font-size: 1rem;
  background: 0 0;
  color: black;
}

.btn-warn {
  border-radius: 11px;
  padding: 10px 20px;
  border-color: var(--bs-danger);
  font-size: 1rem;
  background: 0 0;
}

.btn-suc {
  border-radius: 11px;
  padding: 10px 20px;
  border-color: var(--bs-success);
  font-size: 1rem;
  background: 0 0;
}

.btn:hover {
  transition-duration: 0.3s;
  background-color: var(--details);
}

.btn-warn:hover {
  transition-duration: 0.3s;
  background-color: var(--bs-danger);
}

.btn-suc:hover {
  transition-duration: 0.3s;
  background-color: var(--bs-success);
}

/* Tables Style */
.table-container {
  overflow-x: auto;
  max-height: 700px !important;
  height: auto;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.custom-table {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-collapse: separate !important;
  border: 1px solid #ddd;
}

.custom-table th {
  padding: 12px 15px; /* Padding for header cells */
  text-align: left; /* Align header text to the left */
  font-size: 16px;
}

/* Body Row Style */
.custom-table tbody tr {
  border-bottom: 1px solid #ddd; /* Light gray border between rows */
  transition: background-color 0.3s ease-in-out; /* Smooth transition on hover */
}

/* Body Cells Style */
.custom-table td {
  padding: 12px 15px; /* Padding for table cells */
  text-align: left; /* Align text to the left */
  font-size: 16px;
}

.custom-table tbody tr:first-child {
  position: sticky;
  top: 0; /* Adjust this value if you have a fixed navbar */
  background-color: var(--details); /* Ensure the background is visible */
  z-index: 10; /* Ensure it stays above other content */
  padding: 1em 0 1em 0;
}

.custom-table tbody tr td:nth-child(1) {
  position: sticky;
  left: 0; /* Adjust this value based on the width of the first column */
  z-index: 2; /* It stays behind the first column but above the rest */
}

.custom-table tbody tr td:nth-child(2) {
  position: sticky;
  z-index: 2; /* It stays behind the first column but above the rest */
  border-right: 1px solid var(--lighter-dark-mode); /* Optional: Add a border to the second column */
}

.custom-table {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}

.custom-table td {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
}

.custom-table td a {
  color: var(--bs-body-color);
  text-decoration: none;
}

/* Hover effect for rows */
[data-bs-theme="light"] .custom-table tbody tr:hover {
  background-color: #f1f1f1; /* Light gray background on hover */
}

[data-bs-theme="light"] .custom-table tbody tr:first-child:hover {
  background-color: var(--light-dark-mode);
}

.custom-table td a:hover {
  color: var(--details);
}

/* Default Page */
.status-circle {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-left: 10px;
  transition: background-color 0.3s ease;
}

.icon_on_input {
  float: right;
  margin-left: -25px;
  margin-top: -30px;
  right: 10px;
  position: relative;
  z-index: 2;
}

/*Calendar Control CSS*/
.ajax__calendar {
  width: 25% !important;
  height: 40% !important;
}

.ajax__calendar_container {
  border: solid 1px var(--details) !important;
  background-color: var(--bs-body-bg) !important;
  width: 250px !important;
  border-radius: 5px !important;
}

.ajax__calendar_header {
  margin-bottom: 4px !important;
}

.ajax__calendar_title,
.ajax__calendar_next,
.ajax__calendar_prev {
  color: var(--details) !important;
  padding-top: 3px !important;
}

.ajax__calendar_body {
  width: 100% !important;
}

.ajax__calendar_days,
.ajax__calendar_days table {
  width: 100% !important;
  margin: 2px !important;
}

.ajax__calendar_dayname {
  text-align: center;
  font-weight: bolder;
  margin-bottom: 4px;
  margin-top: 2px;
  color: var(--bs-body-color);
}

.ajax__calendar_dayname:hover {
  color: var(--details);
}

.ajax__calendar_day {
  text-align: center !important;
}

.ajax__calendar_day:hover {
  border: 0.2px solid var(--details) !important;
  border-radius: 5px;
}


/*Start Toast*/

#snackbar {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 2px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    left: 50%;
    bottom: 30px;
    font-size: 17px;
}

#snackbar.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@-webkit-keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}

@keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}

/*End Toast*/
