:root {
  --custom-primary-rgb: 5, 138, 115;
  --custom-secondary-rgb: 16, 49, 98;

  --custom-grey: rgb(243, 243, 243);
  --custom-grey-dark: rgb(122, 122, 122);
  --custom-primary: rgb(var(--custom-primary-rgb));
  --custom-primary-hover: rgb(5, 120, 100);
  --custom-primary-light: rgb(163, 217, 207);
  --custom-secondary: rgb(var(--custom-secondary-rgb));
  --custom-secondary-hover: rgb(18, 59, 119);
  --custom-success: rgb(65, 187, 119);
  --custom-dark-light: rgb(66, 66, 66);
  --custom-dark: rgb(33, 33, 33);

  --sidebar-width-mobile: 80px;
  --sidebar-width: 280px;
}

* {
  font-family: 'Roboto', sans-serif;
}

.roboto-condensed {
  font-family: 'Roboto Condensed', sans-serif;
}

.no-outline {
  outline: none !important;
}

html {
  min-height: 100%;
  display: flex;
}

body,
.app {
  flex-direction: column;
  display: flex;
  flex-grow: 1;
}

textarea {
  resize: none;
}

.color-primary {
  color: var(--custom-primary);
}

.color-primary-light {
  color: var(--custom-primary-light);
}

.color-secondary {
  color: var(--custom-secondary);
}

.color-grey {
  color: var(--custom-grey);
}

.color-grey-dark {
  color: var(--custom-grey-dark);
}

.background-primary {
  background-color: var(--custom-primary);
}

.btn-custom-primary {
  color: white;
  background-color: var(--custom-primary);
  border-color: var(--custom-primary);
}

.btn-custom-primary:hover {
  background-color: var(--custom-primary-hover);
  border-color: var(--custom-primary-hover);
  color: white;
}

.btn-custom-primary:focus {
  box-shadow: 0 0 0 0.25rem rgba(var(--custom-primary-rgb), 0.5);
  background-color: var(--custom-primary-hover);
  border-color: var(--custom-primary-hover);
  color: white;
}

.btn-custom-secondary {
  color: white;
  background-color: var(--custom-secondary);
  border-color: var(--custom-secondary);
}

.btn-custom-secondary:hover {
  background-color: var(--custom-secondary-hover);
  border-color: var(--custom-secondary-hover);
  color: white;
}

.btn-custom-secondary:focus {
  box-shadow: 0 0 0 0.25rem rgba(var(--custom-secondary-rgb), 0.5);
  background-color: var(--custom-secondary-hover);
  border-color: var(--custom-secondary-hover);
  color: white;
}

.btn-custom-outline-secondary {
  border-color: var(--custom-secondary);
  color: var(--custom-secondary);
}

.btn-custom-outline-secondary:hover {
  background-color: var(--custom-secondary);
  border-color: var(--custom-secondary);
  color: white;
}

.btn-custom-outline-secondary:focus {
  box-shadow: 0 0 0 0.25rem rgba(var(--custom-secondary-rgb), 0.5);
  background-color: var(--custom-secondary);
  border-color: var(--custom-secondary);
  color: white;
}

.app__logo {
  height: 64px;
}

.app__name {
  font-size: 1.125rem;
  line-height: 1.5rem;
}

.app__version {
  line-height: 1.5rem;
  font-size: 0.75rem;
}

.app__content {
  flex-direction: column;
  overflow-x: hidden;
  display: flex;
  flex-grow: 1;
}

.app__footer {
  background-color: var(--custom-grey);
}

.header__subheader {
  background-color: var(--custom-primary-light);
  color: var(--custom-primary);
  /* padding: 1rem 2rem; */
  /* height: 32px; */
}

.header__wrapper {
  background-color: var(--custom-grey);
  padding: 1rem 2rem;
}

nav > a {
  text-decoration: none;
}

.header__avatar {
  pointer-events: none;
  user-select: none;
  height: 64px;
  width: 64px;
}

.header__line-height {
  line-height: 1.25rem;
}

.app-navbar {
  background-color: var(--custom-primary);
  padding: 0.7rem 2rem;
}

.app-navbar__separator {
  background-color: white;
  height: 6px;
  width: 6px;

  margin: 0rem 1.5rem;
}

.app-navbar__item {
  text-transform: uppercase;
  color: var(--bs-white);
  position: relative;
  font-weight: bold;
  outline: none;

  transition: color 200ms ease;
}

.app-navbar__item:hover,
.app-navbar__item:focus {
  color: var(--custom-secondary);
}

#machine-name {
  width: calc(var(--sidebar-width) - 1.5rem);
  transition: color 200ms ease;
  color: inherit;
  outline: none;
}

#machine-name:hover,
#machine-name:focus {
  color: white;
}

/* ---- SIDEBAR SECTION START ---- */

.machine__sidebar {
  background-color: var(--custom-dark);
  min-width: var(--sidebar-width-mobile);
  max-width: var(--sidebar-width-mobile);
  transition: all 200ms ease;
  overflow: hidden;
}

.machine__sidebar ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.machine__nav-link {
  text-decoration: none;
  font-size: 1.125rem;
  padding: 1.875rem 0rem;
  color: white;
  display: flex;
  outline: none;

  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;

  justify-content: center;
  align-items: center;

  transition: background-color 200ms ease;
  border-bottom: 1px solid white;
}

.machine__nav-link.active {
  background-color: white;
  color: var(--custom-dark);
}

.machine__nav-link.active:hover,
.machine__nav-link.active:focus {
  background-color: rgb(215, 235, 230);
}

.machine__nav-link:hover,
.machine__nav-link:focus {
  background-color: var(--custom-dark-light);
}

.machine__nav-text {
  display: none;
}

#easy-brand-logo {
  pointer-events: none;
  user-select: none;
  display: none;

  align-self: center;
  margin: 4rem 0rem;
}

#easy-brand-logo > img {
  width: 80%;
}

@media screen and (min-width: 992px) {
  .machine__sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
  }

  .machine__nav-link {
    justify-content: flex-start;
    padding: 1.875rem 3rem;
  }

  .machine__nav-text {
    display: block;
  }

  .machine__nav-icon {
    display: none;
  }

  #easy-brand-logo {
    display: flex;
    justify-content: center;    
  }
}

/* ---- SIDEBAR SECTION END ---- */

.machine__wrapper {
  flex-grow: 1;
}

.machine__card {
  height: 100%;
}

.machine__card__img {
  padding-top: 56.25%;
  position: relative;
}

.machine__card__img > img {
  background-color: ghostwhite;
  pointer-events: none;
  user-select: none;

  position: absolute;
  object-fit: cover;
  height: 100%;
  left: 0;
  top: 0;
}

.machine__lang__wrapper > div {
  flex-direction: row-reverse;
  align-items: center;
  display: flex;
}

form label[class~='required']::after {
  color: var(--bs-red);
  margin-left: 5px;
  content: '*';
}

form .help-text {
  pointer-events: none;
  user-select: none;
  margin: 0;
}

.form-error-msg {
  pointer-events: none;
  user-select: none;
}

#new-machine-form ul,
#new-machine-form li,
#edit-machine-form ul,
#edit-machine-form li,
#documentation-machine-form li,
#documentation-machine-form ul,
#diagnostic-machine-form li,
#diagnostic-machine-form ul,
#videos-machine-form li,
#videos-machine-form ul,
#images-machine-form li,
#images-machine-form ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lang__box {
  justify-content: center;
  align-items: center;
  display: flex;

  height: 40px;
  width: 50px;
}

.lang__box ~ .lang__box {
  margin-left: 0.25rem;
}

/* #documents-fields-list > li > hr {
  margin: 2.25rem 0rem;
  margin-bottom: 1rem;
  display: none;
}

#documents-fields-list > li ~ li > hr {
  display: block;
} */

#documents-fields-list > li {
  transition: opacity 100ms linear;
}

#documents-fields-list > li ~ li,
#videos-fields-list > li ~ li {
  margin-top: 2rem;
}

.document__pdf {
  padding: 0.375rem 0.5rem !important;
  color: var(--bs-gray);
}

form label {
  color: var(--custom-secondary);
  font-weight: 500;
}

form input {
  color: var(--custom-dark-light) !important;
}

.form-control:not(input[type='file']) {
  padding: 0.5rem 1rem;
}

.btn {
  padding: 0.5rem 1.275rem;
}

input[type='file']::file-selector-button {
  padding: 0.5rem 1rem;
}

.lang-badge {
  padding: 0.5rem 0.7rem;
  font-size: 0.85rem;

  transition: color 200ms ease, background-color 200ms;
  text-decoration: none;
  outline: none;
}

a.lang-badge:hover,
a.lang-badge:focus {
  background-color: var(--custom-primary);
  color: white;
}

.lang-badge-primary {
  background-color: var(--custom-primary);
}

.lang-badge-light {
  background-color: white;
  color: inherit;
}

.lang-badge ~ .lang-badge {
  margin-left: 0.5rem;
}

#login-container {
  background-color: var(--custom-grey);
}

.form-control:focus {
  box-shadow: 0 0 0 0.25rem rgba(var(--custom-primary-rgb), 0.25);
  border-color: rgba(var(--custom-primary-rgb), 0.25);
}

.handle {
  cursor: grab;
}

.sortable-ghost {
  opacity: 0.5;
}

.video-thumbnail:hover .choose-text,
.video-thumbnail > button:focus .choose-text {
  opacity: 1;
}

.image-thumbnail:hover .choose-text,
.image-thumbnail > button:focus .choose-text {
  opacity: 1;
}

.video-thumbnail > button,
.image-thumbnail > button {
  position: relative;
  outline: none;
  border: none;
  padding: 0;
  margin: 0;

  user-select: text;

  background-color: white;
}

.video-thumbnail > button > div,
.image-thumbnail > button > div {
  border: 1px solid var(--custom-primary-light);
}

.video-thumbnail > button > div:first-child,
.image-thumbnail > button > div:first-child {
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
}

.video-thumbnail > button > div:last-child,
.image-thumbnail > button > div:last-child {
  border-bottom-right-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
  border-top: none;
}

.video-thumbnail .choose-text,
.image-thumbnail .choose-text {
  background-color: rgba(var(--custom-primary-rgb), 0.9);
  opacity: 0;

  transition: opacity 200ms ease;

  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  top: 0;
}

.video-thumbnail-img-container,
.image-thumbnail-img-container {
  position: relative;
  padding-top: 56.25%; /* 16:9 format */
  overflow: hidden;
  max-width: 100%;
}

.video-thumbnail-img,
.image-thumbnail-img {
  pointer-events: none;
  user-select: none;
  object-fit: cover;
  height: 100%;
  width: 100%;

  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  top: 0;
}

.video-thumbnail-preview {
  pointer-events: none;
  user-select: none;
  object-fit: cover;

  min-height: 72px;
  min-width: 72px;
  height: 72px;
  width: 72px;

  box-shadow: 0 0.4rem 1rem -0.25rem rgba(0, 0, 0, 0.125);
  border-radius: 0.25rem;
}

.diagnostic-structure-container,
.answers-new-form-container {
  max-width: 480px;
}

#diagnostic-form-structure {
  max-height: 276px;
  overflow-y: auto;
}

#diagnostic-form-structure:empty {
  background-color: gray;
}

.diagnostic-new-item-label {
  background-color: var(--custom-grey);
}

.diagnostic-item-label {
  transition: background-color 200ms ease, color 200ms ease;
  background-color: var(--custom-grey);
  cursor: pointer;
}

.diagnostic-item-label:hover {
  background-color: rgba(255, 255, 255);
  color: var(--custom-grey-dark);
}

.diagnostic-id-small {
  text-transform: capitalize;
  color: var(--bs-gray);
  font-weight: normal;
  font-size: 14px;
  left: 0;
}

.step-index {
  justify-content: center;
  align-items: center;
  display: flex;

  height: 50px;
  width: 50px;

  color: var(--custom-secondary);
  border: 2px solid var(--custom-primary);
  border-radius: 50%;
}

.border-gray {
  border: 1px solid #ced4da;
}

.complete-status {
  border-radius: 6px;
  height: 24px;
  width: 24px;
}

.complete-status.done {
  background-color: var(--bs-teal);
}

.complete-status.empty {
  background-color: var(--bs-orange);
}

/* Homepage loader / spinner */

.loader-container {
  transform: translate3d(-50%, -50%, 0);
  z-index: 99999;

  position: fixed;
  left: 50%;
  top: 50%;
}

.loader-container.hide {
  display: none;
}

.loader-container.show {
  display: block;
}

.bt-spinner {
  background-color: transparent;
  border: 12px solid whitesmoke;
  border-radius: 50%;

  border-top-color: var(--custom-primary);

  -webkit-animation: 500ms spin linear infinite;
  animation: 500ms spin linear infinite;

  height: 150px;
  width: 150px;
}

@keyframes spin {
  from {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  to {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
