/* ==========================================================================
     Notifications Component
     ========================================================================== */

.notifications-dropdown {
  .dropdown-menu {
    width: 320px;
    max-height: 490px;
    padding: 0;
    margin-top: 0.5rem;
    overflow-x: hidden;
    border: 1px solid var(--bs-border-color);
    @include border-radius($border-radius-lg);
    box-shadow: 0 0.5rem 1rem rgb(0, 0, 0, 0.1);
  }

  .notifications-header {
    .btn-text {
      color: var(--bs-body-color);
    }
  }

  .notifications-list {
    max-height: 360px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .notification-item {
    position: relative;
    width: 100%;
    border-left: 3px solid transparent;
    @include transition(background-color);

    &:hover {
      background-color: var(--bs-secondary-bg);
      border-left-color: var(--bs-primary);

      .notification-close {
        opacity: 1;
      }
    }

    .d-flex {
      width: 100%;
    }

    .flex-grow-1 {
      min-width: 0;

      h6,
      p {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
  }

  .notification-actions {
    display: flex;
    flex-shrink: 0;
    flex-direction: column;
    gap: 0.5rem;
    align-content: center;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0 !important;
  }

  .notification-close {
    width: 8px;
    height: 8px;
    color: var(--bs-secondary-color);
    opacity: 0;
    @include transition(opacity);

    &:hover {
      color: var(--bs-danger);
    }
  }

  .notification-indicator {
    width: 8px;
    height: 8px;
    margin-bottom: 0.25rem;
    background-color: var(--bs-primary);
    @include border-radius(50%);
  }

  .avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--bs-secondary-bg);
    @include border-radius(50%);

    &.avatar-sm {
      width: 32px;
      height: 32px;
    }

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      @include border-radius(50%);
    }

    i {
      font-size: 1.2rem;
    }
  }

  .notifications-footer {
    .btn {
      padding: 0.5rem 1rem;
      font-size: 0.875rem;
    }
  }
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
