/*
IBM Confidential
694970X, 69497O0
© Copyright IBM Corp. 2022, 2024
*/


@use "@carbon/react/scss/motion";
@use '@carbon/themes/scss/tokens' as theme;
@use "../../global/config" as *;
@use '../../global/themes/shell-tokens' as shell;
@use '../../global/utils';

.#{$prefix}--bmrg-notifications {
  animation: fade-in motion.$duration-moderate-01 motion.motion("standard");
  background-color: shell.$bmrg-theme-menu-background;
  border-top: shell.$bmrg-theme-menu-border;
  cursor: auto;
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  width: 16.875rem;
  z-index: 6000;

  &.--is-active {
    display: initial;
  }
}

.#{$prefix}--bmrg-notifications-header {
  align-items: center;
  display: flex;
  border-bottom: utils.rem(1px) solid #b8c1c1;
  height: 2.4375rem;
  justify-content: space-between;
  position: relative;
}

.#{$prefix}--bmrg-notifications-header__newNotifications {
  color: shell.$bmrg-theme-primary;
  font-size: 0.875rem;
  height: 1.25rem;
  line-height: 1.125rem;
  padding-left: utils.rem(10px);
}

.#{$prefix}--bmrg-notifications-header__clear {
  background-color: inherit;
  border: none;
  color: shell.$bmrg-theme-secondary;
  cursor: pointer;
  font-size: 0.75rem;
  height: 1rem;
  margin-right: 0.5rem;
  padding: 0;
  text-align: center;
  width: 5rem;

  &[disabled] {
    cursor: initial;
    opacity: 0.5;
  }
  &:focus {
    @include utils.focus-outline(shell.$bmrg-secondary);
  }
}

.#{$prefix}--bmrg-notification {
  animation: fade-in motion.$duration-moderate-01 motion.motion("standard");
  border-bottom: utils.rem(1px) solid #b8c1c1;
  min-height: 7.6875rem;
  padding: 0rem;
  position: relative;
  width: 100%;
  //TODO: determine the different notification statuses and their colors
  &.--notification {
    border-left: 0.3125rem solid shell.$bmrg-header-notification-default;
  }
  &.--exception {
    border-left: 0.3125rem solid #fb4b53;
  }
  &.--maintenance {
    border-left: 0.3125rem solid theme.$support-info;
  }
}

//TODO: see below we will set the color based on the status from the response
// .#{$prefix}--bmrg-notification__status {
//   width: 0.3125rem;
//   height: 7.6875rem;
//   background-color: red;
// }

.#{$prefix}--bmrg-notification-content {
  min-height: 6.5625rem;
  padding-left: 1.25rem;
  padding-right: 1rem;
  padding-bottom: 1rem;
  width: 100%;
}

.#{$prefix}--bmrg-notification-content__creator {
  color: shell.$bmrg-theme-primary;
  font-size: 0.75rem;
  font-weight: 500;
  height: 2.375rem;
  line-height: 0.9375rem;
  opacity: 0.8;
  overflow: hidden;
  padding-bottom: 0.6875rem;
  padding-top: 0.75rem;
  text-overflow: ellipsis;
  text-transform: capitalize;
  white-space: nowrap;
}

.#{$prefix}--bmrg-notification-content__title {
  color: shell.$bmrg-theme-primary;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.125rem;
  margin-bottom: 0.5rem;
}

.#{$prefix}--bmrg-notification-content__desc {
  color: shell.$bmrg-theme-primary;
  display: block;
  font-size: 0.75rem;
  min-height: 2rem;
  line-height: 0.9375rem;
  position: relative;
}

.#{$prefix}--bmrg-notification-content__date {
  color: shell.$bmrg-theme-primary;
  display: block;
  font-size: 0.75rem;
  height: 0.9375rem;
  line-height: 0.9375rem;
  margin-top: utils.rem(10px);
  opacity: 0.8;
}
.#{$prefix}--bmrg-notification-content__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: absolute;
  right: 0.9375rem;
  top: 0.8125rem;
  path {
    fill: theme.$text-on-color;
  }
  &:focus {
    @include utils.focus-outline(shell.$bmrg-secondary);
  }
}

.#{$prefix}--bmrg-notifications-footer {
  height: 2.75rem;
}

.#{$prefix}--bmrg-notifications-footer__notification-link {
  position: relative;
  top: 25%;
  color: shell.$bmrg-theme-primary;
  cursor: pointer;
}

.#{$prefix}--bmrg-notifications__collection {
  max-height: utils.rem(575px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0rem;
  width: 100%;
}

.#{$prefix}--bmrg-notifications-empty {
  border-bottom-width: 0;
  border-left-width: 0;
  border-right-width: 0;
  height: utils.rem(62px);
  padding: utils.rem(20px);
  text-align: center;
  width: utils.rem(270px);
}

.#{$prefix}--bmrg-notifications-empty__no-news {
  color: shell.$bmrg-theme-secondary;
  font-size: utils.rem(14px);
  font-weight: 400;
  line-height: utils.rem(18px);
  margin: 0rem;
  margin-bottom: 1rem;
  text-align: center;
}

.#{$prefix}--bmrg-notifications-empty__view-old {
  color: shell.$bmrg-theme-primary;
  font-size: utils.rem(12px);
  font-weight: 300;
  line-height: utils.rem(15px);
}

.#{$prefix}--bmrg-notifications__notifications-footer {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
  box-sizing: content-box;
  align-items: center;
}

.#{$prefix}--bmrg-notifications__notifications-redirect-link {
  color: shell.$bmrg-theme-primary;
  font-size: 0.875rem;
  outline: utils.rem(2px) solid transparent;
  outline-offset: utils.rem(-2px);
  text-align: center;
  text-decoration: none;
  padding: 0.625rem;
  width: 100%;
  &:hover {
    color: shell.$bmrg-theme-primary;
    background: shell.$bmrg-theme-active;
  }
  &:focus {
    outline: utils.rem(2px) solid shell.$bmrg-header-active-text;
  }
}
