@import '../../styles/core.scss';

.Tutorial {
  align-items: center;
  display: flex;
  flex-direction: column;

  &-Wrapper {
    flex: 1 1 auto;
    width: 100%;
  }
}

.TutorialGrid {
  display: grid;
  column-gap: 15px;
  row-gap: 15px;
  grid-template-columns: 1fr 1fr 1fr;
  margin-left: auto;
  margin-right: auto;
  max-width: 1100px;
  padding-bottom: 40px;
  padding-top: 20px;

  @media (max-width: 1180px) {
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    max-width: 775px;
    padding-left: 40px;
    padding-right: 40px;
    row-gap: 20px;
  }

  @media (max-width: 775px) {
    grid-template-columns: 1fr;
    max-width: 390px;
    padding-left: 20px;
    padding-right: 20px;
  }
}

.TutorialToolbar {
  align-items: center;
  background: get('color' slate);
  border-radius: 9px;
  bottom: 20px;
  box-shadow: inset 0 1px 0 rgba(#fff, 0.1), 0 5px 30px rgba(#000, 0.05);
  color: #fff;
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  margin-bottom: 40px;
  padding: 10px;
  position: sticky;
  z-index: 10002; // overlap the inactive banner

  &-Button {
    align-items: center;
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    justify-content: center;
    padding: 5px;
    position: relative;
    white-space: nowrap;

    + .TutorialToolbar-Button {
      margin-left: 10px;
    }

    &:hover,
    &:focus {
      background: rgba(#fff, 0.1);
    }

    &:active {
      background: rgba(#fff, 0.15);
    }

    &:focus {
      outline: none;
    }

    &:hover,
    &:focus,
    &:active {
      .TutorialToolbar-PopoverWrapper {
        pointer-events: auto;
      }

      .TutorialToolbar-Popover {
        opacity: 1;
        transform: translateY(0);
      }
    }

    &-Icon {
      font-size: 25px;
      margin-bottom: 10px;
      opacity: 0.75;
    }

    &-Arrow {
      font-size: 10px;
      margin-left: 5px;
    }
  }

  &-PopoverWrapper {
    bottom: 100%;
    left: -10px;
    padding-bottom: 20px;
    pointer-events: none;
    position: absolute;
  }

  &-Popover {
    background: get('color' slate);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(#000, 0.05), 0 5px 30px rgba(#000, 0.05);
    color: #fff;
    cursor: default;
    font-weight: 400;
    opacity: 0;
    padding: 20px;
    text-align: left;
    transform: translateY(10px);
    transition: opacity 0.15s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: normal;
    width: 190px;

    &-Description {
      border-top: 1px solid rgba(#fff, 0.1);
      font-size: 13px;
      line-height: 1.2;
      margin-top: 10px;
      padding-top: 10px;
    }

    :global(.Toggle-display) {
      margin-left: 10px;
      order: 2;
    }

    :global(.Toggle-label) {
      font-size: 14px;
      margin-left: 0;
    }
  }
}

.TutorialConfirmation {
  text-align: center;

  &-Title {
    margin-bottom: 10px;
    margin-top: 10px;
  }

  &-Description {
    line-height: 1.6;
    margin-bottom: 0;
    margin-top: 0;
  }
}
