/* Custom Modal Styling */
.custom-modal {
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  background-color: #fff;
}

.custom-modal .modal-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  padding: 15px 20px;
}

.custom-modal .modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
}

.custom-modal .modal-body {
  padding: 20px;
}

.custom-modal .modal-footer {
  border-top: 1px solid #e9ecef;
  padding: 10px 20px;
  background-color: #f8f9fa;
}

/* Custom File Upload */
.custom-file-upload {
  position: relative;
  display: flex;
  align-items: center;
  border: 2px dashed #d1d8e0;
  border-radius: 6px;
  padding: 15px;
  background-color: #f9f9f9;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.custom-file-upload:hover {
  border-color: #007bff;
  background-color: #f1f5f9;
}

.custom-file-upload input[type="file"] {
  opacity: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.custom-file-upload .file-name {
  flex-grow: 1;
  font-size: 0.9rem;
  color: #495057;
  margin-right: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-file-upload .choose-file {
  white-space: nowrap;
  border: 1px solid #ced4da;
  color: #495057;
  transition: all 0.3s ease;
}

.custom-file-upload .choose-file:hover {
  background-color: #007bff;
  color: #fff;
  border-color: #007bff;
}

/* Upload Button */
.btn-upload {
  padding: 10px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.btn-upload:hover {
  background-color: #0056b3;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
  .custom-modal .modal-dialog {
    margin: 10px;
  }

  .custom-file-upload {
    flex-direction: column;
    align-items: stretch;
  }

  .custom-file-upload .file-name {
    margin-bottom: 10px;
    text-align: center;
  }

  .custom-file-upload .choose-file {
    width: 100%;
  }
}

/* Ensure buttons and links align with dashboard theme */
.btn-primary {
  background-color: #007bff;
  border-color: #007bff;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #0056b3;
  border-color: #004085;
}

.btn-outline-secondary {
  border-color: #ced4da;
  color: #495057;
  transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
  background-color: #696cff;
  border-color: #696cff;
  color: #fff;
}

.app-brand-text.demo {

  text-transform: capitalize;
}

#appointment_table .custom-btn {
  margin-right: 10px;
}

.select2-container .select2-selection--single {

  height: 38px !important;


}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 38px !important;
}

.btn-close span {
  display: none;
}

.alert-success {

  text-transform: capitalize !important;
}



.app-brand-logo {
  display: none;
}

.layout-menu-collapsed .app-brand-logo {
  display: block;
}

.layout-menu-hover .app-brand-logo {
  display: none;
}

.menu-toggle::after {
  right: 10px;
}


.layout-navbar.navbar-detached.container-xxl {
  max-inline-size: calc(1920px - 1.625rem * 2);
}


@media (min-width: 1400px) {

  .container-xxl,
  .container-xl,
  .container-lg,
  .container-md,
  .container-sm,
  .container {
    max-width: 1920px;
  }
}

/* Fix Select2 alignment inside Bootstrap input-groups */
.input-group .select2-container--default {
  flex: 1 1 auto;
  width: 1% !important;
}

.input-group .select2-container--default .select2-selection--single {
  height: 38px !important;
  display: flex;
  align-items: center;
  border-color: #d9dee3 !important;
}

.input-group .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 36px !important;
}

/* When Select2 is preceded by input-group-text, remove left border radius */
.input-group > .input-group-text + .select2-container--default .select2-selection--single {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

/* When Select2 is followed by a button, remove right border radius */
.input-group > .select2-container--default:not(:last-child) .select2-selection--single {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* Sidebar menu scrollbar customization */
.menu-inner.ps {
  overflow-y: auto !important;
}

.menu-inner::-webkit-scrollbar {
  width: 6px;
}

.menu-inner::-webkit-scrollbar-track {
  background: transparent;
}

.menu-inner::-webkit-scrollbar-thumb {
  background: rgba(105, 108, 255, 0.15);
  border-radius: 4px;
}

.menu-inner::-webkit-scrollbar-thumb:hover {
  background: rgba(105, 108, 255, 0.4);
}

/* Perfect scrollbar rails customization */
.ps__rail-y {
  width: 8px !important;
  background-color: transparent !important;
  left: auto !important;
  right: 2px !important;
}

.ps__rail-y:hover > .ps__thumb-y,
.ps__rail-y:focus > .ps__thumb-y,
.ps__rail-y.ps--clicking .ps__thumb-y {
  background-color: #696cff !important;
  width: 6px !important;
}

.ps__thumb-y {
  background-color: rgba(105, 108, 255, 0.3) !important;
  border-radius: 4px !important;
  width: 4px !important;
  transition: background-color 0.2s ease, width 0.2s ease;
}

/* Active styling for all active menu links (text and icons) at any nested level */
.bg-menu-theme .menu-inner .menu-item.active > .menu-link,
.bg-menu-theme .menu-inner .menu-item.active > .menu-link i {
  color: #696cff !important;
}

/* Background highlight ONLY for the active leaf nodes (like Create Area or Locations List) */
.bg-menu-theme .menu-inner .menu-item.active:not(.open) > .menu-link {
  background-color: rgba(105, 108, 255, 0.16) !important;
  font-weight: 600;
}

/* Hide default Sneat submenu bullet dots since we use custom Boxicons */
.menu-vertical .menu-sub .menu-link::before {
  display: none !important;
}

/* Ensure the password visibility toggle is clickable and sits above the input field overlap */
#toggle-password {
  position: relative;
  z-index: 5 !important;
  pointer-events: auto !important;
}

/* Eliminate horizontal scrollbar on DataTables while keeping responsive dtr-control expand arrow */
.card-body .table-responsive,
.table-responsive {
  overflow-x: hidden !important;
}

table.dataTable {
  width: 100% !important;
}
