/* bootstrap 3 colors */
:root {
  --bs-primary: #337ab7;
  --bs-primary-rgb: 51, 122, 183;

  --bs-secondary: #777;
  --bs-secondary-rgb: 51, 51, 51;

  --bs-success: #5cb85c;
  --bs-success-rgb: 92, 184, 92;

  --bs-info: #5bc0de;
  --bs-info-rgb: 91, 192, 222;

  --bs-warning: #f0ad4e;
  --bs-warning-rgb: 240, 173, 78;

  --bs-danger: #d9534f;
  --bs-danger-rgb: 217, 83, 79;
}

html,
body {
  height: 100%;
  font-size: 14px;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

a {
  color: #00c;
  text-decoration: none;
}

#alert_filter .form-check-label {
  font-weight: normal;
}

label {
  font-weight: bold;
}

.card {
  margin-bottom: 1rem;
}

.fs-5 {
  font-size: 1.142857rem !important; /* 16px from base font 14px */
}

.nav-item {
  padding-left: 15px;
}

.btn-primary {
  color: #ffffff; /* White text */
  background-color: #337ab7; /* Default primary blue */
  background-image: linear-gradient(to bottom, #337ab7, #265a88); /* Gradient effect */
  border-color: #2e6da4; /* Border color */
  background-repeat: repeat-x; /* Repeat the gradient horizontally */
}

/* Hover state */
.btn-primary:hover {
  color: #ffffff;
  background-color: #286090; /* Darker blue */
  background-image: linear-gradient(to bottom, #337ab7, #204d74); /* Hover gradient */
  border-color: #204d74; /* Darker border */
}

/* Focus state */
.btn-primary:focus,
.btn-primary.focus {
  color: #ffffff;
  background-color: #286090; /* Match hover background */
  background-image: linear-gradient(to bottom, #337ab7, #204d74); /* Match hover gradient */
  border-color: #122b40; /* Even darker border for focus */
  box-shadow: 0 0 0 3px rgba(50, 115, 220, 0.5); /* Optional focus outline */
}

/* Active state */
.btn-primary:active,
.btn-primary.active {
  color: #ffffff;
  background-color: #204d74; /* Deep blue */
  background-image: linear-gradient(to bottom, #204d74, #122b40); /* Active gradient */
  border-color: #122b40; /* Darkest border */
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); /* Pressed button effect */
}

.btn.disabled,
.btn:disabled {
  background-color: #265a88; /* Light gray background */
  border-color: #2e6da4; /* Light gray border */
}

.btn-warning {
  color: #fff;
  background-color: #f0ad4e;
  background-image: linear-gradient(to bottom, #f0ad4e, #ec971f);
  background-repeat: no-repeat;
  border-color: #eea236;
}

.btn-warning:hover,
.btn-warning:focus {
  color: #fff;
  background-color: #ec971f;
  background-image: linear-gradient(to bottom, #ec971f, #d58512);
  border-color: #d58512;
}

.btn-warning:active {
  color: #fff;
  background-color: #d58512;
  background-image: linear-gradient(to bottom, #d58512, #d58512);
  border-color: #b1720c;
}

.btn-warning:active:focus {
  box-shadow: 0 0 0 3px rgba(236, 151, 31, 0.5);
}

.full-pane {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  padding: 0px;
}

.atnavbar {
  background-image: url(/img/banner_bg.png);
  border-bottom: 1px solid #e6e6e6;
  background-repeat: repeat-x;
}

.navbar-expand-lg .nav-link {
  color: #888;
  font-weight: bold;
}

.nav-item.active {
  background-color: #ccc;
}

.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
  background-color: #ccc;
  color: #fff;
}

.popover {
  width: 100%;
}

#main_container {
  position: relative;
  background-color: #fff;
  /*    box-shadow: 0 0 30px #666666; */
  min-height: calc(100% - 75px);
  padding-bottom: 100px;
}

#main_container_small {
  position: relative;
  background-color: #fff;
  min-height: calc(100% - 86px);
  padding-bottom: 100px;
}

.background-worldmap {
  background-image: url("../img/world_map.jpg");
}

.modal {
  margin-top: 15px;
}

#modal_tile {
  margin-top: auto;
}

#modal_create .modal-content,
#modal_fence .modal-content,
#modal_details .modal-content,
#modal_details_history .modal-content,
#modal_alerts .modal-content,
#modal_obd .modal-content,
#modal_help .modal-content {
  height: 100%;
}

#div_table_status td,
#stopspanel td {
  padding: 5px;
}

#div_table_status .dt-search {
  display: none;
}

#table_status thead th,
#table_units thead th {
  position: sticky;
  top: 0;
}

.table-bordered > :not(caption) > * {
  border-width: 1px;
}

table.table-bordered.dataTable {
  border-collapse: collapse !important;
}

table.dataTable th,
table.dataTable td {
  text-align: left !important;
}

.small-text {
  font-size: 12px;
  letter-spacing: 0.04em;
}

@media screen and (max-width: 768px) {
  #modal_tile .smallmap_modal_body {
    height: calc(100vh - 220px);
  }

  #modal_create .modal-dialog,
  #modal_fence .modal-dialog,
  #modal_details .modal-dialog,
  #modal_details_history .modal-dialog,
  #modal_alerts .modal-dialog,
  #modal_obd .modal-dialog,
  #modal_help .modal-dialog {
    height: calc(100vh - 110px);
    width: 100%;
    max-width: 100%;
    margin: 0px;
  }
}

@media screen and (min-width: 769px) {
  #modal_tile .smallmap_modal_body {
    height: calc(100vh - 135px);
  }

  #modal_create .modal-dialog,
  #modal_fence .modal-dialog,
  #modal_details .modal-dialog,
  #modal_details_history .modal-dialog,
  #modal_alerts .modal-dialog,
  #modal_obd .modal-dialog,
  #modal_help .modal-dialog {
    height: calc(100vh - 60px);
    width: 100%;
    max-width: 100%;
    margin: 0px;
  }

  .bootbox .modal-dialog {
    max-width: 50%;
  }
}

@media (max-width: 992px) {
  .atnavbar-dropdown {
    position: absolute;
    top: 100%;
    right: 30px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 0.375rem;
    z-index: 1000;
  }
}

.modal-body {
  overflow: auto;
}

#pagenum_container_alerts,
#pagenum_container_obd {
  display: inline;
}

.page_num_alerts,
.page_num_obd {
  display: inline-block !important;
  float: none !important;
}

.bootbox.modal {
  z-index: 4000;
}

#customer_log img {
  margin: 25px;
}

#legend_container {
  position: absolute;
  width: 100%;
  top: 10px;
  z-index: 1000;
}

#ws_footer {
  position: absolute;
  left: 100px;
  bottom: 15px;
  z-index: 1000;
}

.jumbotron {
  background-color: black;
  background-image: url(/img/banner_jumbotron.jpg);
  background-repeat: repeat;
  margin-top: -20px;
}

.padding_30 {
  padding-bottom: 30px;
  padding-top: 30px;
}

@media print {
  a[href]:after {
    content: normal !important;
  }

  body {
    margin: 0;
  }
  .container {
    width: 100%;
    max-width: none;
    margin: 0;
  }
}

.MSVE_navAction_background {
  box-sizing: content-box !important;
}

#row_back_to_top.affix-top {
  visibility: hidden;
  position: absolute;
  right: 15px;
  bottom: 30px;
}

#row_back_to_top.sticky-bottom {
  right: 15px;
  bottom: 15px;
}

.atpinoverview {
  width: 48px;
  height: 42px;
  position: absolute;
  left: 8px;
  top: -23px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: 8pt;
  color: white;
  overflow: hidden;
  text-decoration: none;
  border: 0px;
  z-index: 1700;
  background-image: url(/css/pinovw.gif);
  background-repeat: no-repeat;
  background-position: top left;
  padding-left: 3px;
  padding-top: 3px;
  filter: alpha(opacity=90);
  opacity: 0.9;
  cursor: pointer;
}

.atpinhistory {
  background-image: url("/css/pinsm.gif");
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  position: absolute;
  left: 5px;
  top: 4px;
  font-family: Arial, sans-serif;
  font-size: 6pt;
  font-weight: bold;
  color: White;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  background-repeat: no-repeat;
  filter: alpha(opacity=90);
  opacity: 0.9;
  padding-left: 0px;
  padding-top: 3px;
  z-index: 50;
}

.atpinstop {
  background-image: url("/css/pinstop.gif");
  background-repeat: no-repeat;
  width: 24px;
  height: 24px;
  position: absolute;
  font-family: Arial, sans-serif;
  font-size: 10pt;
  font-weight: bold;
  color: yellow;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  background-repeat: no-repeat;
  filter: alpha(opacity=90);
  opacity: 0.9;
  padding-top: 2px;
  z-index: 55;
}

.at_moving {
  font-size: 15px;
  padding-top: 2px;
}

.at_direction_status {
  left: 8px;
  top: 3px;
  width: 16px;
  position: absolute;
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: 8pt;
  color: blue;
  overflow: hidden;
  z-index: 1720;
}

.atfencelabel {
  position: absolute;
  font-family: Arial, sans-serif;
  font-size: 8pt;
  white-space: nowrap;
  color: #222;
  background-color: #fff;
  border: 1px solid #fff;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  padding: 1px;
  text-align: center;
  filter: alpha(opacity=80);
  opacity: 0.8;
  z-index: 0;
  margin-top: 20px;
}

select.error,
textarea.error,
input.error {
  border-color: red;
}

@media screen and (max-width: 360px) {
  .at_pagination {
    left: 20px;
    bottom: 85px;
  }

  .at_toolbar {
    width: 100%;
  }

  .at_toolbar > .btn-group {
    display: flex;
  }

  .at_toolbar > .btn-group .btn {
    flex: 1 0 auto;
    font-size: 16px;
    line-height: 26px;
  }

  .gm-fullscreen-control {
    display: none;
  }
}

@media screen and (min-width: 361px) and (max-width: 768px) {
  .at_pagination {
    left: 20px;
    bottom: 95px;
  }

  .at_toolbar {
    width: 100%;
  }

  .at_toolbar > .btn-group {
    display: flex;
  }

  .at_toolbar > .btn-group .btn {
    flex: 1 0 auto;
    font-size: 20px;
    line-height: 30px;
  }

  .gm-fullscreen-control {
    display: none;
  }
}

@media screen and (min-width: 769px) {
  .at_pagination {
    left: 20px;
    bottom: 40px;
  }

  .at_toolbar > .btn-group > .btn {
    font-size: 16px;
    border-radius: 0px;
    line-height: 30px;
    padding: 5px 12px;
  }
}

.jsPanel-hdr {
  font-size: 16px;
  line-height: 38px !important; /* Ensure text aligns properly */
}

.jsPanel-titlebar .jsPanel-title {
  font-variant: normal;
  font-weight: bold;
  font-size: 16px;
}

/* Redefind jsPanel4 icons */
.jsPanel-btn-maximize .fa-window-maximize::before {
  content: "\0F065" !important;
}

.jsPanel-btn-close .fa-window-close::before {
  content: "\0F00D" !important;
}

.jsPanel-btn-normalize .fa-window-restore::before {
  content: "\0F066" !important;
}

.jsPanel .jsPanel-content {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 12px;
}

.jsPanel .panel-body {
  padding: 0px;
}

#urgent_news a {
  color: yellow;
}

#pane_history .select2-container {
  z-index: 9999 !important;
}

/* Fix for Select2 Bootstrap 5 theme "extra line" in multi-select. */
.select2-selection--multiple {
  padding: 0rem 0.75rem !important;
}
.select2-selection--multiple > ul {
  display: inline-flex !important;
}
.select2-selection--multiple > ul > li {
  padding: 0 0.3rem !important;
  margin: 0.3rem !important;
}
.select2-selection--multiple .select2-search--inline {
  display: inline-flex !important;
  width: auto !important;
  margin-top: 0.3rem !important;
  vertical-align: middle;
}

#unit_search::placeholder {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

/* Fix unit_search expansion and position icon inside */
.search-wrapper {
  position: relative;
  display: inline-block;
}

#unit_search {
  padding-right: 18px;
}

#clear_search {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #999;
  z-index: 5;
}

/* Fix DataTables search box layout */
div.dt-container .dt-search {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
}

div.dt-container .dt-search input {
  width: auto !important;
}

/* Prevent DataTables from reversing sort indicator for numeric columns */
#table_status thead th.dt-type-numeric div.dt-column-header,
#table_status thead th.dt-type-date div.dt-column-header {
  flex-direction: row !important;
}
