@charset "utf-8";

@import 'bulma/bulma.sass';
@import 'bulma-switch';

/* Lyrics animation */
@keyframes pop-color {
  0% {
    color: $black;
  }
  100% {
    color: $success;
  }
}

.media.with-progress h2:last-of-type {
  margin-bottom: 6px;
}

.media.with-progress {
  margin-top: 6px;
}

a.navbar-item {
  padding: 0 1rem;
}

.fd-is-not-allowed {
  cursor: not-allowed;
}

.fd-is-movable {
  cursor: move;
}

.fd-is-square .button {
  height: 27px;
  min-width: 27px;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.fd-is-text-clipped {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fd-tabs-section {
  padding-bottom: 0;
  padding-top: 0;
  background: $white;
  top: $navbar-height;
  z-index: 20;
  position: fixed;
  width: 100%;
}

.fd-progress-bar {
  top: $navbar-height !important;
}

.fd-has-shadow img {
  box-shadow:
    0 4px 8px 0 rgba(0, 0, 0, 0.2),
    0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.fd-page-with-tabs {
  margin-top: $navbar-height !important;
}

.is-full-height {
  min-height: calc(100vh - calc(2 * $navbar-height));
}

.fd-cover {
  align-items: center;
  display: flex;
  justify-content: center;
  &-small-image {
    width: 4rem;
    height: 4rem;
    img {
      border-radius: $radius-small;
      max-width: 4rem;
      max-height: 4rem;
    }
  }
  &-medium-image {
    @include from($tablet) {
      justify-content: right;
    }
    img {
      border-radius: $radius;
      max-height: calc(150px - 1.5rem);
    }
  }
  &-normal-image {
    img {
      border-radius: $radius-large;
      width: 100%;
    }
  }
  &-big-image {
    @include mobile {
      @media screen and (orientation: landscape) {
        img {
          display: none;
        }
      }
    }
    img {
      border-radius: $radius-large;
      max-height: calc(100vh - 26rem);
    }
    &.is-masked {
      filter: blur(0.5rem) opacity(0.2);
    }
  }
}

.sortable-chosen .media-right {
  visibility: hidden;
}
.sortable-ghost h1,
.sortable-ghost h2 {
  color: $danger;
}

.media:first-of-type {
  padding-top: 1rem;
}

/* Transition effect */
.fade-leave-active {
  transition: opacity 0.2s ease;
}
.fade-enter-active {
  transition: opacity 0.5s ease;
}
.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}
.fade-enter-to,
.fade-leave-from {
  opacity: 1;
}

/* Add a little bit of spacing between title and subtitle */
.title:not(.is-spaced) + .subtitle + .subtitle {
  margin-top: -1.3rem !important;
}

/* Only scroll content if modal contains a card component */
.fd-modal-card {
  overflow: visible;
}
.fd-modal-card .card-content {
  max-height: calc(100vh - 200px);
  overflow: auto;
}

.fd-width-auto {
  min-width: auto;
}

/* Show scrollbar for navbar menu in desktop mode if content exceeds the screen size */
@include desktop {
  .navbar-dropdown {
    max-height: calc(100vh - calc(2 * $navbar-height) - 2rem);
    overflow: auto;
  }
}

/* Limit the size of the bottom navbar menu to not be displayed behind the Safari browser menu on iOS */
.fd-bottom-navbar .navbar-menu {
  max-height: calc(100vh - calc(2 * $navbar-height) - 1rem);
  overflow: scroll;
}

.buttons {
  @include mobile {
    &.fd-is-centered-mobile {
      justify-content: center;
      &:not(.has-addons) {
        .button:not(.is-fullwidth) {
          margin-left: 0.25rem;
          margin-right: 0.25rem;
        }
      }
    }
  }
}

.column {
  &.fd-has-cover {
    @include mobile {
      margin: auto;
    }
    @include from($tablet) {
      margin-right: 0;
    }
  }
}

.fd-overlay-fullscreen {
  @extend .is-overlay;
  z-index: 25;
  background-color: rgba(10, 10, 10, 0.2);
  position: fixed;
}

.hero-body {
  padding: 1.5rem !important;
}

/* Slider */
@mixin thumb {
  -webkit-appearance: none;
  width: var(--th);
  height: var(--th);
  box-sizing: border-box;
  border-radius: 50%;
  background: $light;
  border: 1px solid $grey-light;
}

@mixin track {
  height: calc(var(--sh));
  border-radius: calc(var(--sh) / 2);
  background: linear-gradient(90deg, $dark var(--sx), $grey-light var(--sx));
}

input[type='range'].slider {
  --sh: 0.25rem;
  --th: calc(var(--sh) * 4);
  @include mobile {
    --th: calc(var(--sh) * 5);
  }
  --sx: calc(var(--th) / 2 + (var(--ratio) * (100% - var(--th))));
  -webkit-appearance: none;
  min-width: 250px;
  height: calc(var(--sh) * 5);
  width: 100% !important;
  cursor: grab;
  &:active {
    cursor: grabbing;
  }
  &::-webkit-slider-thumb {
    @include thumb;
    margin-top: calc((var(--th) - var(--sh)) / -2);
  }
  &::-moz-range-thumb {
    @include thumb;
  }
  &::-webkit-slider-runnable-track {
    @include track;
  }
  &::-moz-range-track {
    @include track;
  }
  &.is-inactive {
    cursor: var(--cursor, not-allowed);
    &::-webkit-slider-thumb {
      box-sizing: border-box;
      background-color: $light;
    }
    &::-webkit-slider-runnable-track {
      background: linear-gradient(
        90deg,
        $grey-light var(--sx),
        $light var(--sx)
      );
    }
    &::-moz-range-thumb {
      box-sizing: border-box;
      background-color: $light;
    }
    &::-moz-range-track {
      background: linear-gradient(
        90deg,
        $grey-light var(--sx),
        $light var(--sx)
      );
    }
  }
}
