aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/app/header/search-typeahead.component.scss
blob: 6d7511c70070f9847cf9bb904cbb8be9b97b5cbf (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
                  


                                              







                      
                
                        
                             







                                               
                



                         
                      





















                                                            
                                               


                      
                                              






                     












                                                          
                                                   

                                    
      
                      
                              
                                   








                                                          
                                        





                     




                         





                      







                                  

                         
 
@import '_mixins';
@import '_variables';
@import '_bootstrap-variables';
@import '~bootstrap/scss/mixins/_breakpoints';

.jump-to-suggestions {
  top: 100%;
  left: 0;
  z-index: 35;
  width: 100%;
}

#typeahead-help,
#typeahead-instructions,
my-suggestions ::ng-deep ul {
  border: 1px solid var(--mainBackgroundColor);
  border-bottom-right-radius: 3px;
  border-bottom-left-radius: 3px;
  background: var(--mainBackgroundColor);
  transition: .3s ease;
  transition-property: box-shadow;
}

#typeahead-help,
#typeahead-instructions {
  margin-top: 10px;
  width: 100%;
  padding: .5rem 1rem;
  white-space: normal;

  ul {
    list-style: none;
    padding: 0;
    margin-bottom: .5rem;

    em {
      font-weight: 600;
      margin-right: 0.2rem;
      font-style: normal;
    }
  }
}

#typeahead-container {
  ::ng-deep input {
    border: 1px solid var(--mainBackgroundColor) !important;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 20px 0px;
    flex-grow: 1;
    transition: box-shadow .3s ease, width .2s ease;
  }

  @media screen and (min-width: $mobile-view) {
    margin-left: 10px;
  }

  @media screen and (max-width: $small-view) {
    flex: 1;

    ::ng-deep input {
      width: unset;
    }
  }

  ::ng-deep span {
    right: 10px;
  }

  & > div:last-child {
    // we have to switch the display and not the opacity, 
    // to avoid clashing with the rest of the interface.
    display: none;
  }

  &:focus,
  ::ng-deep &:focus-within {
    & > div:last-child {
      @media screen and (min-width: $mobile-view) {
        display: initial !important;
      }
      
      #typeahead-help,
      #typeahead-instructions,
      my-suggestions ::ng-deep ul {
        box-shadow: rgba(0, 0, 0, 0.2) 0px 10px 20px -5px;
      }
    }

    ::ng-deep input {
      box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 20px 0px;
      border-end-start-radius: 0;
      border-end-end-radius: 0;

      @include media-breakpoint-up(lg) {
        width: 500px;
      }
    }
  }
}

.glyphicon {
  top: 3px;
}

.advanced-search-status {
  height: max-content;
  cursor: default;

  &.c-help {
    cursor: help;
  }
}

.small-title {
  @include in-content-small-title;

  margin-bottom: .5rem;
}

::ng-deep my-suggestion {
  width: 100%;
}