/* Shared Select2 + Flatpickr styling (Vuexy admin / dashboard forms) */
.form-widgets .select2-container,
.select2-container { width: 100% !important; }

.select2-container--default .select2-selection--single {
  min-height: 40px;
  border: 1px solid #d6e3ef !important;
  border-radius: 10px !important;
  padding: 4px 8px;
  background: #fff;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 30px;
  color: #1E3A6E;
  padding-left: 4px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 38px;
  right: 6px;
}
.select2-container--default .select2-selection--multiple {
  min-height: 40px;
  border: 1px solid #d6e3ef !important;
  border-radius: 10px !important;
  padding: 4px 8px;
  background: #fff;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--multiple {
  border-color: #5EC0E8 !important;
  box-shadow: 0 0 0 0.2rem rgba(47, 143, 212, 0.15);
}
.select2-dropdown {
  border: 1px solid #d6e3ef !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 12px 28px -14px rgba(47, 143, 212, 0.35);
  z-index: 1100;
}
.select2-search--dropdown .select2-search__field {
  border: 1px solid #d6e3ef !important;
  border-radius: 8px !important;
  padding: 8px 10px;
}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background: linear-gradient(135deg, #5EC0E8, #2F8FD4) !important;
}
.select2-container--default .select2-results__option {
  padding: 9px 12px;
}

.flatpickr-calendar {
  border-radius: 14px !important;
  box-shadow: 0 16px 40px -18px rgba(47, 143, 212, 0.45) !important;
  border: 1px solid #d6e3ef !important;
  overflow: hidden;
}
.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
span.flatpickr-weekday {
  color: #1E3A6E;
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover {
  background: linear-gradient(135deg, #5EC0E8, #2F8FD4) !important;
  border-color: transparent !important;
}
.flatpickr-day.today {
  border-color: #5EC0E8 !important;
}
.flatpickr-time input:hover,
.flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-time input:focus,
.flatpickr-time .flatpickr-am-pm:focus {
  background: #E3F4FC !important;
}
input.form-control.js-flatpickr,
input.form-control[data-flatpickr] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232F8FD4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
  cursor: pointer;
}

/* Keep Vuexy light toastr readable (white card + colored icons) */
.light-style #toast-container > .toast-success,
.light-style #toast-container > .toast-error,
.light-style #toast-container > .toast-info,
.light-style #toast-container > .toast-warning {
  color: #444050 !important;
  background-color: #fff !important;
  background-repeat: no-repeat !important;
  background-size: 28px !important;
  opacity: 1 !important;
}
.light-style #toast-container .toast-title,
.light-style #toast-container .toast-message {
  color: #444050 !important;
}
.light-style #toast-container .toast-close-button {
  color: #acaab1 !important;
}

/* Select2 dropdowns appended to <body> must paint above page cards/inputs,
   otherwise options (e.g. Status Inactive) are covered and cannot be clicked. */
body > .select2-container--open {
  z-index: 2000;
  /* The wrapper Select2 appends to <body> is page-wide and offset to the field, which widens the page. */
  width: auto !important;
  max-width: 100vw;
}
