@use "../base/variables" as *;
@use "../base/mixins" as *;
@use "../base/typography" as *;

// notification Section
.notification-system {
  flex-shrink: 0;
  flex-shrink: 0;
  overflow: hidden;
  position: fixed;
  right: 0;
  top: 0;
  width: 36rem;
  height: 100dvh;

  z-index: 91;

  [data-theme="dark"] & {
    background-color: #221A25;
  }

  [data-theme="light"] & {
    background-color: #EEF2F6;
  }

  @include media("lg") {
    overflow: visible;
    width: 100% !important;
    max-width: 36rem;
    background-color: transparent;
  }

  @include media("sm") { 
    max-width: 100%;
  }

  &__inner {
    display: flex;
    flex-direction: column;
    width: 36rem;
    height: 100%;
    position: relative;
    z-index: 1;

    @include media("sm") { 
      width: 100%;
    }
  }

  &__header {
    @include flexCenter(space-between);

    flex-shrink: 0;
    padding: 1.2rem;
    width: 100%;
    height: 5.2rem;
    border-bottom: 1px solid theme-color($border-low);
  }

  &__title {
    @include typography("h4");

    font-weight: 700;
    color: theme-color($text-high);
  }

  &__body {
    @include transition(flex);

    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.2rem;
    width: 100%;

    &::-webkit-scrollbar {
      display: none;
    }
  }

  &__list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-height: 100%;

    @include media("lg") {
      gap: 1.6rem;
    }
  }

  &__item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;

    &--new {
      .notification-system__item-thumb {
        &::before {
          content: "";
        }
      }
    }

    &-thumb {
      flex-shrink: 0;
      display: flex;
      align-items: flex-end;
      justify-content: flex-end;
      position: relative;

      width: 3.8rem;
      height: 3.8rem;

      @include media("lg") {
        width: 3.3rem;
        height: 3.3rem;
      }

      &::before {
        position: absolute;
        top: 0;
        left: 0;
        width: 0.6rem;
        height: 0.6rem;
        background: theme-color($primary);
        border-radius: 50%;

        @include media("lg") {
          width: 0.4rem;
          height: 0.4rem;
        }
      }

      img {
        width: 3.6rem;
        height: 3.6rem;
        border-radius: 50%;
        object-fit: cover;

        @include media("lg") {
          width: 3.2rem;
          height: 3.2rem;
        }
      }
    }

    &-content {
      flex: 1;
      display: flex;
      flex-direction: column;
    }

    &-title {
      color: theme-color($text-high);

      strong {
        font-weight: 700;
      }
    }

    &-time {
      @include typography("p2");
    }

    &-link {
      margin-top: 0.8rem;
    }
  }

  &__footer {
    @include flexCenter(space-between);

    flex-shrink: 0;
    gap: 0.8rem;
    padding: 2rem 1.2rem;
    width: 100%;

    @include media("lg") {
      padding: 1.6rem 1.2rem;
    }
  }

  &-read--all {
    @include flexCenter(center);
    @include typography("p2");

    gap: 0.4rem;
    color: theme-color($primary);
    font-weight: 700;
    background: transparent;
    border: none;
  }
}
