/*
 * Copyright (C) 2023-2024  ANSSI
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

/* Use Bootstrap icons */
.bi {
  fill: currentColor;
  vertical-align: -.125em;
}

/* Disable Bootstrap blue box-shadow on open <select> */
.form-select:focus {
  box-shadow: none;
}

/* Disable Bootstrap transition on form elements */
.btn,
.form-control,
.form-select {
  transition: none;
}

/* Timeline in sidebar */
#timeline {
  width: 20px;
}
#timeline:hover #timeline-indicator {
  background-color: rgba(var(--bs-body-color-rgb),var(--bs-bg-opacity)) !important;
}
#timeline:hover .tooltip {
  display: block;
  opacity: 1;
}
#timeline .tooltip {
  display: none;
  position: absolute;
  left: 25px;
}

/* Make flows list user-resizable */
nav.nav-flow {
  width: 380px;
  min-width: 300px;
  resize: horizontal;
  overflow-x: hidden;
}
.filter-dropdown {
  width: 300px;
  margin-left: -2px !important;
}
.overflow-no-scrollbar {
  scrollbar-width: none;
}

/* Use purple background to show active elements */
.text-bg-purple,
#flow-list a.active,
input[type="checkbox"]:checked + label.btn-purple {
  color: #fff !important;
  background-color: #59359a !important;
}
.border-purple,
input.is-active,
select.is-active {
  border-color: #ac80ff !important;
}

/* Change nav pills active color */
.nav-pills {
  --bs-nav-pills-link-active-bg: #495057;
}

/* Fix strange Boostrap behaviour */
.list-group-item + .list-group-item.active {
  margin-top: 0;
}

.badge {
  font-size: 8pt;
}
.text-bg-none {
  color: inherit;
}

pre {
  white-space: pre-wrap;
  word-break: break-all;
}

iframe {
  zoom: 0.75;
}

.img-payload {
  max-width: 100%;
  max-height: 256px;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAPCAIAAABiEdh4AAAAJ0lEQVQoz2OcOXMmAzZw9uxZrOJMDCSCEamBBVfwGRsbj4YS/TQAAH8aB1JXTyw+AAAAAElFTkSuQmCC");
}

.audio-payload {
  width: 100%;
}

/* Extend background color on whole line height */
pre code {
  padding: .1875em 0;
}

@keyframes slidein {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Progress bar for ticks */
#progressbar-tick {
  background-color: #ac80ff;
  height: 5px;
  z-index: 10;
  transform-origin: left center;
  animation-name: slidein;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  animation-iteration-count: infinite;
}

#app {
  padding-top: 5px;
}
