.kbw-signature {
  width: 300px;
  height: 150px;
}

#sig canvas {
  width: 100% !important;
  height: auto;
}

.hr-with-button {
  display: flex;
  align-items: center;
  width: 100%;
}

.line {
  flex-grow: 1;
  height: 2px;
  background-color: red;
}

.line-left {
  margin-right: 10px;
}

.line-right {
  margin-left: 10px;
}


.select2-container--bootstrap4 .select2-dropdown .select2-results__option[aria-selected="true"] {
  color: #31708f;
  background-color: #d9edf7;
}

.select2-container--bootstrap4 .select2-results__option--highlighted,
.select2-container--bootstrap4 .select2-results__option--highlighted.select2-results__option[aria-selected="true"] {
  color: #fff;
  background-color: #007bff;
}

.select2-container--krajee-bs4 .select2-selection--multiple .select2-selection__choice {
  color: #555;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 0.25rem;
  cursor: default;
  width: auto;
  margin: 0.35rem 0 0 0.25rem;
  padding: 0.15rem 0.05rem 0.15rem 0.25rem;
  font-size: 1rem;
  line-height: 1.3rem;
  float: left;
}

.select2-container--bootstrap4 .select2-results__option[aria-disabled=true] {
  color: #333;
  background: #fff;
  cursor: not-allowed;
  opacity: 0.4;
  filter: alpha(opacity=40);
}

.select2-container--bootstrap4.select2-container--open:not(.select2-container--disabled) .select2-selection,
.select2-container--bootstrap4:not(.select2-container--disabled) .select2-selection:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

select2-container--krajee-bs4.select2-container--disabled .select2-selection,
.select2-container--bootstrap4.select2-container--disabled .select2-search__field {
  cursor: not-allowed;
}

.select2-container--bootstrap4.select2-container--disabled .select2-selection,
.select2-container--bootstrap4.select2-container--disabled .select2-selection--multiple .select2-selection__choice {
  background-color: #e9ecef;
}

.select2-container--bootstrap4.select2-container--disabled .select2-selection__clear,
.select2-container--bootstrap4.select2-container--disabled .select2-selection--multiple .select2-selection__choice__remove {
  display: none;
}

.select2-container--bootstrap4:not(.select2-container--disabled) .select2-dropdown {
  /*box-shadow: 0 0.375rem 0.75rem rgba(0, 0, 0, 0.175);*/
  box-shadow: 0 0.375rem 0.75rem 0.2rem rgba(0, 123, 255, 0.25);
  border-color: #80bdff;
  overflow-x: hidden;
  margin-top: -1px;
}

.calendar-loading::before {
  position: absolute;
  content: "";
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.calendar-loading::after {
  box-sizing: border-box;
}

.help-hint {
  cursor: help;
  border-bottom: 1px dashed #888;
}

.help-update {
  cursor: help;
  border-bottom: 1px dashed #888;
}

.btn-group-xs>.btn,
.btn-xs {
  padding: 0.25rem 0.4rem;
  font-size: 0.875rem;
  line-height: 0.5;
  border-radius: 0.2rem;
}

.preloader-dark {
  background-color: black !important;
}

.preloader {
  background-color: white !important;
}

#loader {
  display: block;
  position: relative;
  left: 50%;
  top: 50%;
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #9370db;
  -webkit-animation: spin 2s linear infinite;
  animation: spin 2s linear infinite;
}

#loader:before {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #ba55d3;
  -webkit-animation: spin 3s linear infinite;
  animation: spin 3s linear infinite;
}

#loader:after {
  content: "";
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #ff00ff;
  -webkit-animation: spin 1.5s linear infinite;
  animation: spin 1.5s linear infinite;
}

@-webkit-keyframes spin {
  0% {
    -webkit-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    transform: rotate(0deg);
  }

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

@keyframes spin {
  0% {
    -webkit-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    transform: rotate(0deg);
  }

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

.add-remove-detail {
  margin-top: 0;
}

@media (min-width: 768px) {
  .add-remove-detail {
    margin-top: 35px;
  }
}

hr.red {
  border: 2px solid red;
}

.width-hr {
  width: 96%;
  padding-left: 7.5px;
  padding-right: 2.5px
}

.width-btn {
  width: 4%;
  padding-right: 7.5px;
}

/* สำหรับหน้าจอที่มีความกว้างไม่เกิน 768px (เช่น แท็บเล็ต) */
@media (max-width: 768px) {
  .width-hr {
    width: 90%;
    padding-left: 7.5px;
    padding-right: 2.5px
  }

  .width-btn {
    width: 10%;
    padding-right: 7.5px;
  }
}

/* สำหรับหน้าจอที่มีความกว้างไม่เกิน 480px (เช่น มือถือ) */
@media (max-width: 480px) {
  .width-hr {
    width: 90%;
    padding-left: 7.5px;
    padding-right: 2.5px
  }

  .width-btn {
    width: 10%;
    padding-right: 7.5px;
  }
}

/* Full Calendar */
.fc-event-title {
  cursor: pointer;
  vertical-align: middle;
  text-align: center;
  display: inline-block;
  width: 100%;
  overflow: hidden;
}

/* Fullscreen container */
.fullscreen-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  /* Optional overlay */
  z-index: 1050;
  /* Ensure it's above everything else */
}

/* Smooth progress bar animation */
.progress-bar {
  transition: width 0.4s ease;
}