_search-widget.scss 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. @import "variables";
  2. .autocomplete-wrapper {
  3. position: relative;
  4. width: 200px;
  5. @media all and (max-width: $sm-breakpoint){
  6. width: 100%;
  7. padding: 0 6px;
  8. position: absolute;
  9. left: 0;
  10. top: 54px;
  11. transform: translateY(-200px);
  12. opacity: 0.5;
  13. transition: opacity 0.3s, transform 0s;
  14. .autocomplete {
  15. display: none;
  16. }
  17. &.focus {
  18. transform: translateY(0);
  19. opacity: 1;
  20. .autocomplete {
  21. display: block;
  22. }
  23. }
  24. }
  25. }
  26. .autocomplete {
  27. position: absolute;
  28. background-color: white;
  29. box-shadow: 0px 3px 5px -1px rgba(0,0,0,0.52);
  30. border-radius: 4px;
  31. top: 35px;
  32. right: 0;
  33. max-height: 80vh;
  34. width: 600px;
  35. overflow: hidden;
  36. @media all and (max-width: $sm-breakpoint){
  37. width: 100%;
  38. }
  39. ul {
  40. padding: 0;
  41. margin: 0;
  42. list-style-type: none;
  43. }
  44. li {
  45. padding: 12px;
  46. background-color: transparent;
  47. transition: background-color 0.2s;
  48. &:hover {
  49. background-color: $gray-200;
  50. }
  51. &.section {
  52. background-color: $gray-100;
  53. color: $brand-color;
  54. font-size: 12px;
  55. }
  56. &.selected {
  57. background-color: $gray-200;
  58. }
  59. a {
  60. display: flex;
  61. align-items: center;
  62. }
  63. .title {
  64. color: $gray-800;
  65. width: 200px;
  66. font-size: 12px;
  67. margin-right: 6px;
  68. }
  69. .parent {
  70. color: $gray-600;
  71. }
  72. .heading {
  73. color: $gray-900;
  74. .hl {
  75. background-color: transparentize($brand-color, 0.85);
  76. color: darken($brand-color, 40%);
  77. }
  78. }
  79. }
  80. }