/* Keeps existing Blade screens working on Tabler (Bootstrap 5).
   Page markup still uses Bootstrap 4 utilities and Looper widgets. */

.page-wrapper .page {
  display: block;
  min-height: 0;
  position: static;
}

.page-inner {
  padding: 1.5rem 0;
}

@media (min-width: 576px) {
  .page-inner {
    padding-right: 1rem;
    padding-left: 1rem;
  }
}

@media (min-width: 992px) {
  .page-inner {
    padding-right: 2rem;
    padding-left: 2rem;
  }
}

.page-title-bar,
.page-section {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}

/* Looper puts the parent-page link inside .breadcrumb-item.active.
   Tabler turns those links off. */
.breadcrumb-item.active a {
  pointer-events: auto;
  cursor: pointer;
}

@media (min-width: 768px) {
  .page-title-bar,
  .page-section {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .page-title-bar,
  .page-section {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .page-title-bar,
  .page-section {
    max-width: 1140px;
  }
}

.page-title-bar {
  margin-bottom: 1.5rem;
  padding: 0 1rem;
}

@media (min-width: 576px) {
  .page-title-bar {
    padding-right: 0;
    padding-left: 0;
  }
}

.page-title {
  margin-top: 0;
  font-size: 1.75rem;
}

.page-title-bar .btn-toolbar {
  gap: 0.5rem;
}

.page-body .card {
  margin-bottom: 1.25rem;
}

.page-body .card .card,
.page-body .card-group > .card {
  margin-bottom: 0;
}

.section-title {
  margin-top: 0;
  padding: 1rem 0;
  font-size: 1rem;
}

.section-block {
  margin: 1rem 0;
}

.form-group {
  margin-bottom: 1rem;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -5px;
  margin-left: -5px;
}

.form-row > .col,
.form-row > [class*="col-"] {
  padding-right: 5px;
  padding-left: 5px;
}

.form-inline {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-reset {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
}

.text-muted {
  color: #6c757d !important;
}

.font-weight-light { font-weight: 300 !important; }
.font-weight-normal { font-weight: 400 !important; }
.font-weight-bold { font-weight: 700 !important; }
.font-weight-bolder { font-weight: bolder !important; }
.font-italic { font-style: italic !important; }

.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.float-left { float: left !important; }
.float-right { float: right !important; }
.float-none { float: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ml-0 { margin-left: 0 !important; }
.ml-1 { margin-left: 0.25rem !important; }
.ml-2 { margin-left: 0.5rem !important; }
.ml-3 { margin-left: 1rem !important; }
.ml-4 { margin-left: 1.5rem !important; }
.ml-5 { margin-left: 3rem !important; }
.ml-auto { margin-left: auto !important; }

@media (min-width: 576px) {
  .mr-sm-auto { margin-right: auto !important; }
  .ml-sm-auto { margin-left: auto !important; }
}

.mr-0 { margin-right: 0 !important; }
.mr-1 { margin-right: 0.25rem !important; }
.mr-2 { margin-right: 0.5rem !important; }
.mr-3 { margin-right: 1rem !important; }
.mr-4 { margin-right: 1.5rem !important; }
.mr-5 { margin-right: 3rem !important; }
.mr-auto { margin-right: auto !important; }

.pl-0 { padding-left: 0 !important; }
.pl-1 { padding-left: 0.25rem !important; }
.pl-2 { padding-left: 0.5rem !important; }
.pl-3 { padding-left: 1rem !important; }
.pl-4 { padding-left: 1.5rem !important; }
.pl-5 { padding-left: 3rem !important; }

.pr-0 { padding-right: 0 !important; }
.pr-1 { padding-right: 0.25rem !important; }
.pr-2 { padding-right: 0.5rem !important; }
.pr-3 { padding-right: 1rem !important; }
.pr-4 { padding-right: 1.5rem !important; }
.pr-5 { padding-right: 3rem !important; }

.no-gutters {
  margin-right: 0;
  margin-left: 0;
}

.no-gutters > .col,
.no-gutters > [class*="col-"] {
  padding-right: 0;
  padding-left: 0;
}

.badge-primary { background-color: #0190a0; color: #fff; }
.badge-secondary { background-color: #6c757d; color: #fff; }
.badge-success { background-color: #2fb344; color: #fff; }
.badge-danger { background-color: #d63939; color: #fff; }
.badge-warning { background-color: #f59f00; color: #fff; }
.badge-info { background-color: #4299e1; color: #fff; }
.badge-light { background-color: #f1f5f9; color: #1f2933; }
.badge-dark { background-color: #1f2933; color: #fff; }
.badge-pill { border-radius: 10rem; }

.close {
  float: right;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: #000;
  text-shadow: none;
  background: transparent;
  border: 0;
  opacity: .5;
}

.alert-dismissible {
  padding-right: 3.5rem;
}

.alert-dismissible .close {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.75rem 1.25rem;
  color: inherit;
}

select.form-control:not([multiple]),
select.custom-select:not([multiple]) {
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23667085' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
}

select.custom-select {
  display: block;
  width: 100%;
  padding: 0.375rem 2.25rem 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: inherit;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  appearance: none;
}

.input-group-prepend,
.input-group-append {
  display: flex;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  margin-bottom: 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  text-align: center;
  white-space: nowrap;
  background-color: #e9ecef;
  border: 1px solid #ced4da;
}

.custom-control {
  position: relative;
  display: block;
  min-height: 1.5rem;
  padding-left: 1.5rem;
}

.custom-control-inline {
  display: inline-flex;
  margin-right: 1rem;
}

.custom-control-input {
  position: absolute;
  left: 0;
  z-index: -1;
  width: 1rem;
  height: 1.25rem;
  opacity: 0;
  pointer-events: none;
}

.custom-control-label {
  position: relative;
  margin-bottom: 0;
  vertical-align: top;
  cursor: pointer;
}

.custom-control-label::before {
  position: absolute;
  top: 0.25rem;
  left: -1.5rem;
  display: block;
  width: 1rem;
  height: 1rem;
  pointer-events: auto;
  content: "";
  background-color: #fff;
  border: 1px solid #adb5bd;
  border-radius: 0.25rem;
}

.custom-control-input:checked ~ .custom-control-label::before {
  border-color: #0190a0;
  background-color: #0190a0;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after,
.custom-radio .custom-control-input:checked ~ .custom-control-label::after {
  position: absolute;
  top: 0.25rem;
  left: -1.5rem;
  display: block;
  width: 1rem;
  height: 1rem;
  pointer-events: none;
  content: "";
  background-repeat: no-repeat;
  background-position: center;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 7.2 L5.8 10 L11 4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
}

.custom-radio .custom-control-input:checked ~ .custom-control-label::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3ccircle cx='8' cy='8' r='3' fill='%23fff'/%3e%3c/svg%3e");
  background-size: 100%;
}

.custom-control-nolabel {
  margin: 0;
  padding-left: 0;
}

.custom-control-nolabel > .custom-control-label {
  width: 1.25rem;
  height: 1.25rem;
  color: transparent;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
}

.custom-control-nolabel > .custom-control-label::before,
.custom-checkbox.custom-control-nolabel > .custom-control-input:checked ~ .custom-control-label::after,
.custom-radio.custom-control-nolabel > .custom-control-input:checked ~ .custom-control-label::after {
  top: 0.125rem;
  left: 0.125rem;
}

.form-label-group {
  position: relative;
}

.form-label-group > input,
.form-label-group > label {
  padding: 0.75rem;
}

.form-label-group > label {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  margin-bottom: 0;
  line-height: 1.5;
  color: #6c757d;
  pointer-events: none;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  transition: all .1s ease-in-out;
}

.form-label-group input::placeholder {
  color: transparent;
}

.form-label-group input:not(:placeholder-shown) {
  padding-top: 1.25rem;
  padding-bottom: 0.25rem;
}

.form-label-group input:not(:placeholder-shown) ~ label {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  font-size: 0.75rem;
  color: #6c757d;
}

.dropdown-menu-right {
  right: 0;
  left: auto;
}

.dropdown-menu-rich {
  width: 320px;
  padding: 0;
}

.dropdown-menu-rich .dropdown-header {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.dropdown-menu-rich .dropdown-item {
  display: flex;
  align-items: flex-start;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  white-space: normal;
}

.dropdown-menu-rich .dropdown-item-body {
  flex: 1;
  min-width: 0;
  padding-left: 0.75rem;
}

.dropdown-scroll {
  position: relative;
  height: 263px;
  overflow-y: auto;
}

.dropdown-footer {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.dropdown-footer:hover,
.dropdown-footer:focus {
  text-decoration: none;
  background-color: #f6f8fb;
}

.has-badge {
  position: relative;
}

.has-badge > .badge {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(25%, -20%);
}

.tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  color: #667382;
  text-align: center;
  vertical-align: middle;
  background-color: #e9eaeb;
  border-radius: 0.25rem;
}

.tile-circle {
  border-radius: 4rem;
}

.tile.bg-primary,
.tile.bg-success,
.tile.bg-danger,
.tile.bg-info,
.tile.bg-dark {
  color: #fff;
}

.user-avatar {
  position: relative;
  display: inline-block;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0;
  vertical-align: middle;
  background-color: #fff;
  border-radius: 4rem;
}

.user-avatar-xl {
  width: 5rem;
  height: 5rem;
}

.user-avatar-lg {
  width: 3rem;
  height: 3rem;
}

.user-avatar-sm {
  width: 1.5rem;
  height: 1.5rem;
}

.user-avatar img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4rem;
}

.badge-lg {
  padding: 0.375rem 0.5rem;
}

.metric-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  margin: 0 -10px 1.25rem;
}

.metric-row > [class*="col"] {
  display: flex;
  flex-direction: column;
  padding-right: 10px;
  padding-left: 10px;
}

.metric-row > [class*="col"] > .metric,
.metric-row > [class*="col"] > .metric-row {
  width: 100%;
}

@media (max-width: 991.98px) {
  .metric-row > .col-lg-3 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 575.98px) {
  .metric-row > .col-lg-3 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .metric-row > .col-lg-3 .metric {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 0;
    gap: 0.75rem;
  }

  .metric-row > .col-lg-3 .metric-label,
  .metric-row > .col-lg-3 .metric-badge {
    margin-bottom: 0;
  }

  .metric-row > .col-lg-3 .metric-badge {
    top: 0;
  }

  .metric-row > .col-lg-3 .metric-value {
    margin: 0;
    flex: 0 0 auto;
  }
}

.metric-flush {
  flex: 1 1 auto;
  margin: 0.5rem 0;
}

.metric-flush > .col {
  display: flex;
  width: 100%;
  padding: 0;
}

.metric-flush .metric {
  margin: 0;
}

.metric {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: center;
  width: 100%;
  min-height: 8.5rem;
  margin: 0.5rem 0;
  padding: 1rem;
  background: #fff;
  border-radius: 0.25rem;
}

.metric-bordered {
  border: 1px solid var(--tblr-border-color-translucent);
  border-radius: var(--tblr-border-radius-lg);
  box-shadow: var(--tblr-shadow-card);
}

a.metric,
a.metric:hover,
a.metric:focus {
  color: inherit;
  text-decoration: none;
}

.page-body a.metric,
.page-body a.metric:hover,
.page-body a.metric:focus {
  color: inherit;
}

a.metric:hover,
a.metric:focus {
  border-color: var(--tblr-border-color-translucent);
  box-shadow: var(--tblr-shadow-card-hover, var(--tblr-shadow-card));
}

/* Account pages share the same content column as other screens. */
.page > .page-cover,
.page > .page-navs {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.page > .page-cover {
  padding-top: 0.5rem;
  padding-bottom: 0.75rem;
}

@media (min-width: 576px) {
  .page > .page-cover,
  .page > .page-navs {
    padding-right: 1rem;
    padding-left: 1rem;
  }
}

@media (min-width: 768px) {
  .page > .page-cover,
  .page > .page-navs {
    max-width: calc(720px + 2rem);
  }
}

@media (min-width: 992px) {
  .page > .page-cover,
  .page > .page-navs {
    max-width: calc(960px + 4rem);
    padding-right: 2rem;
    padding-left: 2rem;
  }
}

@media (min-width: 1200px) {
  .page > .page-cover,
  .page > .page-navs {
    max-width: calc(1140px + 4rem);
  }
}

.page-navs .nav-center {
  display: flex;
  justify-content: center;
  box-shadow: inset 0 -1px 0 rgba(61, 70, 79, 0.125);
}

/* DataTables: "Search:" and the field sit on one line, at the right. */
div.dataTables_wrapper > .row:first-child {
  margin-top: -0.625rem;
  margin-bottom: 0.625rem;
}

div.dataTables_wrapper div.dataTables_filter {
  text-align: right;
}

div.dataTables_wrapper div.dataTables_filter label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0;
  font-weight: 400;
  white-space: nowrap;
}

div.dataTables_wrapper div.dataTables_filter input {
  display: inline-block;
  width: auto;
  min-width: 12rem;
  margin-left: 0.5rem;
}

div.dataTables_wrapper div.dataTables_length select {
  display: inline-block;
  width: auto;
}

ul.list-group {
  list-style: none;
  padding-left: 0;
}

.switcher-control {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 36px;
  margin-bottom: 0;
  vertical-align: middle;
  user-select: none;
}

.switcher-input {
  position: absolute;
  opacity: 0;
}

.switcher-indicator {
  display: block;
  height: 16px;
  margin-bottom: 0;
  overflow: hidden;
  line-height: 16px;
  cursor: pointer;
  background-color: #ea6759;
  border: 2px solid #ea6759;
  border-radius: 16px;
  transition: background-color 150ms linear;
}

.switcher-indicator:before {
  content: "";
  position: absolute;
  top: 0;
  right: 20px;
  bottom: 0;
  display: block;
  width: 16px;
  background: #fff;
  border: 2px solid #ea6759;
  border-radius: 16px;
  transition: all 150ms ease-in-out;
}

.switcher-input:checked + .switcher-indicator,
.switcher-input:checked + .switcher-indicator:before {
  border-color: #2fb344;
}

.switcher-input:checked + .switcher-indicator {
  background-color: #2fb344;
}

.switcher-input:checked + .switcher-indicator:before {
  right: 0;
}

.switcher-input:disabled + .switcher-indicator {
  cursor: default;
  opacity: 0.65;
}

.metric-label {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #686f76;
}

.metric-value {
  margin: 0;
  line-height: 1;
  font-size: 1.75rem;
}

.metric-value .value {
  vertical-align: middle;
}

.metric-badge {
  position: relative;
  top: -0.5rem;
  margin-bottom: 0.5rem;
}
