/* App helpers on top of FHNW Bootstrap (fhnw.min.css). */

.connection-panel code {
  overflow-wrap: anywhere;
}

.badge-count {
  color: #000;
  background-color: #fde703;
}

/* Tutorial carousel: arrows on the sides, dots below. */

.tutorial-carousel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "prev stage next"
    ".    dots  .";
  align-items: center;
  column-gap: 1rem;
  row-gap: 1rem;
}

.tutorial-carousel:focus-visible {
  outline: 2px solid #000;
  outline-offset: 4px;
}

.tutorial-arrow-prev { grid-area: prev; }
.tutorial-arrow-next { grid-area: next; }
.tutorial-stage { grid-area: stage; }
.tutorial-dots { grid-area: dots; }

.tutorial-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 2px solid #000;
  border-radius: 50%;
  background: #000;
  color: #fff;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}

.tutorial-arrow:hover,
.tutorial-arrow:focus-visible {
  background: #fde703;
  color: #000;
}

.tutorial-arrow:focus-visible {
  outline: 2px solid #000;
  outline-offset: 3px;
}

.tutorial-arrow:disabled {
  background: #fff;
  border-color: #dee2e6;
  color: #adb5bd;
  cursor: default;
}

.tutorial-stage {
  background: #fff;
}

.tutorial-step {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  min-height: 26rem;
}

.tutorial-step[hidden] {
  display: none !important;
}

.tutorial-kicker {
  margin-bottom: .5rem;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6c757d;
}

.tutorial-fields {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .25rem 1rem;
}

.tutorial-fields dt {
  font-weight: 600;
}

.tutorial-fields dd {
  margin: 0;
}

.tutorial-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 22rem;
}

.tutorial-media img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 1px solid #dee2e6;
}

.tutorial-download {
  flex-direction: column;
  height: auto;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: #000;
  background: #fde703;
}

.tutorial-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #f1f1ee;
  padding: 1.5rem;
  text-align: center;
  color: #6c757d;
}

.tutorial [data-os][hidden] {
  display: none !important;
}

.tutorial-dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
}

.tutorial-dots button {
  width: .75rem;
  height: .75rem;
  padding: 0;
  border: 0;
  border-radius: .375rem;
  background: #dee2e6;
  cursor: pointer;
  transition: width .2s, background-color .2s;
}

.tutorial-dots button.done {
  background: #000;
}

.tutorial-dots button.active {
  width: 2rem;
  background: #fde703;
  box-shadow: inset 0 0 0 1px #000;
}

.tutorial-dots button:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

#footer {
  margin-top: 3rem;
}

@media (max-width: 1199.98px) {
  .tutorial-step {
    padding: 1.5rem;
    gap: 1.5rem;
    min-height: 22rem;
  }

  .tutorial-media {
    height: 18rem;
  }
}

@media (max-width: 991.98px) {
  .tutorial-step {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 1rem;
    padding: 1.25rem;
    min-height: 32rem;
  }

  .tutorial-media {
    height: 16rem;
  }
}

@media (max-width: 575.98px) {
  .tutorial .btn-group {
    width: 100%;
  }

  .tutorial .btn-group .btn {
    flex: 1;
  }

  .tutorial-carousel {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "stage stage stage"
      "prev  dots  next";
    column-gap: .5rem;
  }

  .tutorial-step {
    min-height: 32rem;
  }

  .tutorial-media {
    height: 12rem;
  }
}
