.notification-directive {
  position: fixed;
  z-index: 10000;
  background-color: rgba(var(--background-content));
  color: rgba(var(--font-color));
  border-radius: var(--default-radius-large);
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  outline: none;
  transition: opacity 420ms ease, filter 420ms ease;
  cursor: pointer;
  max-width: 304px;
  margin: 8px;
  min-width: 304px;
  min-height: 64px;
  height: 64px;
  font-size: 10pt;
  box-shadow: 0 0 3px rgba(var(--shadow-color));
  overflow: hidden;
  transform: translateX(0);
}

.notification-directive.position-relative {
  position: relative;
}

.notification-directive.in-notification-center {
  position: relative;
}

.notification-directive.is-actions-visible {
  transform: translateX(56px);
}

.notification-directive.is-expanded {
  height: fit-content;
}

.notification-directive.is-read {
  filter: opacity(0.42);
}

.notification-directive.is-read:hover {
  filter: opacity(1);
}

.notification-directive .notification-content-wrapper {
  display: flex;
  align-items: flex-start;
  outline: none;
  flex-grow: 1;
  background-color: rgba(var(--background-content));
  position: relative;
  z-index: 1;
  padding: 8px;
  border-radius: var(--default-radius-large);
  box-sizing: border-box;
  transition: transform 50ms linear;
}

.notification-directive .notification-content-wrapper:nth-child(2) {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 0;
  background-color: rgba(var(--color-error));
  align-items: center;
  justify-content: flex-end;
}

.notification-directive .notification-content-wrapper:nth-child(2) md-icon {
  color: rgba(255, 255, 255, 1);
  margin: 8px;
  outline: none;
}

/* TEMPORARY DISABLED */

/* .notification-directive[is-draggable]:hover .notification-content-wrapper.is-no-mobile-device {
  transform: translateX(-56px) !important;
} */

@keyframes fadeout-from-left {
  from {
    opacity: 1;
    left: 0;
  }

  to {
    opacity: 0;
    left: -100%;
  }
}

@keyframes fadeout-from-right {
  from {
    opacity: 1;
    right: 0;
  }

  to {
    opacity: 0;
    right: -100%;
  }
}

@keyframes fadein-from-left {
  from {
    opacity: 0;
    left: -100%;
  }

  to {
    opacity: 1;
    left: 0;
  }
}

@keyframes fadein-from-right {
  from {
    opacity: 0;
    right: -100%;
  }

  to {
    opacity: 1;
    right: 0;
  }
}

.notification-directive.position-bottom-left.fade-out, .notification-directive.position-top-left.fade-out {
  animation: fadeout-from-left 420ms forwards;
}

.notification-directive.position-bottom-right.fade-out, .notification-directive.position-top-right.fade-out {
  animation: fadeout-from-right 420ms forwards;
}

.notification-directive.position-bottom-left {
  bottom: calc(90px + env(safe-area-inset-bottom, 0));
  left: -100%;
  animation: fadein-from-left 420ms forwards;
}

.notification-directive.position-bottom-right {
  bottom: calc(90px + env(safe-area-inset-bottom, 0));
  right: -100%;
  animation: fadein-from-right 420ms forwards;
}

.notification-directive.position-top-left {
  top: calc(90px + env(safe-area-inset-top, 0));
  left: -100%;
  animation: fadein-from-left 420ms forwards;
}

.notification-directive.position-top-right {
  top: calc(90px + env(safe-area-inset-top, 0));
  right: -100%;
  animation: fadein-from-right 420ms forwards;
}

.notification-directive .notification-icon {
  display: flex;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  flex-basis: 48px;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.01);
  border-radius: var(--default-radius-large);
  overflow: hidden;
}

.notification-directive .notification-icon img {
  width: 40px;
  height: 40px;
  border-radius: var(--default-radius-large);
  margin: 4px;
  box-sizing: border-box;
}

.notification-directive .notification-icon md-icon {
  color: rgba(var(--font-color));
  margin: 0;
  opacity: 0.84;
}

.notification-directive .notification-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  overflow: hidden;
}

.notification-directive .notification-content .notification-title, .notification-directive .notification-content .notification-text {
  display: flex;
  width: calc(100% - 8px);
  max-width: 175px;
  box-sizing: border-box;
  flex: 1;
  align-items: center;
  justify-content: flex-start;
  min-height: 24px;
  padding: 0;
  padding-left: 8px;
  text-align: left;
  overflow: hidden;
  line-height: 24px;
  max-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: break-all;
}

.notification-directive .notification-content.no-action .notification-title, .notification-directive .notification-content.no-action .notification-text {
  max-width: calc(100% - 64px);
}

.notification-directive .notification-content .notification-text {
  font-weight: lighter;
  white-space: normal;
  word-break: break-word;
  line-height: 12px;
  align-items: baseline;
}

.notification-directive.is-expanded .notification-content .notification-text {
  max-height: unset !important;
}

.notification-directive .notification-action {
  display: flex;
  align-items: center;
}

.notification-directive .notification-action button {
  min-width: 36px;
  max-width: 88px;
  display: flex;
  flex: 1;
  margin-right: 0;
  overflow: hidden;
  justify-content: center;
  align-items: center;
}

.notification-directive .notification-action button span {
  font-size: 8pt;
  max-width: 66px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

/* .notification-directive:not(.in-notification-center) {
  top: calc(72px + env(safe-area-inset-top, 0)) !important; 
  right: calc(8px + env(safe-area-inset-right, 0)) !important; 
} */

.notification-directive:not(.in-notification-center) .notification-action button.notification-action-delete {
  display: none;
}

.notification-directive .notification-action button.notification-action-delete {
  background-color: rgba(var(--color-error));
  color: rgba(255, 255, 255, 1);
  min-width: 36px;
  max-width: 36px;
  max-height: 36px;
  margin: 6px 8px;
  opacity: 0.42;
  transition: background-color 420ms ease, opacity 420ms ease;
}

.notification-directive .notification-action button.notification-action-delete:hover {
  background-color: rgba(var(--color-error));
  opacity: 1;
}

.notification-directive .notification-action button.notification-action-delete md-icon {
  color: rgba(var(--font-color-invert));
  margin: 0;
}

.notification-directive .notification-action .notification-date {
  display: none;
  flex: 1;
  font-size: 6pt;
}

@media (min-width: 360px) {
  .notification-directive.in-notification-center {
    max-width: calc(100vw - 16px);
  }

  .notification-directive .notification-content {
    overflow: unset;
  }
  .notification-directive .notification-content .notification-text {
    max-width: unset;
  }

  .notification-directive .notification-action button {
    min-width: 88px;
  }
}