*,
*::before,
*::after {
  box-sizing: border-box;
}

.show-dropdown-anim {
  animation: showDropdown 250ms ease forwards;
}

.hide-dropdown-anim {
  animation: hideDropdown 250ms ease forwards;
}

.notification {
  color: #fff;
  font-family: inherit;
  line-height: 1.2;
}

.notification-button {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 5px;
  background-color: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
  position: relative;
  transition: 250ms ease;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.notification-button--active {
  background-color: transparent;
}

.notification-button:hover {
  opacity: 0.9;
}

.notification-button__icon {
  width: 17px;
  height: 17px;
  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
}

.notification-button__badge {
  display: none;
  font-weight: 900;
  font-size: 8px;
  line-height: 13px;
  padding: 0 4px;
  border-radius: 7px;
  position: absolute;
  top: -2px;
  left: 15px;
  background: radial-gradient(
    92% 229% at 48% -9%,
    #ff6e6d 0%,
    #ff6766 28%,
    #ff4c4a 91%
  );
  box-shadow: 0px 13px 22px rgba(0, 0, 0, 0.09);
  color: #fff;
  min-width: 13px;
  text-align: center;
  z-index: 10;
}

.notification--has-unread .notification-button__badge {
  display: block;
}

.notification__dropdown-wrapper {
  --header-padding-x: 20px;

  position: absolute;
  width: calc(100vw - (var(--header-padding-x) * 2));
  min-width: 225px;
  top: calc(100% + 5px);
  right: 0;
}

.notification-dropdown {
  position: absolute;
  top: 0;
  right: 0;
  background: #36203b;
  background: #372d82;
  box-shadow: inset 0px -5px 10px rgba(0, 0, 0, 0.25);
  padding: 10px;
  padding-right: 3px;
  border-radius: 6px;
  width: 100%;
  z-index: 100;
  display: none;
}

.notification-dropdown--active {
  display: block;
}

.notification-dropdown::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 83px;
  width: 16px;
  height: 16px;
  border-top-left-radius: 4px;
  transform: rotate(45deg);
  background-color: #372d82;
}

.notification-list {
  --container-padding-y: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  height: 100%;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: 4px;
  scrollbar-color: #4b41a9;
  scrollbar-gutter: stable;
  max-height: calc(220px - (var(--container-padding-y) * 2));
}

.notification-list::-webkit-scrollbar {
  width: 4px;
  padding-right: 3px;
}

.notification-list::-webkit-scrollbar-thumb {
  background-color: #4b41a9;
  border-radius: 2px;
}

.notification-item {
  display: block;
  transition: background-color 250ms;
  border-radius: 3px;
  position: relative;
  padding-right: 32px;
}

.notification-item:not(.notification-item--friendship):hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.notification-item--friendship {
  padding-right: 0;
}

.notification-item:not(:last-child) {
  margin-bottom: 5px;
}

.notification-item:not(:last-child)::after {
  content: "";
  width: 100%;
  height: 1px;
  border-radius: 1px;
  background-color: #4b41a9;
  position: absolute;
  bottom: -3px;
  left: 0;
}

.notification-item__link {
  display: block;
  padding: 13px 9px;
}

.notification-item__message {
  font-size: 12px;
  margin: 0;
  color: #fff;
}

.notification-item__link {
  color: inherit;
  text-decoration: none;
}

.notification-item__remove {
  padding: 0;
  background: transparent;
  border: none;
  width: 16px;
  height: 16px;
  position: absolute;
  right: 9px;
  top: 11px;
  cursor: pointer;
  transition: opacity 200ms;
  display: none;
}

.notification-item__remove:hover {
  opacity: 0.75;
}

.notification-item__remove img {
  display: block;
  width: 100%;
  height: auto;
}

.notification-item:not(.notification-item--new):hover
  .notification-item__remove {
  display: block;
}

.notification-item--new::before {
  content: "";
  position: absolute;
  right: 5px;
  top: 16px;
  width: 8px;
  height: 8px;
  background: radial-gradient(
    92% 229% at 48% -9%,
    #ff6e6d 0%,
    #ff6766 28%,
    #ff4c4a 91%
  );
  box-shadow: 0px 13px 22px rgba(0, 0, 0, 0.09);
  border-radius: 50%;
}

.notification__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 13px 9px;
  font-size: 12px;
}

.friendship-request {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(2, auto);
  gap: 13px;
  padding: 13px 9px;
}

.friendship-request__user {
  display: flex;
  align-items: center;
}

.friendship-request__avatar {
  display: block;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 10px;
}

.friendship-request__name {
  margin: 0;
  font-size: 12px;
}

.friendship-request__link {
  text-decoration: underline;
  color: #ff6766;
  transition: opacity 200ms;
}

.friendship-request__link:hover {
  opacity: 0.75;
}

.friendship-request__actions {
  display: flex;
  align-items: center;
}

.friendship-request__button {
  display: block;
  position: relative;
  background: transparent;
  border: none;
  font: inherit;
  padding: 0;
  font-size: 12px;
  color: #fff;
  cursor: pointer;
  padding: 9px;
  border-radius: 7px;
  font-weight: 900;
  letter-spacing: 1px;
  min-width: 88px;
  transition: opacity 200ms;
  line-height: 1;
  margin: 0;
  border-image-width: 0;
}

.friendship-request__button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  border-radius: inherit;
  border: 1px solid transparent;
  border-bottom: none;
  background: linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0))
    border-box;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
}

.friendship-request__button:not(:last-child) {
  margin-right: 10px;
}

.friendship-request__button--reject {
  background: radial-gradient(
    92% 230% at 48% -9%,
    #ff6e6d 0%,
    #ff6766 28%,
    #ff4c4a 92%
  );
}

.friendship-request__button--accept {
  background: radial-gradient(
    133% 155% at 32% -12%,
    #9186ff 0%,
    #6d61ff 34%,
    #574aff 91%
  );
}

.friendship-request__button:hover {
  opacity: 0.75;
}

@keyframes showDropdown {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes hideDropdown {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  to {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
}

@media (min-width: 768px) {
  .notification {
    position: relative;
  }

  .notification__dropdown-wrapper {
    --dropdown-width: 225px;
    --button-width: 28px;

    width: var(--dropdown-width);
    left: calc(
      ((var(--dropdown-width) / 2) - calc(var(--button-width) / 2)) * -1
    );
  }

  .notification-dropdown {
    top: calc(100% + 8px);
  }

  .notification-dropdown::before {
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
  }

  .notification-button--active {
    background-color: rgba(61, 39, 66, 0.8);
  }
}
