﻿html {
  font-size: 16px !important;
}

@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; */
  box-shadow: 0 0 0px 2px var(--first-color-a);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  /* margin-bottom: 60px; */
}


.is-invalid {
  border: 1px solid red !important;
  /* background-color: transparent !important; */
  color: var(--text-color) !important;
  /*background-color: lightcoral !important;*/
}

.required-field::after {
  content: " *";
  color: red;
  font-weight: bold;
}


.floating-box {
  position: fixed;
  bottom: 0;
  right: 0;
  background-color: white;
  border-top-left-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  transition: height 0.3s ease-in-out;
}

  .floating-box .ri-arrow-up-s-line {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.5s ease;
    transform: rotate(180deg);
  }

  .floating-box.expanded .ri-arrow-up-s-line {
    transform: rotate(0deg);
  }

.floating-box-content {
  display: none;
  padding-top: 10px;
}

.org-list,
.common-info {
  padding: 5px 0;
}

  .org-list div,
  .common-info div {
    padding: 3px 0;
  }

.floating-box ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

  .floating-box ul li {
    padding: 3px 0;
  }

.fHr {
  margin: 0.3rem;
}

.custom-modal {
  background-color: var(--site-background-color);
  border: 1px solid var(--border-color);
}

#merchandiseGroupTable,
td,
table.dataTable th {
  color: var(--text-color) !important;
  background-color: var(--body-color) !important;
}


th,
#historyTableHeaderText {
  color: var(--title-color);
}

.dt-vertical-center {
  vertical-align: middle;
}

.dt-search input {
  border-color: var(--text-color) !important;
}

.passcode-input,
.logout-passcode-input {
  width: 3.3rem;
  height: 3.3rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: bold;
  border: 2px solid #007bff;
  border-radius: 5px;
  margin: 0.25rem;
}

  .passcode-input:focus,
  .logout-passcode-input:focus {
    outline: none;
    border-color: #0056b3;
  }



.user-switcher {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Username Truncation */
.username-truncate {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 10px;
  font-size: 1rem;
}

/* Switch Icon */
.user-switch-icon {
  font-size: 1.2rem;
  cursor: pointer;
  color: #6c757d;
  transition: color 0.3s ease;
}

/* Dropdown Styles with very dim white border */
.user-dropdown {
  min-width: 250px;
  padding: 0.5rem 0;
  border: none;
  margin-top: 0.5rem;
  background: var(--body-color) !important;
  color: var(--first-color);
  border: solid 1px var(--border-color);
}

  .user-dropdown li a {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
  }

.user-avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.user-details {
  margin-left: 0.75rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

  .user-details .user-name {
    font-weight: 500;
    line-height: 1.2;
    text-overflow: ellipsis;
    overflow: hidden;
    color: var(--text-color);
  }

  .user-details small {
    font-size: 0.75rem;
    text-overflow: ellipsis;
  }

.user-email {
  font-size: 0.8rem;
  max-width: 150px;
  overflow: hidden;
  white-space: nowrap;
}

.selected-user {
  background-color: rgba(13, 110, 253, 0.1);
  border-color: #0d6efd !important;
}

.modal {
  -webkit-backdrop-filter: blur(5px) !important;
  /* For WebKit-based browsers */
  backdrop-filter: blur(5px) !important;
  z-index: 1000001 !important
}

.select2-dropdown {
  z-index: 1000002 !important;
}

.passcodeInputContainer {
  min-width: 400px !important;
}

/* ======= REVISION HISTORY for forms ======== */

/* Updated CSS */
.history-timeline {
  height: 30px;
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  padding: 0 10px;
  /* Add padding to account for dot overflow */
}

.history-line {
  height: 2px;
  background-color: #dee2e6;
  width: 100%;
  z-index: 1;
}

.history-dots-container {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  height: 100%;
}

.history-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgb(107, 107, 221);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

  .history-dot:hover {
    transform: translateY(-50%) scale(1.3);
  }

.history-dot-active {
  width: 20px;
  height: 20px;
  background-color: rgba(0, 0, 255, 1);
  transform: translateY(-50%) scale(1.3);
  z-index: 3;
}

.history-field-changed {
  border-color: red !important;
  background-color: transparent;
}

.card-header {
  background-color: var(--border-color) !important;
}

.card {
  color: var(--text-color) !important;
  background-color: transparent !important;
  border-color: var(--text-color) !important;
  padding: 0 !important;
}

#prevHistoryBtn,
#nextHistoryBtn {
  min-width: 35px;
}

.fc-day.fc-widget-content.fc-today {
  background-color: var(--border-color) !important;
}

.selected-avatar {
  border: 5px solid #0d6efd;
}

.avatar-option:hover img,
.border-element .content:hover {
  opacity: 0.8;
  transition: all 0.2s;
  cursor: pointer;
}

.avatar-option img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  cursor: pointer;
}


@keyframes spin_avatar {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

#profilePicturePreview {
  width: 150px;
  height: 150px;
  object-fit: cover;
}

.avatar-upload {
  width: 70px;
  height: 70px;
}

  .avatar-upload:hover {
    opacity: 0.8;
  }

  .avatar-upload .border-element {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px dashed #ccc;
    border-radius: 50%;
    pointer-events: none;
  }

.avatar-option .border-element .content i {
  font-size: 24px;
  color: #6c757d;
}

.avatar-upload:hover .border-element {
  animation: spin_avatar 7s linear infinite;
  border-color: #888;
  /* Optional: change border color on hover */
}

.avatar-upload .content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/*============== TOAST NOTIFICATIONS ============*/
:root {
  --tr: all 0.5s ease 0.5s;
  --ch1: #05478a;
  --ch2: #0070e0;
  --cs1: #005e38;
  --cs2: #03a65a;
  --cw1: #c24914;
  --cw2: #fc8621;
  --ce1: #851d41;
  --ce2: #db3056;
  --toast-transition: all 2s ease;
}

/* Enhance the transforming class for smooth transitions */
.toast-item.transforming {
  transition: var(--toast-transition);
}

  .toast-item.transforming .toast {
    transition: var(--toast-transition);
  }

    .toast-item.transforming .toast:before {
      transition: background-color 0.5s ease;
    }

  .toast-item.transforming h3 {
    transition: color 0.5s ease;
  }

.toast-panel {
  position: fixed;
  top: 70px;
  /* right: 10px; */
  right: 0;
  z-index: 99999;
  width: 300px;
  max-width: 100%;
  z-index: 1000002;
}

@media screen and (min-width: 1150px) {
  .toast-panel {
    top: 120px;
  }
}


.toast {
  background: var(--floating-box-color);
  display: block !important;
  color: var(--text-color) !important;
  padding: 1rem 2rem 1rem 3rem;
  text-align: center;
  border-radius: 15px;
  position: relative;
  font-weight: 300;
  /* margin: 1rem 0; */
  text-align: left;
  transition: var(--tr);
  opacity: 1;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;

  box-shadow: 0 0 .5rem 2px var(--shadow-color);
}

  .toast:not(.loading)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: var(--clr);
    transform-origin: left;
    animation: progress-bar var(--toast-duration, 5s) linear forwards;
  }

@keyframes progress-bar {
  0% {
    transform: scaleX(1);
  }

  100% {
    transform: scaleX(0);
  }
}

.toast:not(.loading):before {
  content: "";
  position: absolute;
  width: 0.5rem;
  height: calc(100% - 1.5rem);
  top: 0.75rem;
  left: 0.5rem;
  z-index: 999999;
  border-radius: 1rem;
  background: var(--clr);
}

.toast h3 {
  font-size: 1.2rem;
  margin: 0;
  line-height: 1.35rem;
  font-weight: 600;
  position: relative;
  color: var(--clr);
}

.toast p {
  position: relative;
  font-size: 0.95rem;
  z-index: 99999999;
  margin: 0.25rem 0 0;
  color: var(--text-color);
  line-height: 1.3rem;
}

.close {
  position: absolute;
  width: 1.35rem;
  height: 1.35rem;
  text-align: center;
  right: 1rem;
  cursor: pointer;
  border-radius: 100%;
}

  .close:after {
    position: absolute;
    font-family: 'Varela Round', san-serif;
    width: 100%;
    height: 100%;
    left: 0;
    font-size: 1.8rem;
    content: "+";
    transform: rotate(-45deg);
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #595959;
    text-indent: 1px;
  }

  .close:hover:after {
    background: var(--clr);
    color: #fff;
  }

.toast-item {
  max-height: 25rem;
  transition: var(--tr);
  position: relative;
  transform: translateX(100%);
  opacity: 0;
  overflow: hidden;
  padding: .5rem 1rem;
}

  .toast-item.show {
    transform: translateX(0);
    opacity: 1;
    animation: toast-in-right 0.5s ease forwards;
  }

  .toast-item.hide {
    animation: toast-out-right 0.5s ease forwards;
  }

  .toast-item.removing {
    max-height: 0;
    margin: 0;
    padding: 0;
    border: none;
    overflow: hidden;
  }

  .toast-item.transforming {
    transition: all 0.3s ease;
  }



.toast a {
  color: var(--clr);
}

  .toast a:hover {
    color: var(--bg);
  }

/*** ICONS ***/
.toast-icons {
  background: #fff;
  padding: 1rem 1rem 1.25rem 1rem;
  display: flex;
  justify-content: space-around;
  border-radius: 1rem;
  gap: 1.5rem;
  width: 100%;
  box-sizing: border-box;
  margin-top: 1rem;
  margin-bottom: 1rem;
  position: relative;
  border: 0.15rem solid #fff1;
}

  .toast-icons:before {
    position: absolute;
    width: calc(100% + 0.3rem);
    height: calc(100% + 0.25rem);
    --bg-help: 45%;
    --bg-success: 45%;
    --bg-warning: 45%;
    --bg-error: 45%;
    --bsc: #fff0;
    background: radial-gradient(circle at 14% var(--bg-help), var(--ch1), #fff0 1.5rem), radial-gradient(circle at 38% var(--bg-success), var(--cs1), #fff0 1.5rem), radial-gradient(circle at 62% var(--bg-warning), var(--cw1), #fff0 1.5rem), radial-gradient(circle at 86% var(--bg-error), var(--ce1), #fff0 1.5rem);
    content: "";
    bottom: -0.15rem;
    border-radius: 1rem;
    z-index: 999999;
    transition: var(--bg-help) 0.5s ease 0s, var(--bg-success) 0.5s ease 0s, var(--bg-warning) 0.5s ease 0s, var(--bg-error) 0.5s ease 0s, var(--bsc) 0.5s ease 0s;
  }

  .toast-icons:has(label[for=t-help]:hover):before {
    --bg-help: 53%;
    --bsc: var(--ch2);
  }

  .toast-icons:has(label[for=t-success]:hover):before {
    --bg-success: 53%;
    --bsc: var(--cs2);
  }

  .toast-icons:has(label[for=t-warning]:hover):before {
    --bg-warning: 53%;
    --bsc: var(--cw2);
  }

  .toast-icons:has(label[for=t-error]:hover):before {
    --bg-error: 53%;
    --bsc: var(--ce2);
  }

.toast-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  position: relative;
  background: radial-gradient(circle at 50% 50%, var(--clr) 1.25rem, var(--brd) calc(1.25rem + 1px) 100%);
}

  .toast-icon:after {
    font-size: 1.75rem;
  }

.icon-success:after {
  font-size: 1.5rem;
  padding-bottom: 0.25rem;
}

.icon-error:after {
  font-size: 2.85rem;
  line-height: 2rem;
  font-weight: 500;
  padding-top: 0.25rem;
  max-height: 2rem;
}

.icon-help,
.toast-item.help {
  --clr: #0070e0;
  --brd: #0070e040;
}

.icon-success,
.toast-item.success {
  --clr: #03a65a;
  --brd: #03a65a40;
}

.icon-warning,
.toast-item.warning {
  --clr: #fc8621;
  --brd: #fc862140;
}

.icon-error,
.toast-item.error {
  --clr: #db3056;
  --brd: #db305640;
}

.icon-loading,
.toast-item.loading {
  --clr: #0070e0;
  --brd: #0070e040;
}

.icon-confirm,
.toast-item.confirm {
  --clr: #0070e0;
  --brd: #0070e040;
}

.spinner {
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--clr);
  animation: spin 1s linear infinite;
}

@keyframes toast-in-right {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toast-out-right {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes spin {
  0% {
    transform: translateY(-50%) rotate(0deg);
  }

  100% {
    transform: translateY(-50%) rotate(360deg);
  }
}

@keyframes toast-in-bottom {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes toast-out-top {
  from {
    transform: translateY(0);
    opacity: 1;
  }

  to {
    transform: translateY(-100%);
    opacity: 0;
  }
}

.toast-item.loading .toast {
  padding-left: 2.5rem;
}

#t-help:checked ~ .toast-panel .toast-item.help,
#t-success:checked ~ .toast-panel .toast-item.success,
#t-warning:checked ~ .toast-panel .toast-item.warning,
#t-error:checked ~ .toast-panel .toast-item.error {
  max-height: 0;
  opacity: 0;
}

#toast-templates {
  display: none !important;
}


.dtfh-floatingparent.dtfh-floatingparent-head {
  top: 0 !important;
  border: solid 1px var(--text-color) !important;
  border-radius: 15px !important;
  box-shadow: 1rem black;
  border: solid 1px var(--text-color) !important;
  border-radius: 15px !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

table.dataTable > tbody > tr > th,
table.dataTable > tbody > tr > td {
}



@media screen and (max-width: 500px) {
  .toast-panel {
    position: fixed;
    bottom: 50px;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: calc(90vw - 10px);
    max-width: 90vw;
    /* Use viewport width */
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: end;
    pointer-events: none;
  }

  /*.toast.success p + a {
    position: absolute;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
  }

    .toast.success p + a i {
      font-size: 1.2rem;
      color: white;
    }*/

  /* Add some right padding to the paragraph to avoid overlap with icon */
  /*.toast.success p {
    padding-right: 2rem;
  }*/

  .toast {
    padding: 0.75rem 2rem 0.75rem 1rem;
    border-radius: 2rem;
    background: var(--clr);
    color: #fff !important;
    width: auto;
    max-width: 95%;
    box-sizing: border-box;
    margin: 5px;
    /* Add some horizontal margin */
  }

    .toast:before {
      display: none;
    }

    .toast h3 {
      display: none;
    }

    .toast p {
      color: #fff;
      font-weight: 400;
      margin: 0;
      padding-right: 1rem;
    }

  .toast-item {
    transform: translateY(100%);
  }

    .toast-item.show {
      transform: translateY(0);
      animation: toast-in-bottom 0.5s ease forwards;
    }

    .toast-item.hide {
      animation: toast-out-top 0.5s ease forwards;
    }

  .close:after {
    color: #fff;
  }

  .close:hover:after {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
  }

  .toast-item.loading .toast .spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
  }
}

input[type=text]:not(.is-invalid, .history-field-changed),
select:not(.is-invalid),
textarea:not(.is-invalid),
input[type=password]:not(.is-invalid),
input[type=number]:not(.is-invalid, .history-field-changed),
input[type=email]:not(.is-invalid) {
  /* background-color: transparent !important; */
  background-color: var(--field-background-color) !important;
  border-color: var(--border-color) !important;
  color: var(--text-color) !important;
}

::-webkit-scrollbar {
  width: 10px;
  border-radius: 15px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 15px;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 15px;
}

  ::-webkit-scrollbar-thumb:hover {
    background: #555;
  }

input[type="color"] {
  -webkit-appearance: none;
  border: none;
}

  input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
  }

  input[type="color"]::-webkit-color-swatch {
    border: none;
  }

select option {
  color: var(--text-color) !important;
}


table.dataTable th,
table.dataTable thead {
  border-bottom: 1px solid var(--text-color) !important;
}

table.dataTable tr,
table.dataTable td {
  border: 1px solid var(--border-color) !important;
}

/*#ModalPartialCloseBtn {
    color: var(--text-color)!important;
    border-color: var(--border-color)!important;
}

#ModalPartialCloseBtn:hover{
    color: white!important;
}*/

.tempus-dominus-widget.show {
  z-index: 1000003 !important;
}

.btn,
input,
select,
textarea {
  border-radius: 15px !important;
  border: 1px solid var(--border-color);
}

.form-check:not(.form-switch) input[type="checkbox"] {
  border-radius: .25em !important;
}

input[type=text] {
  padding: 0 15px;
}

/* Add * to label if input required */
input[required] + label::after,
textarea[required] + label::after {
  content: " *" !important;
  position: unset !important;
}

/*======== FLOATING LABELS ========*/
.field {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  /* or center, depending on your label positioning */
  width: 100%;
}

  .field label::before {
    text-overflow: clip;
    white-space: nowrap;
    overflow: hidden;
    content: attr(title);
    overflow: clip;
    position: absolute;
    top: 0;
    left: 15px;
    line-height: 40px;
    font-size: 14px;
    color: var(--text-color);
    transition: 300ms all;
    pointer-events: none !important;
    background-color: transparent;
  }

  .field input,
  .field textarea {
    width: 100%;
    line-height: 40px;
    padding: 0 15px;
    box-sizing: border-box;
    font-size: 14px;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    display: block;
    /* This helps with proper sizing */
    margin: 0;
    /* Reset margins */
  }

  .field textarea {
    resize: vertical;
    padding: 10px 15px;
    line-height: 1.5;
  }

    .field input:focus,
    .field textarea:focus {
      outline: 0;
      border-color: var(--border-color);
    }

    .field input:not(:placeholder-shown) + label::before,
    .field textarea:not(:placeholder-shown) + label::before {
      line-height: 20px;
      font-size: 12px;
      top: -10px;
      background: var(--field-background-color);
      color: var(--label-color);
      /* padding: 0 6px; */
      /* left: 9px; */
      content: attr(title);
      border-top-left-radius: 15px;
      border-top-right-radius: 15px;
      border-top: 1px solid var(--border-color);
      border-right: 1px solid var(--border-color);
      border-left: 1px solid var(--border-color);
      padding: 0 15px;
      width: 100%;
      left: 0;
    }

    .field input:focus + label::before,
    .field textarea:focus + label::before {
      /* line-height: 20px;
            font-size: 12px;
            top: -10px;
            background: var(--field-background-color);
            padding: 0 6px;
            left: 9px;
            color: var(--text-color);
            content: attr(title); */
    }

    .field input:focus + label.floating-required-field::before,
    .field textarea:focus + label.floating-required-field::before,
    .field label.floating-required-field::before,
    .field input:not(:placeholder-shown) + label.floating-required-field::before,
    .field textarea:not(:placeholder-shown) + label.floating-required-field::before {
      content: attr(title) " *";
    }

.time-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.5rem;
  background: #fff;
  font-family: sans-serif;
}

/* The text input */
.time-picker__input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 1rem;
  padding: 0.25rem 0.5rem 0.5rem 0;
  background: transparent;
}

.custom-field-container {
  position: relative;
  display: flex;
  width: 100%;
  align-items: stretch;
}

.custom-field-input {
  width: 100%;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 15px 0 0 15px !important;
  box-sizing: border-box;
  height: auto;
  min-height: 2.5rem;
}

.custom-field-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-color);
  text-align: center;
  white-space: nowrap;
  background-color: var(--field-background-color);
  border: 1px solid var(--border-color);
  border-left: none;
  border-radius: 0 15px 15px 0;
  box-sizing: border-box;
  min-height: 2.5rem;
}

  .custom-field-icon i {
    font-size: 1.2rem;
    border-radius: 0 15px 15px 0 !important;
  }

.field select {
  width: 100%;
  line-height: 40px;
  height: 40px;
  box-sizing: border-box;
  font-size: 14px;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 15px !important;
}

  .field select:focus {
    outline: 0;
    border-color: var(--border-color);
  }

/* Select2 styling */
.field .select2-container {
  width: 100% !important;
}

  .field .select2-container .select2-selection--single {
    width: 100%;
    /*        height: 40px !important;
*/
    line-height: 40px;
    height: calc(3.5rem + calc(var(--bs-border-width) * 2)) !important;
    box-sizing: border-box;
    font-size: 16px;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 15px !important;
    /* background-color: transparent; */
    background-color: var(--field-background-color);
    border-top-left-radius: 4px !important;
  }

    .field .select2-container .select2-selection--single .select2-selection__rendered {
      padding-left: 12px;
      padding-right: 12px;
      line-height: 38px;
      /* Slightly less than container height for vertical centering */
    }

/*    .field .select2-container .select2-selection--single .select2-selection__arrow {
      height: 38px;
      right: 8px;
    }*/

.field .select2-container--default .select2-selection--single:focus,
.field .select2-container--default.select2-container--focus .select2-selection--single {
  outline: 0;
  border-color: var(--border-color);
}

.select2-container .select2-selection--single .select2-selection__rendered {
  padding-left: 12px !important;
}

/* Floating labels for both select and select2 */
.field select + label::before,
.field .select2-container + label::before {
  position: absolute;
  line-height: 20px;
  font-size: 12px;
  top: -10px;
  /* background: var(--site-background-color); */
  background-color: var(--field-background-color);
  /* padding: 0 6px; */
  /* left: 9px; */
  content: attr(title);
  /* color: var(--text-color); */
  z-index: 1;
  color: var(--label-color);
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  border-top: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
  padding: 0 15px;
  left: 0;
}

.field select + label.floating-required-field::before,
.field .select2-container + label.floating-required-field::before {
  content: attr(title) " *";
}


.dt-length .dt-input {
  margin-right: 0.5rem !important;
  outline-offset: 0 !important;
}

.dt-search .dt-input:focus {
  outline-offset: 0 !important;
}

label[for^="dt-length-"] {
  margin-left: 10px;
  /* Adjust as needed */
}

.selection,
.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--multiple {
  /* background-color: var(--body-color)!important; */
  background-color: var(--field-background-color);
  border-color: var(--border-color) !important;
  border-radius: 15px !important;
}

.select2-search__field {
  padding-left: 5px !important;
  outline: none;
}

select {
  padding-left: 10px !important;
}

/* =========== SELECT 2 ============== */
.select2-container--default .select2-selection--single {
  /* background-color: var(--site-background-color) !important; */
  background-color: var(--field-background-color) !important;
  color: var(--text-color) !important;
  /* Your text color */
  border-radius: 15px !important;
  height: 42px !important;
  align-items: center !important;
}

  .select2-container--default .select2-selection--single:not(.is-invalid) {
    border-color: var(--border-color) !important;
    /* Your border color */
  }


.select2-container--below .selection .select2-selection--single[aria-expanded="true"],
.field .select2-selection--single[aria-expanded="true"],
.select2-selection--multiple[aria-expanded="true"] {
  border-radius: 15px 15px 0 0 !important;
}

.select2-container--above .selection .select2-selection--single[aria-expanded="true"],
.field .select2-selection--single[aria-expanded="true"],
.select2-selection--multiple[aria-expanded="true"] {
  border-radius: 0 0 15px 15px !important;
}

.select2-container--open.select2-container--above ~ label::before {
  display: none;
}

.select2-container--open.select2-container--below ~ label::before {
  display: block;
}

/* Text rendering inside the single-select */
.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--text-color) !important;
  /* Your text color */
}

/* Container for multiple-select */
.select2-container--default .select2-selection--multiple {
  background-color: var(--body-color) !important;
  /* Your background color */
  border-color: var(--border-color) !important;
}

  /* Each selected tag (“pill”) */
  .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--body-color) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
    border-radius: 15px !important;
  }

/* All dropdown options text */
.select2-container--default .select2-results__option,
.select2-selection__placeholder {
  color: var(--text-color) !important;
}

.select2-selection__rendered {
  color: red !important
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  color: black !important
}

.select2-search__field {
  background-color: var(--body-color) !important;
  color: var(--text-color) !important;
}

.select2-dropdown.select2-dropdown--below {
  background-color: var(--body-color) !important;
  border-color: var(--border-color) !important;
  border-radius: 0 0 15px 15px !important;
}


.select2-selection.select2-selection--single {
  display: flex !important;
}


.form-check.no-label {
  margin-bottom: 0;
  padding-right: 0;
  display: inline-flex;
  align-items: center;
}

input[type=search] {
  padding-left: 10px !important;
}

.select2-search__field,
.select2-search__field::placeholder {
  color: var(--text-color) !important;
}

.select2-selection__placeholder {
  opacity: 0.7;
  color: var(--text-color);
}

ul.select2-results__option {
  padding: 0px !important;
}

.select2-dropdown--below ul.select2-results__options:last-child {
  border-radius: 0 0 15px 15px !important;
}

.select2-results__options {
  box-shadow: 0 1rem 20px 2px var(--shadow-color);
}

/*.select2-dropdown--above ul.select2-results__options:first-child {
  border-radius: 15px 15px 0 0 !important;
}*/

.select2-dropdown--above {
  border-radius: 15px 15px 0 0 !important;
}

.select2-container--above .select2-selection {
  border-radius: 0 0 15px 15px !important;
}

.select2-dropdown--above .select2-search--hide ~ .select2-results ul {
  border-radius: 15px 15px 0 0 !important;
}

.select2-search__field {
  height: 30px !important;
  padding-top: 5px !important;
  /*margin-left: 10px!important;*/
}

.select2-selection:has(.select2-selection__placeholder) .select2-selection__arrow {
  /* your custom styles here */
  color: #c00;
  /* e.g. make the arrow red */
  border-left-color: #c00;
  /* if the arrow is drawn via borders */
}

.select2-selection__clear {
  margin-left: 15px;
  margin-right: 0 !important;
  margin-bottom: 15px;
}

  .select2-selection__clear span {
    margin-bottom: 5px !important;
  }

/*select.dt-input + .select2-container .select2-selection__arrow, .dish-row .select2-selection__arrow {
  margin-right: 5px;
  margin-top: 7px;
}*/

/*#triggerUserReminderPostponeTime + .select2-container .selection .select2-selection__arrow {
  margin-top: 7px;
}*/

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: unset !important;
  position: absolute !important;
  top: unset !important;
  right: 1px !important;
  width: 20px !important
}

/* ====== DataTables footer ======= */
.dt-paging-button {
  border-radius: 15px !important;
}

  .dt-paging-button:not(.disabled):not(.current):hover {
    border-color: var(--border-color) !important;
  }

  .dt-paging-button:not(.disabled):not(.current):hover {
    background: var(--first-color) !important;
  }

  .dt-paging-button.current {
    background: var(--border-color) !important;
  }

div.dt-container .dt-paging .dt-paging-button.disabled {
  color: var(--text-color) !important;
}

  div.dt-container .dt-paging .dt-paging-button.disabled:hover {
    color: var(--text-color) !important;
  }

/* ======== CUSTOM SELECT ==============*/

select {
  border: 2px solid var(--border-color);
  transition: 0.4s;
}

  select:hover,
  select:focus {
    background: var(--first-color);
  }



option {
  display: flex;
  justify-content: flex-start;
  border: 2px solid var(--border-color);
  background: var(--floating-box-color);
  padding: 0.1rem;
  transition: 0.4s;
  left: 0 !important;
}

  option:first-of-type {
    border-radius: 15px 15px 0 0;
  }

  option:last-of-type {
    border-radius: 0 0 15px 15px;
  }

  option:not(option:last-of-type) {
    border-bottom: none;
  }

  option:hover,
  option:checked {
    background: var(--first-color) !important;
    color: white !important;
  }

  option:disabled {
    background: var(--body-color);
    cursor: not-allowed;
  }

    option:disabled:hover,
    option:disabled:focus {
      background: var(--body-color);
    }

  option:checked {
    font-weight: bold;
  }

  option::checkmark {
    content: "️";
  }

::picker(select) {
  opacity: 0;
  transition: all 0.4s allow-discrete;
}

  ::picker(select):popover-open {
    opacity: 1;
  }

@starting-style {
  ::picker(select):popover-open {
    opacity: 0;
  }
}

::picker(select) {
  top: calc(anchor(bottom) + 1px);
}


.dt-scroll-body {
  border: none !important;
}

.dt-scroll {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dt-body,
table.dataTable > thead > tr > th,
table.dataTable > thead > tr > td {
  border-bottom: none !important;
}

.dt-scroll-head,
.dt-head {
}

.dt-orderable-asc,
.dt-orderable-desc {
  border-bottom: none !important;
}

.dt-layout-row.dt-layout-table {
  border-collapse: separate !important;
  border-spacing: 0;
  border-radius: 15px;
  overflow: hidden;
}

:disabled,
:disabled:hover {
  opacity: 0.5 !important;
  cursor: not-allowed;
  pointer-events: auto !important;
}

.disabled-element,
.disabled,
.disabled-element:hover,
.disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  pointer-events: auto !important;
}

.select2-search__field::placeholder {
  opacity: 50%;
}

.loading-border {
  --border-angle: 0deg;
  position: relative;
  border-radius: 12px;
  box-shadow: 0px 2px 4px hsl(0 0% 0% / 25%);
}

  .loading-border::before {
    content: '';
    position: absolute;
    inset: -0px;
    border-radius: inherit;
    padding: 5px;
    background: conic-gradient(from var(--border-angle), var(--border-loading) 0deg, var(--border-loading-light) 45deg, var(--border-loading) 90deg, var(--border-loading-light) 135deg, var(--border-loading) 180deg, var(--border-loading-light) 225deg, var(--border-loading) 270deg, var(--border-loading-light) 315deg, var(--border-loading) 360deg);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    animation: border-angle-rotate 5s infinite linear;
    pointer-events: none;
  }

@keyframes border-angle-rotate {
  from {
    --border-angle: 0deg;
  }

  to {
    --border-angle: 360deg;
  }
}

@property --border-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/*#UserLanguageCodeSelect + .select2-container .selection .select2-selection__arrow {
  margin-top: 7px;
}*/


#reportErrorModal {
  z-index: 1000004 !important;
}

ul.timeline {
  list-style-type: none;
  position: relative;
  margin-bottom: 0;
}

  ul.timeline:before {
    content: ' ';
    background: #d4d9df;
    display: inline-block;
    position: absolute;
    left: 29px;
    width: 2px;
    height: 100%;
    z-index: 0;
  }

  ul.timeline > li {
    margin: 20px 0;
    padding-left: 20px;
  }

    ul.timeline > li:before {
      content: ' ';
      background: white;
      display: inline-block;
      position: absolute;
      border-radius: 50%;
      border: 3px solid var(--bs-primary);
      left: 20px;
      transform: translateY(2px);
      width: 20px;
      height: 20px;
      z-index: 401;
    }

/* Modal history sidebar animations */
#modalHistorySidebar.fade {
  opacity: 0;
  transition: opacity .5s ease, height 1s ease;
}

  #modalHistorySidebar.fade.show {
    opacity: 1;
  }

#modalHistoryToggle {
  z-index: 1000003;
  border-radius: 0 45px 45px 0 !important;
  height: 4rem !important;
  padding-right: 8px;
  padding-left: 8px;
}


.fade-in-title {
  animation: fadeInSidebarTitle .5s ease forwards;
}

#offcanvasModalHistory {
  z-index: 1000004;
  margin: 1rem;
  border-radius: 15px;
  max-width: calc(100% - 2rem);
}

@keyframes fadeInSidebarTitle {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-footer,
.modal-header {
  background-color: var(--site-background-color);
  border-color: var(--border-color);
}

.rounded-top-lg {
  border-top-left-radius: 1.5rem !important;
  border-top-right-radius: 1.5rem !important;
}

.modal-footer-content,
.modal-header {
  transition: box-shadow .1s ease;
}

.shadow-custom-bottom {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important
}

.shadow-custom-top {
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1) !important
}

.modal-footer-content {
  margin: 0;
}

.dark-theme .modal .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%) !important;
}

@media (min-width: 500px) {
  .modal-xxl {
    max-width: 90vw;
  }
}

/*.custom-table-sm {

}*/

.custom-table-sm td,
.custom-table-sm th {
  padding: 5px !important;
  font-size: 0.875rem;
}

.text-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
  /* or your preferred width */
  display: inline-block;
}

.datatable-link {
  color: #0d6efd;
  cursor: pointer;
}

  .datatable-link:hover {
    text-decoration: underline !important;
  }

#divHelperPrint * {
  visibility: hidden;
  pointer-events: none !important;
}

#divHelperPrint {
  pointer-events: none !important;
}

.badge {
  font-size: 0.775rem;
}

  .badge.bg-success {
    padding: 5px 10px;
    color: rgb(25, 135, 84);
    background: rgb(204, 243, 225) !important;
  }

  .badge.bg-secondary {
    padding: 5px 10px;
    color: rgb(80, 80, 80);
    background: rgb(200, 200, 200) !important;
  }

  .badge.bg-danger {
    padding: 5px 10px;
    color: rgb(255, 43, 59);
    background: rgb(255, 201, 201) !important;
  }

.merchandise-summary-table {
  --bs-table-bg: var(--site-background-color);
  --bs-table-color: var(--text-color);
  --bs-border-color: var(--border-color);
  --bs-table-striped-bg: var(--border-color-light);
  --bs-table-hover-bg: var(--border-color-light);
  border-radius: 15px;
  overflow: hidden;
}

  .merchandise-summary-table th {
    color: var(--title-color);
  }

/* Sortable */
.drag-handle {
  cursor: move;
  padding: 0 8px;
  color: #999;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

  .drag-handle:hover {
    color: #666;
  }


.dragging-row {
  background-color: var(--background-color) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
  transform: scale(1.02) !important;
}

  .dragging-row td {
    background-color: var(--site-background-color) !important;
    padding: 12px 8px !important;
  }


.being-dragged {
  opacity: 0.5;
  background-color: var(--site-background-color);
}


.sort-placeholder {
  height: 53px;
  background-color: var(--border-color-light) !important;
}

  .sort-placeholder td {
    padding: 0 !important;
  }



.sortable-rows tr {
  user-select: none;
}

  .sortable-rows tr:hover {
    background-color: var(--border-color-light);
  }

.cursor-grabber {
  cursor: grab;
}

/*tree view */
.tree {
  min-height: 20px;
}

  .tree ul {
    transform: translateX(4px);
    transition: 1s all ease-in-out;
  }

  .tree li {
    list-style-type: none;
    margin: 0;
    padding: 10px 5px 0 5px;
    position: relative
  }

    .tree li::before,
    .tree li::after {
      content: '';
      left: -24px;
      position: absolute;
      right: auto
    }

    .tree li::before {
      border-left: 1px solid #999;
      bottom: 50px;
      height: 100%;
      top: 0;
      width: 1px
    }

    .tree li::after {
      border-top: 1px solid #999;
      height: 20px;
      top: 21px;
      width: 29px
    }

    .tree li span.treebranch {
      -moz-border-radius: 5px;
      -webkit-border-radius: 5px;
      border: 1px solid #999;
      border-radius: 5px;
      display: inline-block;
      padding: 3px 8px;
      text-decoration: none
    }

    .tree li.parent_li > span.treebranch {
      cursor: pointer
    }

  .tree > ul > li::before,
  .tree > ul > li::after {
    border: 0
  }

  .tree li:last-child::before {
    height: 21px
  }

  .tree li.parent_li > span.treebranch:hover,
  .tree li.parent_li > span.treebranch:hover + ul li span.treebranch {
    background: #eee;
    border: 1px solid #94a0b4;
    color: #000
  }

  .tree a.treetext {
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    color: inherit;
    border: 1px solid transparent;
    padding-left: 5px;
    padding-right: 5px;
    border-radius: 5px;
    display: inline-block;
    text-decoration: none;
  }

    .tree a.treetext:hover {
      border: 1px solid #999;
      text-decoration: none;
      background-color: #dff0d8;
    }

  .tree .btn {
    padding: 0 5px;
  }

  .tree li > span {
    cursor: pointer;
    transform: translateY(2px);
    padding: 5px 10px;
  }

    .tree li > span:hover {
      background: #ddd;
      border-radius: 15px;
    }


.form-floating > .form-control-plaintext ~ label::after,
.form-floating > .form-control:focus ~ label::after,
.form-floating > .form-control:not(:placeholder-shown) ~ label::after,
.form-floating > .form-select ~ label::after {
  background-color: unset;
}


.tinyMceCustomLabel {
  top: -15.5px !important;
  background-color: var(--field-background-color) !important;
  content: attr(title) !important;
  z-index: 1 !important;
  border-top-left-radius: 15px !important;
  border-top-right-radius: 15px !important;
  border-top: 1px solid var(--border-color) !important;
  border-left: 1px solid var(--border-color) !important;
  padding: 0 15px !important;
  line-height: 20px !important;
  font-size: 12px !important;
  height: unset !important;
  left: 1px !important;
}

.tox-editor-header,
.tox-toolbar__primary {
  background-color: var(--field-background-color) !important;
}

.form-floating > label {
  color: var(--label-color) !important;
  width: 100%;
}

.form-control:focus::placeholder {
  color: var(--text-color-muted) !important;
}

.form-floating > textarea.form-control {
  min-height: 100px;
}
