
/* Notification inside the notification center */

.drawer .notifications {
  margin-left: (-$spacing);
  margin-right: (-$spacing);
}

.drawer .notification {
  position: relative;
  margin-bottom: 1px;
}

.drawer .notification input {
  display: none;
}

.drawer .notification-content {
  cursor: pointer;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto;
  padding: $spacing-xxs $spacing;
  font-size: $font-size-label;
}

.drawer .notification-content,
.drawer .notification input[type=checkbox]:checked + .notification-content {
  &:hover::before, &:focus::before, &:active::before {
    background-color: $gray-darkest;
    opacity: 1;
  }
}

.drawer .notification-content::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: $gray-darkest;
  z-index: -1;
  opacity: 0.75;
}

.drawer .notification input[type=checkbox]:checked + .notification-content::before {
  opacity: 0;
}

.drawer .notification input[type=checkbox] + .notification-content::after {
  content: "";
  position: absolute;
  top: $spacing-xs;
  right: $spacing-xs;
  height: $icon-xs;
  width: $icon-xs;
  background-color: $white;
  opacity: 0.5;
  mask-image: url("@images/circle-empty-white.svg");
  mask-repeat: no-repeat;
}

.drawer .notification input[type=checkbox]:checked + .notification-content::after {
  opacity: 1;
  background-color: $success;
  mask-image: url("@images/check-circle-filled.svg");
}

.drawer .notification-badge {
  display: flex;
  flex-direction: column;
  grid-row-start: 1;
  grid-row-end: 4;
  width: $spacing-lg;
  margin-right: $spacing-sm;
}

.drawer .notification-badge img {
  border-radius: $border-radius;
  width: $icon-lg;
  height: $icon-lg;
}

.drawer .notification.badges .notification-badge {
  width: auto;
}

.drawer .notification.badges img {
  width: $spacing-xxl;
  height: $spacing-xxl;
}

.drawer .notification-badge .profile-thumb {
  width: 40px;
  height: 40px;
  margin-top: (-$spacing-md);
  transform: translateY($spacing-md);
  border-radius: 50%;
  z-index: 1;
  border: $border-width solid $gray-darkest;
}

.drawer .notification-badge .icon {
  font-size: $icon-lg;
  height: $icon-lg;
}

.drawer .notification-label,
.drawer .notification-metainfo {
  color: $gray;
}

.drawer a.notification-text {
  color: $white;
  &:hover, &:focus, &:active {
    color: $link-hover-color;
  }
}

.drawer .notification.success .icon {
  color: $success;
}

.drawer .notification.danger .icon {
  color: $danger;
}

/* Notification message */

.notification-container {
  position: fixed;
  width: $spacing-5xl;
  top: $navbar-header-height;
  right: 0;
  z-index: 10;
  overflow-y: scroll;
  max-height: 100vh;
  padding-top: $spacing-xs;
  padding-bottom: $spacing-xl;
}

.notification-container::-webkit-scrollbar {
  display: none;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.notification-container .notification {
  position: relative;
  display: grid;
  grid-template-areas:  "badge title"
                        "badge content";
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  background-color: $info;
  border-radius: $border-radius 0 0 $border-radius;
  margin-bottom: $spacing-xxs;
  padding: $spacing-sm $btn-height $spacing-sm $spacing-sm;
  font-size: $font-size-label;
  line-height: 1.3;
  color: $white;
  box-shadow: -5px 5px 8px rgba(0,0,0,.1);
}

.notification-container a.notification:hover {
  color: $white;
  background-color: $link-hover-color;
}

.notification-container .notification-badge {
  grid-area: badge;
  margin-right: $spacing-xs;
  margin-bottom: $spacing-xs;
}

.notification-container .notification-badge .icon {
  height: $icon-lg;
  font-size: $icon-lg;
}

.notification-container .notification-badge img {
  width: $btn-height;
  height: $btn-height;
}

.notification-container .notification.badges img {
  width: $spacing-xl;
  height: $spacing-xl;
  margin-bottom: 0;
}

.notification-container .notification .btn {
  margin-top: $spacing-xs;
}

.notification-container .notification .btn-close {
  position: absolute;
  top: 0;
  right: 0;
  color: $white;
  width: $btn-height;
  margin-top: 0;
  padding: $spacing-xxs;
  align-items: center;
  justify-content: center;
  border-radius: 0 0 0 $border-radius;
}

.notification-container .notification-content {
  grid-area: content;
}

.notification-container .notification .notification-title {
  grid-area: title;
  font-weight: $font-weight-bold;
  line-height: 1.2;
  margin-bottom: $spacing-xxs;
}

.notification-container .notification .notification-message {
  font-size: $font-size-label;
}

.notification-container .notification.success {
  color: $black;
  background-color: $success;
  & .btn-close {
    color: $black;
  }
}

.notification-container .notification.warning {
  background-color: $danger;
}

.notification-container .notification.error {
  background-color: $danger;
}

.notification-container .notification.badges {
  background-color: $petrol-dark;
}
