@layer components {
  [data-controller="notifications-dropdown"] {
    .btn--icon-only {
      position: relative;
    }

    .notifications-bell__badge {
      position: absolute;
      top: 0.125rem;
      right: 0.125rem;
      min-width: 1.25rem;
      height: 1.25rem;
      padding: 0 0.3rem;
      font-size: 0.75rem;
      font-weight: var(--font-semibold);
      line-height: 1.25rem;
      text-align: center;
      color: var(--color-white);
      background: var(--color-error);
      border-radius: var(--radius-full);
    }

    .notifications-dropdown__list {
      max-height: 20rem;
      overflow-y: auto;

      .notifications-dropdown__item {
        display: flex;
        gap: var(--space-3);
        margin: var(--space-1);
        padding: var(--space-3);
        font-size: var(--text-sm);
        color: var(--color-text);
        text-decoration: none;
        border-radius: var(--radius-sm);

        .notifications-dropdown__item-icon {
          flex: 0 0 1.25rem;
          width: 1.25rem;
          height: 1.25rem;
          color: var(--color-text-muted);

          svg path {
            stroke: currentColor;
          }
        }

        .notifications-dropdown__item-content {
          flex: 1;

          p {
            margin: 0;
          }

          time {
            color: var(--color-text-muted);
          }
        }

        .notifications-dropdown__item-dot {
          flex-shrink: 0;
          width: 0.5rem;
          height: 0.5rem;
          margin-top: 0.375rem;
          border-radius: var(--radius-full);
        }

        &.is-unread .notifications-dropdown__item-dot {
          background: var(--color-text);
        }

        &:hover {
          background: var(--color-gray-100);
        }
      }

      .notifications-dropdown__empty {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--space-2);
        padding: var(--space-6);
        color: var(--color-text-muted);

        svg path {
          stroke: currentColor;
        }

        p {
          margin: 0;
          text-align: center;
        }
      }
    }

    .dropdown__footer {
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }

  [data-theme="dark"] [data-controller="notifications-dropdown"] .notifications-dropdown__item:hover {
    background: var(--color-hover);
  }
}
