/*
 * Application stylesheet
 */
:root {
  --button-active-color: #708cb5;
  --navbar-height: 60px;
  /* This width is for when Reports and Config menus item are implemented.
  --sidebar-width: 14rem;
  */
  --sidebar-width: 10rem;
  --change-detected-color: #ff4000; /* a shade of orange */
}

html, body {
  height: 100%;
  overflow-y: hidden;
  width: 100%;
}

/* || Login page */
.login-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
}
.login {
  width: 100%;
  max-width: 330px;
  padding: 15px;
  margin: 0 auto;
}
.fError {
  color: #c00;
  padding-bottom: 0;
}

/* Make password input and eye icon appear as one unified box on login page */
.login .input-group {
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  overflow: hidden;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.login .input-group:focus-within {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.login .input-group .form-control {
  border: none;
}

.login .input-group .form-control:focus {
  box-shadow: none;
}

.login .input-group .btn {
  border: none;
  background-color: transparent;
  color: #6c757d;
}

.login .input-group .btn:hover {
  background-color: #f8f9fa;
  color: #495057;
}

.login .input-group .btn:focus {
  box-shadow: none;
}

/* || Nav dropdown submenu */
.dropdown-submenu {
  position: relative;
}
.dropdown-submenu > .dropdown-menu {
  top: 0;
  right: 100%;
  left: auto;
  margin-top: -6px;
  display: none;
}
.dropdown-submenu:hover > .dropdown-menu {
  display: block;
}
.dropdown-submenu > a.dropdown-toggle::after {
  display: none;
}
.dropdown-submenu > a.dropdown-toggle::before {
  display: inline-block;
  margin-right: .4em;
  vertical-align: middle;
  content: "";
  border-top: .3em solid transparent;
  border-right: .3em solid;
  border-bottom: .3em solid transparent;
  border-left: 0;
}

/* Currently selected fleet indicator */
.dropdown-submenu .dropdown-menu .dropdown-item::before {
  content: "";
  display: inline-block;
  width: .6em;
  margin-right: .4em;
}
.dropdown-submenu .dropdown-menu .dropdown-item.fleet-active {
  background-color: transparent;
  color: inherit;
}
.dropdown-submenu .dropdown-menu .dropdown-item.fleet-active::before {
  content: "•";
  vertical-align: middle;
}

/* || Top navigation bar */
.navbar {
  background: lightgray;
  padding-bottom: 0;
  padding-top: 0;
}

.display-name {
  font-size: 1.25rem;
  margin-right: 1rem;
  color: #333;
  text-decoration: none;
  cursor: pointer;
}

.display-name:hover {
  color: #0056b3;
  text-decoration: none;
}

.btn-logout {
  background: #e6e6e6;
  border: 1px solid #767676;
  padding: .25rem;
}

#main-content {
  height: calc(100% - var(--navbar-height));
  overflow-x: hidden;
  width: 100%;
}

.alert {
  margin-top: 10px;
}

#error-msg {
  color: red;
  height: 1.5em;
  overflow-y: auto;
}

/* || Fleet list */
.fleet-list {
  padding: 16px;
  display: grid;
  grid-template-columns: auto auto auto;
}

.fleet-label {
  font-size: 1.25rem;
  margin-right: 1rem;
}

#go {
  margin-left: 16px;
}

.vehicle-status-wrapper,
.admin-wrapper {
  height: 100%;
  width: calc(100% - var(--sidebar-width));
  overflow-y: auto;
}

.heading {
  border-bottom: .15em solid #708cb5;
  border-radius: .1em;
  font-size: 1.25rem;
  font-weight: 500;
  margin-left: 1rem;
}

.btn-xs {
  border: 1px solid #767676;
  border-radius: .25rem;
  padding: 0 .25rem;
}

.btn-xs:focus,
.btn-xs:hover,
.btn:hover {
  background: #cdd5e5;
  outline: none;
}

.table {
  font-size: .875rem;
  width: 100%;
} 

.table thead th {
  border-top: none;
  margin-left: 10%;
  padding: .5em;
}

.table td {
  padding: .25em;
}

tr.selected {
  /* The lighter version of the blue(#708cb5) in the icon according to gimp. */
  background: #cdd5e5!important;
}

.fa-pencil-square-o {
  margin-right:5px; 
}

i.fa-check-circle {
  color: #7BC86F;
  margin-right: 5px;
}

i.fa-times {
  color: #fa3434;
  margin-right: 5px;
}

li.list-group-item {
  margin-left: 10px;
  outline: none;
}

a.list-group-item {
  border: none;
  padding: .25rem 1.25rem;
}

.avoid-clicks {
  pointer-events: none;
}

/* || Sidebar menu */
#sidebar-container {
  border-right: 3px solid lightgray;
  float: left;
  min-height: calc(100% - var(--navbar-height));   
  overflow-y: auto;
  padding: 0;
}

/* Sidebar sizes when expanded and expanded */
.sidebar-expanded {
  width: var(--sidebar-width);
}
.sidebar-collapsed {
  width: 1.5em;
  overflow-x: hidden;
}

/* Submenu item */
#sidebar-container .list-group .sidebar-submenu a {
  padding-left: 30px;
}
.sidebar-submenu {
  font-size: 0.9em;
}

/* Closed submenu icon */
#sidebar-container .list-group .list-group-item[aria-expanded="false"] .submenu-icon::after {
  content: " \f0d7";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  display: inline;
  text-align: right;
  padding-left: 10px;
}

/* Opened submenu icon */
#sidebar-container .list-group .list-group-item .submenu-icon::after {
  content: " \f0da";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  display: inline;
  text-align: right;
  padding-left: 10px;
}

li.list-group-item {
  margin-left: 10px;
  outline: none;
}

a.list-group-item {
  border: none;
  padding: .25rem 1.25rem;
}

.avoid-clicks {
  pointer-events: none;
}

/* || Add/edit modal */
.input-wrapper {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-gap: 16px;
}

.role-wrapper {
  column-gap: 16px;
  display: grid;
  grid-template-columns: 190px 1fr;
}

fieldset {
  border: 2px solid lightgray;
  border-radius: 4px;
}

legend.required::after {
  color: #cb2431;
  content: "*";
}

label.required::after {
  color: #cb2431;
  content: "*";
}

/* Make password input and eye icon appear as one unified box in modals */
.modal .input-group {
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  overflow: hidden;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.modal .input-group:focus-within {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.modal .input-group .form-control {
  border: none;
}

.modal .input-group .form-control:focus {
  box-shadow: none;
}

.modal .input-group .btn {
  border: none;
  background-color: transparent;
  color: #6c757d;
}

.modal .input-group .btn:hover {
  background-color: #f8f9fa;
  color: #495057;
}

.modal .input-group .btn:focus {
  box-shadow: none;
}

/* || Vehicle capacity table */
#vehicle-capacity-wrapper {
  margin-left: 1rem;
}

#capacity-table thead {
  display: table;
  min-width: 25vw;
  width: max-content;
}

#capacity-table tbody {
  display: block;
  max-height: calc(100vh - var(--navbar-height) - 100px);
  overflow-y: auto;
  min-width: 25vw;
  width: max-content;
}

.vehicle-name {
  min-width: 15vw;
  width: max-content;
}

.capacity {
  min-width: 10vw;
  width: max-content;
}

.capacity input {
  text-align: right;
  border-radius: 2px;
}

/* || Change own password */
#password-wrapper {
  margin: 1rem;
}

.password-message {
  margin-bottom: 1rem;
}

.right-button {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* Make password input and eye icon appear as one unified box */
#password-wrapper .input-group {
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  overflow: hidden;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#password-wrapper .input-group:focus-within {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#password-wrapper .input-group .form-control {
  border: none;
}

#password-wrapper .input-group .form-control:focus {
  box-shadow: none;
}

#password-wrapper .input-group .btn {
  border: none;
  background-color: transparent;
  color: #6c757d;
}

#password-wrapper .input-group .btn:hover {
  background-color: #f8f9fa;
  color: #495057;
}

#password-wrapper .input-group .btn:focus {
  box-shadow: none;
}

/* || modal error message */
.error-msg {
  margin-bottom: 0.5rem;
}


/* Hide input nubmer arrows */
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}
