/* Timebinder Redesign Styles */
/* Reusable form field styles */

.tb-theme h1{
  color: #000;
}

.tb-form-label {
  font-weight: 500;
  color: #3f4254;
}

.tb-label-required {
  color: var(--tb-color-primary);
}

.tb-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid #E1E3EA;
  border-radius: 6px;
  background-color: #ffffff;
  color: #181c32;
  font-size: 14px;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tb-input::placeholder {
  color: #c7c9d7;
  opacity: 1;
  font-size: 13px;
  font-weight: 500;
}

.tb-input[type="search"]::-webkit-search-cancel-button {
  filter: brightness(0) saturate(100%) invert(68%) sepia(13%) saturate(411%) hue-rotate(191deg) brightness(87%) contrast(88%);
  cursor: pointer;
  opacity: 1;
}

.select2-container .select2-selection--single {
  padding: 0 20px !important;
}

.select2-container .select2-selection__placeholder,
.tb-select2-dropdown .select2-search--dropdown .select2-search__field::placeholder {
  color: #c7c9d7 !important;
  font-size: 13px;
  font-weight: 500;
  line-height: 16px !important;
  opacity: 1;
}

.tb-select2-container.select2-container--disabled .form-select .select2-selection__placeholder,
.tb-select2-container.select2-container--disabled .select2-selection__placeholder
 {
  color: #c7c9d7 !important;
  font-size: 13px;
  font-weight: 500;
  opacity: 1;
}

.tb-select2-container .select2-selection {
  background-color: #ffffff;
  border-color: #E1E3EA;
  transition: border-color 0.24s ease-out, box-shadow 0.24s ease-out, background-color 0.24s ease-out;
}

.tb-select2-container .select2-selection__rendered {
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 16px !important;
  color: #262626 !important;
}

.tb-select2-container.select2-container--open:not(.select2-container--disabled) .select2-selection {
  background-color: #ffffff !important;
  border-color: var(--tb-color-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--tb-color-primary-rgb), 0.12) !important;
  outline: none;
}

.tb-select2-dropdown {
  border-color: rgba(var(--tb-color-primary-rgb), 0.18) !important;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

.tb-select2-dropdown .select2-search--dropdown {
  padding: 12px;
}

.tb-select2-dropdown .select2-search--dropdown .select2-search__field {
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid #E1E3EA;
  border-radius: 6px;
  background-color: #ffffff;
  color: #181c32;
  font-size: 14px;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tb-select2-dropdown .select2-search--dropdown .select2-search__field:focus {
  border-color: var(--tb-color-primary);
  box-shadow: none;
  outline: none;
}

.tb-select2-dropdown .select2-results > .select2-results__options {
  scrollbar-width: thin;
  scrollbar-color: var(--tb-color-primary) rgba(var(--tb-color-primary-rgb), 0.12);
}

.tb-select2-dropdown .select2-results > .select2-results__options::-webkit-scrollbar-track {
  background: rgba(var(--tb-color-primary-rgb), 0.12);
  border-radius: 999px;
}

.tb-select2-dropdown .select2-results > .select2-results__options::-webkit-scrollbar-thumb {
  background: var(--tb-color-primary);
  border-radius: 999px;
}

.tb-select2-dropdown .select2-results__option--highlighted.select2-results__option--selectable,
.tb-select2-dropdown .select2-results__option--selected {
  background-color: #FFDFFF !important;
  color: var(--tb-color-primary) !important;
  box-shadow: inset 0 0 0 9999px #FFDFFF;
}

.tb-select2-dropdown .select2-results__option--selected:after {
  background-color: var(--tb-color-primary) !important;
}

/* For multiple select */
.tb-select2-container .select2-selection--multiple {
  display: flex !important;
}

.tb-select2-container .select2-selection--multiple .select2-search__field::placeholder {
  color: #c7c9d7 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 16px !important;
  opacity: 1;
}

.select2-selection--multiple .select2-selection__rendered {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.select2-selection__choice__display {
  color: var(--tb-color-primary) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

.select2-selection__choice {
  background: #F2EBFD !important;
}

.select2-selection__choice__remove{
  opacity: 1 !important;
  background-color: #632EBE !important;
}

/* Remove highlight from already-selected item (hover still works) */
.tb-select2-no-selected-highlight .select2-results__option--selected:not(.select2-results__option--highlighted) {
  background-color: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
}

.tb-select2-no-selected-highlight .select2-results__option--selected:not(.select2-results__option--highlighted):after {
  display: none !important;
}

.tb-input:focus {
  border-color: var(--tb-color-primary);
  box-shadow: 0 0 0 3px rgba(var(--tb-color-primary-rgb), 0.12);
  outline: none;
}

.tb-input-invalid,
.tb-input-invalid:focus,
.tb-input.tb-input-invalid:focus {
  border-color: #f1416c;
  box-shadow: none !important;
  outline: none;
}

select.tb-input-invalid,
select.tb-input-invalid:focus,
select.tb-input-invalid:disabled {
  border-color: #f1416c !important;
  box-shadow: none !important;
}

.select2-container .select2-selection--single.tb-input-invalid,
.tb-input-invalid + .select2-container .select2-selection--single,
.tb-input-invalid + .select2-container .select2-selection--multiple,
.tb-input-invalid + .select2-container.select2-container--disabled .select2-selection--single {
  border-color: #f1416c !important;
  box-shadow: none !important;
}

.tb-input-invalid + .select2-container.select2-container--open .select2-selection--single,
.tb-input-invalid + .select2-container.select2-container--focus .select2-selection--single,
.tb-input-invalid + .select2-container.select2-container--open .select2-selection--multiple,
.tb-input-invalid + .select2-container.select2-container--focus .select2-selection--multiple {
  border-color: #f1416c !important;
  box-shadow: none !important;
}

.employee-form-section.tb-input input:required:user-invalid,
.employee-form-section.tb-input input:required:user-invalid:focus,
.employee-form-section.tb-input select:required:user-invalid,
.employee-form-section.tb-input select:required:user-invalid:focus,
.employee-personal-information-section__field:required:user-invalid,
.employee-personal-information-section__field:required:user-invalid:focus {
  border-color: #f1416c !important;
  box-shadow: none !important;
  outline: none;
}

.employee-form-section.tb-input select:required:user-invalid + .select2-container .select2-selection--single,
.employee-form-section.tb-input select:required:user-invalid + .select2-container.select2-container--disabled .select2-selection--single,
.employee-personal-information-section__field:required:user-invalid + .select2-container .select2-selection--single,
.employee-personal-information-section__field:required:user-invalid + .select2-container.select2-container--disabled .select2-selection--single {
  border-color: #f1416c !important;
  box-shadow: none !important;
}

.employee-form-section.tb-input select:required:user-invalid + .select2-container.select2-container--open .select2-selection--single,
.employee-form-section.tb-input select:required:user-invalid + .select2-container.select2-container--focus .select2-selection--single,
.employee-personal-information-section__field:required:user-invalid + .select2-container.select2-container--open .select2-selection--single,
.employee-personal-information-section__field:required:user-invalid + .select2-container.select2-container--focus .select2-selection--single {
  border-color: #f1416c !important;
  box-shadow: none !important;
}

.tb-input-time-primary::-webkit-calendar-picker-indicator {
  filter: brightness(0) saturate(100%) invert(27%) sepia(82%) saturate(2260%) hue-rotate(247deg) brightness(88%) contrast(102%);
  cursor: pointer;
}

.tb-link {
  color: var(--tb-color-primary) !important;
  text-decoration: none;
  font-weight: 700;
}

.tb-link:hover,
.tb-link:focus {
  color: var(--tb-link-hover-color) !important;
  text-decoration: none;
}

.tb-divider {
  color: #a1a5b7;
  font-size: 12px;
  font-weight: 600;
}

.tb-divider::before,
.tb-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid #e3e6ef;
}

.tb-divider::before {
  margin-right: 12px;
}

.tb-divider::after {
  margin-left: 12px;
}

/* button */

.tb-button {
  border-width: 1px;
  border-style: solid;
  min-height: 48px;
}

.tb-button-primary {
  color: var(--tb-color-primary) !important;
  border-color: var(--tb-color-primary) !important;
}

.tb-button-primary-reversed {
  color: #ffffff !important;
  background-color: #7c3aed !important;
  border-color: #7c3aed !important;
}

.tb-button-primary:hover,
.tb-button-primary:focus,
.tb-button-primary:active {
  color: var(--tb-color-primary) !important;
  border-color: var(--tb-color-primary) !important;
  background-color: rgba(var(--tb-color-primary-rgb), 0.08) !important;
}

.tb-button-primary-reversed:hover,
.tb-button-primary-reversed:focus,
.tb-button-primary-reversed:active {
  color: #ffffff !important;
  background-color: #6929d1 !important;
  border-color: #6929d1 !important;
}

.tb-btn-submit {
  background: linear-gradient(90deg, color-mix(in srgb, var(--tb-color-primary) 88%, white) 0%, var(--tb-color-primary) 100%);
  border: none;
  min-height: 48px;
}

.tb-btn-submit:hover,
.tb-btn-submit:focus {
  background: linear-gradient(90deg, color-mix(in srgb, var(--tb-link-hover-color) 88%, white) 0%, var(--tb-link-hover-color) 100%);
}

/* action button */

.tb-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  gap: 8px;
  border-width: 0;
  border-radius: 6px;
  font-size: 13px;
  padding: 12px 16px;
  font-weight: 500;
}

.tb-action-btn-cancel {
  color: #7c3aed;
  background: #F2EBFD;
}

.tb-pagination {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tb-pagination .pagy-bootstrap-nav,
.tb-pagination nav {
  margin: 0;
}

.tb-pagination .pagination {
  --bs-pagination-padding-x: 0;
  --bs-pagination-padding-y: 0;
  --bs-pagination-border-width: 0;
  --bs-pagination-border-radius: 10px;
  --bs-pagination-bg: transparent;
  --bs-pagination-color: #98A2B3;
  --bs-pagination-hover-color: #7C3AED;
  --bs-pagination-hover-bg: transparent;
  --bs-pagination-focus-color: #7C3AED;
  --bs-pagination-focus-bg: transparent;
  --bs-pagination-focus-box-shadow: none;
  --bs-pagination-active-color: #7C3AED;
  --bs-pagination-active-bg: #F8D4F8;
  --bs-pagination-active-border-color: transparent;
  --bs-pagination-disabled-color: #D0D5DD;
  gap: 2px;
  align-items: center;
  margin-bottom: 0;
}

.tb-pagination .page-item {
  display: flex;
  align-items: center;
  margin-right: 0;
}

.tb-pagination .page-link {
  display: inline-flex;
  min-width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #98A2B3;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  border-radius: 10px;
  box-shadow: none;
}

.tb-pagination .page-item.active .page-link {
  background: #FFDFFF;
  color: #7C3AED;
  border-radius: 6px;
}

.tb-pagination .page-item:not(.active):not(.disabled) .page-link:hover {
  color: #7C3AED;
}

.tb-pagination .page-item:first-child .page-link,
.tb-pagination .page-item:last-child .page-link {
  min-width: 22px;
  height: 22px;
  padding: 0;
  color: #C5CADB;
  font-size: 18px;
  font-weight: 400;
  border-radius: 999px;
  transform: none;
}

.tb-pagination .page-item.disabled .page-link {
  color: #E4E7EC;
  opacity: 1;
}

.tb-action-btn-cancel:hover {
  color: #6d28d9;
  background: #ead7ff;
}

.tb-action-btn-edit {
  color: #7c3aed;
  background: #fff;
  border: 0;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}

.tb-action-btn-edit:hover {
  color: #6d28d9;
  background: #faf7ff;
}

.tb-action-btn-submit {
  background: #7c3aed;
  color: #fff;
  box-shadow: none;
}

.tb-action-btn-submit:hover {
  background: #6d28d9;
  color: #fff;
}

.tb-action-btn-submit:disabled {
  cursor: not-allowed;
  color: #A1A5B7;
  background-color: #F1F1F2;
}

.tb-action-btn-delete-border-none {
  color: #F1416C;
  background: #fff;
  border: 0;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}

.tb-action-btn-delete-border-none:hover {
  color: #F1416C;
  background: #FFF5F8;
}

.tb-action-btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
