@mixin label-style($customColor) {
  .expanded-view .notification-banner-label {
    background-color: $customColor;
  }

  .collapsed-view .notification-banner-label .bell-icon svg {
    fill: $customColor;
  }
}

.notification-banner-red {
  @include label-style($color-red);
}

.notification-banner-blue {
  @include label-style($color-navy);
}

.notification-banner {
  background: $notification-banner-background;
  border-bottom: 1px solid $color-gray-light;
  border-bottom-color: $color-gray-very-light;
  color: $color-gray-darker;
  display: flex;
  flex-direction: column;
  font-size: 0.875rem;

  &-label {
    background-color: transparent;
    border: none;
    cursor: pointer;
  }

  &.expanded {
    .expanded-view.notification-banner-wrapper {
      opacity: 100;
      position: relative;
    }

    .collapsed-view.notification-banner-wrapper {
      opacity: 0;
      position: absolute;
    }
  }

  &.collapsed {
    flex-direction: column-reverse;

    .expanded-view.notification-banner-wrapper {
      opacity: 0;
      position: absolute;
    }

    .collapsed-view.notification-banner-wrapper {
      opacity: 100;
      position: relative;
    }
  }

  .notification-banner-wrapper {
    display: flex;
    flex-direction: row;
    flex-shrink: 0;

    .notification-banner-label {
      align-items: center;
      display: flex;
      line-height: 1;
      text-transform: uppercase;
      flex: 0 0 auto;
    }

    &.expanded-view {
      justify-content: flex-start;

      .notification-banner-label {
        color: $color-white;
        font-size: 1rem;
        padding: 0 30px;
      }

      .notification-banner-content {
        padding: 20px 80px 20px 20px;

        b {
          color: $color-navy;
        }

        p {
          display: inline;
          margin: 0;
          font-size: 0.875rem;
        }

        a {
          color: $color-navy-medium;
        }
      }

      .notification-banner-close {
        align-self: flex-start;
        background: transparent;
        border: 0 none;
        margin-left: auto;
        padding: 15px 15px;

        .close-icon {
          fill: $color-navy-medium;
          height: 1rem;
          width: 1rem;
        }
      }
    }

    &.collapsed-view {
      cursor: pointer;
      justify-content: flex-end;
      padding: 10px 30px;

      .notification-banner-label {
        color: $notification-banner-label-color;
        font-size: 0.75rem;

        .bell-icon {
          padding-left: 15px;

          svg {
            height: 18px;
            width: 18px;
          }
        }
      }
    }
  }
}

@include breakpoint(xs) {
  .notification-banner {
    .notification-banner-wrapper {
      flex-direction: column;

      &.collapsed-view {
        align-items: center;
      }

      &.expanded-view {
        .notification-banner-label {
          align-self: flex-start;
          font-size: 0.875rem;
          margin: 20px 0 0 20px;
          padding: 10px;
        }

        .notification-banner-content {
          padding: 20px 50px 20px 20px;
        }

        .notification-banner-close {
          padding: 20px;
          position: absolute;
          right: 0;
        }
      }
    }
  }
}
