/* Theme */

/* Fonts */

@font-face {
  font-family: "GT Walsheim";
  src: url("/static/fonts/walsheim/GT-Walsheim-Thin.6f0dedca5400.woff2") format("woff2"),
    url("/static/fonts/walsheim/GT-Walsheim-Thin.56770c50f88d.woff") format("woff");
  font-weight: 300; /* Light */
  font-style: normal;
}

@font-face {
  font-family: "GT Walsheim";
  src: url("/static/fonts/walsheim/GT-Walsheim-Thin-Oblique.813a6767bc0a.woff2")
      format("woff2"),
    url("/static/fonts/walsheim/GT-Walsheim-Thin-Oblique.5c0f9d118b12.woff") format("woff");
  font-weight: 300; /* Light */
  font-style: italic;
}

@font-face {
  font-family: "GT Walsheim";
  src: url("/static/fonts/walsheim/GT-Walsheim-Regular.e51206e1c68d.woff2") format("woff2"),
    url("/static/fonts/walsheim/GT-Walsheim-Regular.b68bb57b53cf.woff") format("woff");
  font-weight: var(--bs-body-font-weight);
  font-style: normal;
}

@font-face {
  font-family: "GT Walsheim";
  src: url("/static/fonts/walsheim/GT-Walsheim-Regular-Oblique.db48014f38a9.woff2")
      format("woff2"),
    url("/static/fonts/walsheim/GT-Walsheim-Regular-Oblique.cf6bdb7d023d.woff")
      format("woff");
  font-weight: var(--bs-body-font-weight);
  font-style: italic;
}

@font-face {
  font-family: "GT Walsheim";
  src: url("/static/fonts/walsheim/GT-Walsheim-Bold.0c23c0dbe5d6.woff2") format("woff2"),
    url("/static/fonts/walsheim/GT-Walsheim-Bold.3ed608be4cb1.woff") format("woff");
  font-weight: 700; /* Bold */
  font-style: normal;
}

@font-face {
  font-family: "GT Walsheim";
  src: url("/static/fonts/walsheim/GT-Walsheim-Bold-Oblique.f1ce64204821.woff2")
      format("woff2"),
    url("/static/fonts/walsheim/GT-Walsheim-Bold-Oblique.4964e47a317a.woff") format("woff");
  font-weight: 700; /* Bold */
  font-style: italic;
}

:root {
  --atmio-blue: #286eec;
  --atmio-ochre: #dca100;
  --atmio-light-blue: #3d7bee;
  --atmio-light-grey: #edf2f7;
  --atmio-light-black: rgba(0, 0, 0, 0.4);

  /* Bootstrap variables */
  --bs-font-sans-serif: "GT Walsheim", sans-serif;
  --bs-link-color: var(--atmio-blue);
  --bs-body-font-size: 0.875rem;
  /* Note that setting these colors will NOT adapt all components to the new color scheme */
  --bs-warning: #fd7e14;
  --bs-danger: #dc3545;
}

.table-container td {
  padding: 0.875rem 0.875rem !important;
}

.table-container th {
  font-weight: 400;
}

main {
  background-color: var(--bs-light);
  overflow: auto;
  padding: 3rem;
}

.card {
  box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* Custom light shadow */
  --bs-card-border-width: 0; /* Removes the border */
}

.btn-primary {
  background-color: var(--atmio-blue);
  border-color: var(--atmio-blue);
}

.btn-outline-primary {
  --bs-btn-color: var(--atmio-blue);
  --bs-btn-border-color: var(--atmio-blue);
}

.nav-pills .nav-link.active {
  background-color: var(--atmio-blue);
}

.nav-link {
  padding: 1rem 1rem;
}

.nav-link > i {
  background-color: var(--atmio-light-black);
}

.nav-link.active > i {
  background-color: var(--atmio-light-blue);
}

.bg-light-blue {
  background-color: var(--atmio-light-blue);
}

.bg-light-black {
  background-color: var(--atmio-light-black);
}

/* Define a new breakpoints for extra-wide screens */
@media (min-width: 2000px) {
  .col-3xl-1 { flex: 0 0 8.33%; max-width: 8.33%; }
  .col-3xl-2 { flex: 0 0 16.66%; max-width: 16.66%; }
  .col-3xl-3 { flex: 0 0 25%; max-width: 25%; }
  .col-3xl-4 { flex: 0 0 33.33%; max-width: 33.33%; }
  .col-3xl-5 { flex: 0 0 41.66%; max-width: 41.66%; }
  .col-3xl-6 { flex: 0 0 50%; max-width: 50%; }
  .col-3xl-7 { flex: 0 0 58.33%; max-width: 58.33%; }
  .col-3xl-8 { flex: 0 0 66.66%; max-width: 66.66%; }
  .col-3xl-9 { flex: 0 0 75%; max-width: 75%; }
  .col-3xl-10 { flex: 0 0 83.33%; max-width: 83.33%; }
  .col-3xl-11 { flex: 0 0 91.66%; max-width: 91.66%; }
  .col-3xl-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 2500px) {
  .col-4xl-1 { flex: 0 0 8.33%; max-width: 8.33%; }
  .col-4xl-2 { flex: 0 0 16.66%; max-width: 16.66%; }
  .col-4xl-3 { flex: 0 0 25%; max-width: 25%; }
  .col-4xl-4 { flex: 0 0 33.33%; max-width: 33.33%; }
  .col-4xl-5 { flex: 0 0 41.66%; max-width: 41.66%; }
  .col-4xl-6 { flex: 0 0 50%; max-width: 50%; }
  .col-4xl-7 { flex: 0 0 58.33%; max-width: 58.33%; }
  .col-4xl-8 { flex: 0 0 66.66%; max-width: 66.66%; }
  .col-4xl-9 { flex: 0 0 75%; max-width: 75%; }
  .col-4xl-10 { flex: 0 0 83.33%; max-width: 83.33%; }
  .col-4xl-11 { flex: 0 0 91.66%; max-width: 91.66%; }
  .col-4xl-12 { flex: 0 0 100%; max-width: 100%; }
}

/* limit dropdowns from expanding to infinity */
.dropdown-menu {
  max-height: 30rem;
  overflow-y: auto;
}

/*
Move accordion arrow left.
Remember to set order of other headline elements!
*/
.accordion-button::after {
  margin-left: 0 !important;
  margin-right: 15px;
  order: 0;
}

.sort-control {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 200;
}

.sort-control i {
  border-bottom: 1px solid transparent;
}

.sort-control-active {
  color: var(--atmio-blue);
  font-weight: 400;
}

.sort-control:hover i {
  color: var(--atmio-blue);
  border-bottom: 1px solid var(--atmio-blue);
}
/* The structure containing the Carousel in Details view */
.col-md-4 .card.mb-3 .card-body {
  padding: 0;
}

/* General carousel styles applicable to all carousels */
.carousel {
  margin-bottom: 14px; /* Adds space below the carousel for indicators */
}

/* Styles for carousel indicators positioned at the bottom outside the carousel */
.carousel-indicators {
  position: static;
  display: flex;
  justify-content: center;
  padding-left: 0;
  margin-right: 15%;
  margin-left: 15%;
  list-style: none;
  margin-top: 10px; /* Adds space between the image and indicators */
}

/* Styles for the indicator thumbnails inside the carousel */
.carousel .carousel-indicators img {
  cursor: pointer;
  object-fit: cover;
  width: 60px; /* Thumbnail width */
  height: 60px; /* Thumbnail height */
  margin: 0 3px;
  border: 2px solid transparent;
}

/* Ensure the carousel images fill the card */
.carousel .carousel-item img {
  width: 100%;
  height: auto;
}

/* Specific styles for the main image in the detail view */
.carousel .carousel-item img.detail-view {
  object-fit: cover;
  max-height: 350px;
}

/* Style modifications for the active indicator thumbnail */
.carousel .carousel-indicators img.active {
  opacity: 0.7; /* Slightly transparent when active for visual emphasis */
  border: 2px solid #2b3642;
}

/* Specific styles for the active indicator thumbnails inside the carousel in the modal view */
.carousel-modal .carousel-indicators img.active {
  border: 2px solid #2b3642;
}

/* Ensures that the images within carousel items fit well and maintain their aspect ratio */
.carousel-inner .carousel-item img {
  width: 100%;
  height: auto;
}

/* Specific styles for the carousel when it is within a modal */
.carousel.slide.carousel-modal {
  margin-top: 0px; /* Ensures consistent spacing at the top of the modal carousel */
}

/* Specific styles for the main image in the modal view */
.carousel-modal .carousel-item img.modal-view {
  object-fit: contain;
  max-height: 700px;
}

/* Styles for the indicator thumbnails within the modal */
.carousel-modal .carousel-indicators img {
  width: 120px; /* Larger width for modal thumbnails */
  height: 120px; /* Larger height for modal thumbnails */
  cursor: pointer;
  object-fit: cover;
  margin: 0 3px;
  border: 2px solid transparent;
}

/* Overrides the default backdrop style when a modal is open */
.modal-backdrop.show {
  opacity: 0.7; /* Sets the opacity to make the backdrop darker */
  background-color: #0c111d; /* Dark background color for the modal backdrop */
}

/* Ensures that the modal always occupies the same height.
Necessary for e.g. collapsable widget filters to be clickable */
.modal-dialog-scrollable .modal-content {
  min-height: 100%;
}

/* Additional positioning utilitites  */
.top-3rem {
  top: 3rem;
}

/* Horizontal separator with text in the middle
https://stackoverflow.com/a/26634224
*/

.separator {
  display: flex;
  align-items: center;
  text-align: center;
}

.separator::before,
.separator::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--bs-border-color);
}

.separator:not(:empty)::before {
  margin-right: 0.25em;
}

.separator:not(:empty)::after {
  margin-left: 0.25em;
}

/* Make the biggest modal size a bit bigger */
.modal-xl {
  --bs-modal-width: 1600px;
}

/* Select2 multiselect styles */
.select2-container .select2-selection--multiple {
  height: 1.5rem !important;
  overflow: hidden;
}

.select2-selection__choice {
  font-size: 0.5rem !important;
}

.select2-selection__choice__remove {
  width: 0.35rem !important;
}

/* Leak Repair Bubble Table */
.leak-repair-state-bubble-size-1 {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.5rem;
}
.leak-repair-state-bubble-size-2 {
  width: 2rem;
  height: 2rem;
  font-size: 0.75rem;
}
.leak-repair-state-bubble-size-3 {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1rem;
}
.leak-repair-state-bubble-size-4 {
  width: 3rem;
  height: 3rem;
  font-size: 1.25rem;
}
.leak-repair-state-bubble-size-5 {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.5rem;
}

.leak-repair-state-bubble-blue {
  background-color: var(--atmio-blue);
}
.leak-repair-state-bubble-orange {
  background-color: var(
    --atmio-ochre
  ); /* Orange. Same as for apache echarts orange */
}
.leak-repair-state-bubble-red {
  background-color: #d56062; /* Indian Red. Same as for apache echarts red */
}
.leak-repair-state-bubble-white {
  background-color: white;
  color: black !important;
}
.leak-table-bubble:hover {
  cursor: pointer !important;
  shadow: 0 0 10px 0 rgba(0, 0, 0, 1);
}

/* Timeline */
/* Adapted from https://www.bootdey.com/snippets/view/timeline-steps */
.timeline-steps {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.timeline-steps .timeline-step {
  cursor: pointer;
  align-items: center;
  display: flex;
  flex-direction: column;
  position: relative;
  margin: 1rem;
}

@media (min-width: 768px) {
  .timeline-steps .timeline-step:not(:last-child):after {
    content: "";
    display: block;
    border-top: 0.25rem dotted var(--atmio-blue);
    width: 3.4rem;
    position: absolute;
    left: 3.75rem;
    top: 0.3125rem;
  }
  .timeline-steps .timeline-step:not(:first-child):before {
    content: "";
    display: block;
    border-top: 0.25rem dotted var(--atmio-blue);
    width: 3.4rem;
    position: absolute;
    right: 3.75rem;
    top: 0.3125rem;
  }
}

.timeline-steps .timeline-content {
  width: 5rem;
  text-align: center;
  font-size: 0.75rem;
}

.timeline-steps .timeline-content .inner-circle {
  border-radius: 0.75rem;
  height: 1rem;
  width: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.timeline-steps .timeline-content .inner-circle:hover {
  background-color: var(--atmio-blue);
}

.timeline-steps .timeline-content .inner-circle.active {
  background-color: var(--atmio-blue);
}

.timeline-steps .timeline-content .inner-circle:before {
  content: "";
  background-color: var(--atmio-blue);
  display: inline-block;
  height: 1.5rem;
  width: 1.5rem;
  min-width: 1.5rem;
  border-radius: 3.125rem;
  opacity: 0.5;
}

.fs-7 {
  font-size: 0.75rem;
}

/* Adaptions for printing */
@media print {
  @page {
    size: a4;
  }
  .btn,
  button,
  nav,
  form[id$="Filter"] {
    display: none !important;
  }
  main {
    background-color: white;
    overflow: initial;
    padding: 0;
  }
  .card {
    border: 1px solid;
    box-shadow: unset;
    page-break-after: auto;
    page-break-inside: avoid;
  }
}

/* Quill adaptions */
.ql-editor {
  font-family: var(--bs-font-sans-serif);
  font-size: var(--bs-body-font-size);
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}