/* Minimal compatibility layer for styles previously inherited from YG_bs5.css. */

/* Restore a few legacy Bootstrap tokens used by the old Yukon stylesheet. */
[data-bs-theme=light] {
  --bs-body-color: #323232;
  --bs-link-color: #005a65;
  --bs-link-hover-color: #008392;
  --bs-border-radius: 0.4rem;
  --bs-focus-ring-color: rgba(0, 90, 101, 0.25);
}

/* Restore legacy button sizing and shadow for shared primary buttons like Submit. */
.btn {
  --bs-btn-padding-x: 0.75rem;
  --bs-btn-padding-y: 0.375rem;
  --bs-btn-font-size: 1rem;
  --bs-btn-font-weight: 400;
  --bs-btn-line-height: 1.428;
  --bs-btn-border-radius: 0.4rem;
  --bs-btn-box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 1px 1px rgba(0, 0, 0, 0.075);
  font-family: "Nunito Sans", sans-serif;
  font-style: normal;
  box-shadow: var(--bs-btn-box-shadow);
}

.btn:hover,
.btn:focus {
  box-shadow: var(--bs-btn-box-shadow);
}

/* Restore the Yukon primary button palette used across the app. */
.btn.btn-primary,
.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #005a65;
  --bs-btn-border-color: #005a65;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #004c56;
  --bs-btn-hover-border-color: #004850;
  --bs-btn-focus-shadow-rgb: 38, 115, 124;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #004850;
  --bs-btn-active-border-color: #00434b;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #005a65;
  --bs-btn-disabled-border-color: #005a65;
  color: #fff;
  background-color: #005a65;
  border-color: #005a65;
  font-family: "Nunito Sans", sans-serif;
  font-style: normal;
  font-weight: 600;
}

/* Make navbar text match the older, slightly larger and more readable treatment. */
.navbar {
  --bs-navbar-nav-link-padding-x: 0.65rem;
}

.navbar-nav .nav-link,
.navbar-nav .dropdown-toggle,
.language-button {
  font-family: "Nunito Sans", sans-serif !important;
  font-style: normal !important;
  font-size: 0.98rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}

.dropdown-menu .dropdown-item {
  font-family: "Nunito Sans", sans-serif;
  font-style: normal;
}

/* Keep striped DataTables on the original neutral gray rather than the blue fallback. */
.table.table-striped > tbody > tr:nth-of-type(odd):not(.selected) > *,
table.dataTable.table-striped > tbody > tr:nth-of-type(odd):not(.selected) > *,
table.dataTable.stripe > tbody > tr.odd:not(.selected) > *,
table.dataTable.display > tbody > tr.odd:not(.selected) > * {
  background-color: rgba(0, 0, 0, 0.05) !important;
  box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.05) !important;
}

.table.table-striped > tbody > tr:nth-of-type(even):not(.selected) > *,
table.dataTable.table-striped > tbody > tr:nth-of-type(even):not(.selected) > *,
table.dataTable.stripe > tbody > tr.even:not(.selected) > *,
table.dataTable.display > tbody > tr.even:not(.selected) > * {
  background-color: #fff !important;
  box-shadow: inset 0 0 0 9999px transparent !important;
}

/* Keep datepicker popovers above the fixed app navbar. */
.datepicker,
.datepicker-dropdown,
.air-datepicker,
.air-datepicker-global-container {
  z-index: 1100 !important;
}

/* Restore the Bootstrap 5 modal shell styling used throughout the app. */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1055;
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: 0.5rem;
  pointer-events: none;
}

.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, -50px);
}

.modal.show .modal-dialog {
  transform: none;
}

.modal.modal-static .modal-dialog {
  transform: scale(1.02);
}

.modal-dialog-scrollable {
  height: calc(100% - 1rem);
}

.modal-dialog-scrollable .modal-content {
  max-height: 100%;
  overflow: hidden;
}

.modal-dialog-scrollable .modal-body {
  overflow-y: auto;
}

.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - 1rem);
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.175);
  border-radius: 0.5rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  outline: 0;
}

.modal-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
  border-top-left-radius: calc(0.5rem - 1px);
  border-top-right-radius: calc(0.5rem - 1px);
}

.modal-title {
  margin-bottom: 0;
  line-height: 1.428;
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem;
}

.modal-footer {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid #dee2e6;
  border-bottom-right-radius: calc(0.5rem - 1px);
  border-bottom-left-radius: calc(0.5rem - 1px);
}

.modal-footer > * {
  margin: 0;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}

.modal-backdrop.fade {
  opacity: 0;
}

.modal-backdrop.show {
  opacity: 0.5;
}

@media (min-width: 576px) {
  .modal-dialog {
    max-width: 500px;
    margin-right: auto;
    margin-left: auto;
  }

  .modal-sm {
    max-width: 300px;
  }

  .modal-dialog-scrollable,
  .modal-dialog-centered {
    min-height: calc(100% - 3.5rem);
    height: calc(100% - 3.5rem);
  }
}

@media (min-width: 992px) {
  .modal-lg,
  .modal-xl {
    max-width: 800px;
  }
}

@media (min-width: 1200px) {
  .modal-xl {
    max-width: 1140px;
  }
}
