messenger.scss 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. @import "variables";
  2. .messenger {
  3. right: 10px;
  4. width: 350px;
  5. position: fixed;
  6. z-index: 2500;
  7. bottom: 10px;
  8. pointer-events: none;
  9. text-align: center;
  10. > div {
  11. position: relative;
  12. transform: translateX(0);
  13. margin-top: 2px;
  14. min-height: 50px;
  15. border-radius: 6px;
  16. background-color: $color-secondary-b-4;
  17. color: $color-secondary-b-2;
  18. pointer-events: auto;
  19. display: flex;
  20. justify-content: center;
  21. align-items: center;
  22. font-size: 1.1rem;
  23. box-shadow: 4px 4px 4px $color-secondary-b-1;
  24. transition: transform 500ms cubic-bezier(1,0,.35,1.45);
  25. &.removing {
  26. opacity: 0;
  27. transition: opacity;
  28. transition-timing-function: ease-out;
  29. &.short {
  30. transition-duration: 0.1s;
  31. }
  32. &.long {
  33. transition-duration: 2s;
  34. }
  35. }
  36. > .close {
  37. position: absolute;
  38. top: 2px;
  39. right: 2px;
  40. width: 12px;
  41. height: 12px;
  42. &:hover {
  43. cursor: pointer;
  44. &::before,
  45. &::after {
  46. background-color: red;
  47. }
  48. }
  49. &::before {
  50. content: "";
  51. position: absolute;
  52. width: 3px;
  53. height: 100%;
  54. background-color: $color-secondary-b-2;
  55. left: 50%;
  56. top: 0;
  57. transform: translateX(-50%) rotate(-45deg);
  58. }
  59. &::after {
  60. content: "";
  61. position: absolute;
  62. width: 3px;
  63. height: 100%;
  64. background-color: $color-secondary-b-2;
  65. left: 50%;
  66. top: 0;
  67. transform: translateX(-50%) rotate(45deg);
  68. }
  69. }
  70. &.in {
  71. transform: translateX(calc(100% + 10px));
  72. }
  73. }
  74. }
  75. @media (max-width: 586px) {
  76. .messenger {
  77. right: 0;
  78. bottom: 0;
  79. width: 100%;
  80. > div {
  81. margin: 5px 10px;
  82. }
  83. }
  84. }
  85. @media (min-width: 587px) and (max-width: 1151px) {
  86. .messenger {
  87. right: 0;
  88. bottom: 0;
  89. width: 450px;
  90. > div {
  91. margin: 5px 10px;
  92. }
  93. }
  94. }